-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a library of connector layouts, too #86
Comments
Comment by sbourdeauducq Should we put this kind of vendor-specific library in nmigen or in a separate package? |
Comment by whitequark I think it should live together with the board definitions. And I think board definitions should be split. nMigen then can have proper releases, and the board/connector/etc package can be built and uploaded to PyPI each time a CI build succeeds. |
Comment by whitequark Conversely, what we currently have as |
Comment by mithro FYI - I long time ago I started trying to figure out the various ways pmod is used. You can find a class structure I was building at https://github.com/mithro/HDMI2USB-litex-firmware-old/blob/pmod-extra/pmod.py I also have a spreadsheet which tracks a lot of details about how people use pmod. |
Comment by whitequark @mithro But that's all just copied from the pmod spec... |
Comment by mithro @whitequark - Yes, a lot of the data is directly from the pmod spec in a more visual / collected form that I find easier to understand. There is also a bunch of information about how people are trying to do high speed over Pmod in the later sheets (Pmod High Speed, Pmod High Speed Hosts, "Pmod Like" Expansion Boards). |
Comment by whitequark So I imagine a library of functions like this: def PmodSPIResource(name, number, *, pmod, extras):
return Resource(name, number,
Subsignal("cs_n", Pins("0", dir="o", conn=("pmod", pmod))),
Subsignal("clk", Pins("1", dir="o", conn=("pmod", pmod))),
Subsignal("mosi", Pins("2", dir="o", conn=("pmod", pmod))),
Subsignal("miso", Pins("3", dir="i", conn=("pmod", pmod))),
extras=extras
) Then it can be used: platform.add_resources([
PmodSPIResource("spiflash", 1, pmod=0, extras={"IO_STANDARD": "SB_LVCMOS33"})
]) There's no need for something complicated like classes. |
Comment by mithro @whitequark I'm not tied to the idea of classes, something like what you proposed would also work. |
Comment by mithro I think having a standard library with these types of things in it is the important part. |
Issue by whitequark
Monday Jun 03, 2019 at 15:05 GMT
Originally opened as m-labs/nmigen#79
E.g. codify this document as
vendor.conn.pmod
or something like that.The text was updated successfully, but these errors were encountered: