-
Notifications
You must be signed in to change notification settings - Fork 58
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 #79
Comments
Should we put this kind of vendor-specific library in nmigen or in a separate package? |
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. |
Conversely, what we currently have as |
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. |
@mithro But that's all just copied from the pmod spec... |
@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). |
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. |
@whitequark I'm not tied to the idea of classes, something like what you proposed would also work. |
I think having a standard library with these types of things in it is the important part. |
E.g. codify this document as
vendor.conn.pmod
or something like that.The text was updated successfully, but these errors were encountered: