-
Notifications
You must be signed in to change notification settings - Fork 51
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
Auto module instantiation cannot handle module with parameters correctly #159
Comments
Thanks for pointing this out. I have confirmed the bug and found a fix. The parameter detection is off. I'll merge the fix shortly. |
Hey @joecrop thank you!
I understand 2 is a bit of a weird one so feel free to ignore the suggestion:) Cheers, |
Can you give me examples about what you are proposing? |
Hello! lets say we are trying to instantiate:
The result should be:
However incorrectly the `include is parsed like a parameter:
I understand that not everyone might be using this includes so if it too much trouble to fix please dont worry. Cheers, |
I agree that the result from the instantiator is definitely wrong when there is an include in the definition. But are you sure that copying that include will work? I imagine that the contents of the include would look like this: parameter PARAM_3 = 5,
parameter PARAM_4 = 0,
parameter PARAM_5 = 40, So if you tried to put that in the module instantiation, it would effectively look like this after compilation: a_with_parameters #(
parameter PARAM_3 = 5,
parameter PARAM_4 = 0,
parameter PARAM_5 = 40,
.PARAM2 (3)
) u_a_with_parameters (
.clk (clk),
.valid (valid)
); This wouldn't compile, would it? |
Hello!
Then it would work. In the end its up to the user to make sure that the include files are correct in my opinion. In multiple projects I have worked we have an include file with setting parameters and then a second one which just has parameter connections. |
Hi @joecrop Thanks in advance! |
I dont know if this is relevant but I am using the forced fast indexing else the indexing never finishes. The workspace is very large.
Using v0.13 of the extension.
First lets start with a simple module:
This works correctly:
However I do get in the output log:
Now if the module has a parameter:
Incorrectly the hookup is:
and the output log is:
If the parameter list of the module is empty
#()
, this produces a module instantiation without ports.The text was updated successfully, but these errors were encountered: