1
\$\begingroup\$

I am instantiating a module in SystemVerilog that has a lot of parameters. One of them (this is actually someone else's code) does not exist in the module definition. What will the compiler do in this case? Does it just ignore the non-existent parameter?

Here's what I mean:

Module definition:

module DummySystemVerilogModule 
# (
parameter parameter0 = 64'd0,
...
parameter parameter999 = 64'd999
) (
input wire port0,
output wire port1 )
[Body of module]
endmodule

Instantiation:

DummySystemVerilogModule # (
.parameter0 (parameter0value),
...
.parameter999 (parameter999value),
.nonexistentparameter (.nonexistentparametervalue)
) (
.port0 (wire0),
.port1 (wire1)
);

Will the compiler simply ignore the nonexistent parameter I accidentally added in the instantiation of the module?

asked Jun 2, 2017 at 16:46
\$\endgroup\$
1
  • \$\begingroup\$ I did not mean to put the . in the nonexistentparameter value, but you get a what I mean. \$\endgroup\$ Commented Jun 2, 2017 at 16:47

1 Answer 1

1
\$\begingroup\$

You should get a compiler error if you try to reference an identifier that doesn't exist. That's true for a parameter, port, argument, etc.

answered Jun 2, 2017 at 17:47
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.