-
Notifications
You must be signed in to change notification settings - Fork 22
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
Distinguishing pins in multi-bit ports #196
Comments
You can get that using |
Thanks @ganeshgore !!! @emonlux I'm not seeing this in the documentation anywhere? Am I missing it, or it just not documented yet? Ultimately the behavior I need is given an Instance.get_pin(name)
Instance.get_pin(name, index) Now that I know how to get the index for a given pin I can build this information myself into a dictionary. I just thought I would ask if this behavior already exists somewhere... Thanks! |
Currently, there is no function built in for this. I will look into adding this functionality and documenting it. Edit: I was unable to get to this before leaving. |
OuterPins do not have names, however their ports do. I'm guessing the 'name' in your proposed addition would be the port name and then the index would specify what pin. On the other hand, we can give OuterPins names. Perhaps they could be their port name + "_" + their index. |
I have added an index property to InnerPin and OuterPin and updated _str_() to include index and port information. I have also implemented the following as requested:
The name is the name of the port. The default index is 0. If no pin matching the name and index is found, None will be returned. These updates can be found on the next_release branch. |
If I have a multi-bit port, how do I distinguish between the various pins?
I have an 8-bit port called Din:
When I iterate over the pins they all look identical. I would expect the InnerPin to have an index property, but I can't find one.
Am I missing something?
The text was updated successfully, but these errors were encountered: