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
Question: Replacing the defines with the actual values #441
Comments
Original Redmine Comment Perhaps you're looking for verilog-auto-inst-param-value? |
Original Redmine Comment Hi, i've tried it, but there was no change. but there might be something else blocking it (i'm only starting to learn the verilog-mode.el file...) thx |
Original Redmine Comment Sorry, you're right. It's possible this could be extended, however it would have the same restriction as with parameters, notably that code like this
will always use baz for foo, which is probably not what you want. |
Original Redmine Comment Actually i just wanted my top to not have defines in the ports, so that whoever instantiate me doesn't need to know or read my define files. Thx for the help. |
Original Redmine Comment i'm coming late into this. Does autos read the `include "foo_file.v" and takes the defines for example: `define FOO bar and replace every define `FOO with bar in the top level file? I want to replace the `FOO from the port names with the actual values. Thanks! |
Original Redmine Comment If you have `defines in a include file then do this in the parent file // Local Variables: and any usages of defines in ranges will be expanded. |
Original Redmine Comment I tried this on a test code but i didn't get the expected results. In test_defines.v: `define FOO 32 In data_sel.v which calls test_defines.v:
I had expected the constant 40 would replace `FOO defines in data_sel.v when I performed a C-c C-a. |
Original Redmine Comment Needed to do some experiments to recall how this works. The replacements occur only in instantiating modules at the instantiation, and only if requested, e.g. make this instantiating file.
A switch could probably be made do this a little cleaner if need be. |
Original Redmine Comment Thanks a bunch! This worked. |
Author Name: Omri Sharon
Original Redmine Message: 735 from https://www.veripool.org
Hi,
is there a possibility that during the auto creation the defines in the sub blocks or in the AUTO_TEMPLATE are replaced with the actual value the define represents?
thx
The text was updated successfully, but these errors were encountered: