-
Notifications
You must be signed in to change notification settings - Fork 109
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 support for Colorlight i5 r7.0 with extension board #184
base: main
Are you sure you want to change the base?
Conversation
Connector("pmod", 0, "M17 R17 T18 K18 - - P17 R18 C18 U16 - -"), # P2A | ||
Connector("pmod", 1, "G20 K20 L20 N18 - - J20 L18 M18 N17 - -"), # P2B | ||
Connector("pmod", 2, "A18 A19 B19 D20 - - C17 B18 B20 F20 - -"), # P3A | ||
Connector("pmod", 3, "E2 D2 B1 A12 - - D1 C1 C2 E3 - -"), # P3B |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pmod_3 pin 4 should be "A3" not "A12"
Thanks for the platform file! this saved me a lot of time. |
I have a colorlight_i9 platform file. My PMOD connectors are wired with the rows reversed to this one. Have I got them the wrong way round? Should I change my file to inherit or share this file? So there is a colorlight_ix.py definition, which can be passed the i5 / i9 etc? |
@DaveBerkeley I think you're right, pin1 is the one further from the edge. There are other expansion boards waiting for a sane design pattern before the maintainer is willing to merge them |
Should there be a separate class for the board (with its SODIMM connector) and a wrapper class that connects the FPGA board to the expansion board? I'm now sure how best to do this. Is there a way of using connect() to do this? |
I was planning on inheriting from here #148 and defining everything on the sodimm
The platform inherits from the |
That looks like a good approach. It reflects the physical wiring. For litex-boards I added a board="i9" parameter to the platform and target files. Then took a deep copy of the config, modifying it (slightly) for the i9. So there is just one Colorlight_ix class, whose structure is defined by args. So a base class for the module, with eg ctor(board="i9", revision="7.2"), which defines everything on the module, can then be placed in the expansion board (a derived class), which maps the sodimm to the pmods etc. So you could simply pass the board/revision args to the underlying base class in the expansion board class ctor. The expansion board class may not even need its own constructor. It is a just a set of mappings. The Litex boards don't do this, but perhaps they should : https://github.com/litex-hub/litex-boards/blob/master/litex_boards/platforms/colorlight_i5.py |
The expansion board really is just a collection of connectors and resources,
That would allow Luna builds to use the platform as they always have |
] | ||
|
||
connectors = [ | ||
Connector("pmod", 0, "M17 R17 T18 K18 - - P17 R18 C18 U16 - -"), # P2A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these should be swapped, like "P17 R18 C18 U16 - - M17 R17 T18 K18 - -". The PMOD standard mirrors pin numbering between the device and host side, so PMOD pin 1 on the host side is the inboard pin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... the reason for the confusion is that the Muse Labs PMODs aren't built to spec. At least the 8 LED module I tested isn't. So, as written right now it'll work with Muse Labs PMODs, but to work with PMODs with properly mirrored connector layouts, the pin ordering I suggested earlier is required.
There is already pull request for Colorlight i5 board #148
it has only sodimm and everything else is needed to be build on top of that.
But Colorlight i5 often comes with extension board with support of hdmi and handy organisation of pins for PMOD support.
Idk if adding support for board and board with extension board simultaneously is the right way. Probably not.