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
Using AUTOs with parameterized types #1061
Comments
Original Redmine Comment Thanks for the suggestion. Made this new behavior the default unless verilog-auto-inst-param-value-type is nil. Fixed in git, 2016-07-24-cdd9115-vpo. |
I have tried this feature and it works with the example code. I have a case where parameterized types work properly when the child module is declared in the same file as its parent. However, if I move the child module to its own file, then the parameter type is not correctly reflected in the AUTOINPUT/AUTOOUTPUT declarations, and the comments in the module instance now seem to think the parameterized port types are Interfaces instead of ports. Any help to point out what I'm doing wrong is most appreciated. Here is the example file where it works correctly:
Now, if I remove the declaration for the fifo module from the same file as the test module and place it into its own file, then you can see the expanded results here. Notice no din or dout declarations, nothing under AUTOLOGIC, and the comments in the fifo instances related to din and dout use "Interfaces" whereas before they were under "Inputs" and "Outputs"
|
@cswmeta this issue is many years old, please open a new ticket with your issue, thanks. |
Author Name: Brad Dobbie
Original Redmine Issue: 1061 from https://www.veripool.org
Original Date: 2016-05-25
Original Assignee: Wilson Snyder (@wsnyder)
I've found some interesting use cases for parameterized types, and I could use some help from Verilog-mode to make them more useful.
Can Verilog-mode be made to declare AUTOINPUT/AUTOOUTPUT/AUTOLOGIC signals using the correct type? In the past, I've used verilog-auto-inst-param-value to have AUTOINST replace parameters with the parameter value. Perhaps a similar substitution can be made around types.
In my example below, b0/y0 and b1/y1 can be handled by replacing "TYPE_T" with the value passed (foo_t or logic [7:0], respectively). The b2/y2 is more complex, where as "TYPE_T" should be replaced with its default logic[WIDTH-1:0] and then further processed to replace "WIDTH-1" with 7 (or WIDTH with 8).
The text was updated successfully, but these errors were encountered: