-
Notifications
You must be signed in to change notification settings - Fork 603
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
parameterization to the name of IO #666
Comments
I think you might want to use the Chisel Record construct instead of Bundle. There's not a lot of documentation on that (I'll add that to my todo list) but you can see some use in the RecordSpec in the src/test/scala/chiselTests |
Related: it's theoretically possible to do this in the generated FIRRTL / Verilog, sine Chisel controls the naming there. But the name you see is the name you're going to get in Scala when you need to reference it in Chisel. As part of the naming system, there was an idea to use string interpolation, for example to name wires generated by a loop. There wasn't any consensus on that, and it hasn't been implemented yet. |
String interpolation in wire names seems like what the original example was trying to do. |
Is it possible to string interpolate variables names in Scala? |
As far as I know, not in Scala (with the exception of macros), but it would be possible to have Chisel recognize some syntax in generating the names when emitting downstream to FIRRTL. |
I see. This is where I think something like setName comes into play, although there does need to be a distinction between setting the name of the final Verilog wire vs. more of a local naming. |
yes , "String interpolation" |
Subsumed by setName or Record. |
Could you enlight me how to transmit a name to the IO by parameter?
how can I tell it the $nm is my parameter?
The text was updated successfully, but these errors were encountered: