You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently nmigen.plat allows using integers to differentiate between different connectors/resources of the same type. In a design for which am writing a platform for, those are differentiated with cardinal points ("n", "s", "e", "w") , which is quite helpful in this case. Therefore I would like to do this also in the board descriptions.
What do you think about allowing strings as connector numbers, since sometimes they are more descriptive than numbers?
The text was updated successfully, but these errors were encountered:
Comment by whitequark Thursday Jan 23, 2020 at 16:40 GMT
The idea behind using numbers is that they are, well, sequential. In Migen, platform.request would pick the next lowest number. In nMigen, this is no longer the case (because getting different resources depending on the order in which you instantiate gateware is virtually always undesirable, if your gateware is composed of nested blocks, some of which require the same resource name).
There is still however some nMigen gateware that uses this sequential property: the built-in blinky. (I assume there could be user-developed gateware that e.g. enumerates SPI ports and creates a peripheral per port, too). I think this is sufficiently useful that we should in general keep doing that. Further, fortunately, even if you have e.g. "west" button, you can also have a "0th" button; you'll just be able to request it through one alias alone.
Issue by anuejn
Thursday Jan 23, 2020 at 16:33 GMT
Originally opened as m-labs/nmigen#311
Currently nmigen.plat allows using integers to differentiate between different connectors/resources of the same type. In a design for which am writing a platform for, those are differentiated with cardinal points ("n", "s", "e", "w") , which is quite helpful in this case. Therefore I would like to do this also in the board descriptions.
What do you think about allowing strings as connector numbers, since sometimes they are more descriptive than numbers?
The text was updated successfully, but these errors were encountered: