0
MUX32_16x1 inst9(muxR, dontNeed, addSub, AddSub, mult, shift, shift, wireAnd, wireOr, wireNor, {31{0}, addSub[31]}, dontNeed, dontNeed, dontNeed, dontNeed, dontNeed, dontNeed, OPRN[3:0]);

Above is my instantiation of a 16x1 mux, I'm trying to set one parameter to 0 for the first 31 bits leaving only the last bit as an input by doing this

{31{0}, addSub[31]}

I'm not sure why the program is giving out this error

near ",": syntax error, unexpected ',', expecting '}'.

is curly braces operator not allow in module instantiation?

sorry, I'm very new to Verilog programming

1 Answer 1

1

When you're doing repeated concatenation, you need to enclose it in another set of braces, so {31{1'b0}} is the same as 31'd0.

Try:

{{31{1'b0}}, addSub[31]}

Or:

{31'd0, addSub[31]}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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.