Forum Discussion
Altera_Forum
Honored Contributor
13 years agounsized constants are not allowed in concatenations
Hi all,
I got this error in Quartus. Please help me fix it.
bit Array;
initial
begin
Array = {4,5}; // Error here
end
Error: unsized constants are not allowed in concatenations 9 Replies
- Altera_Forum
Honored Contributor
You must specify array elements size:
Array = {6'b4, 6'd5}; - Altera_Forum
Honored Contributor
I got this error:
Error: illegal character in binary number - Altera_Forum
Honored Contributor
Are you writing Verilog? What is "bit"?
- Altera_Forum
Honored Contributor
I am writing SystemVerilog. The code worked fine in Modelsim, but got error in Quartus. :)
- Altera_Forum
Honored Contributor
Array = {6'd4, 6'd5} works for me.
- Altera_Forum
Honored Contributor
do note the difference between FvM's correct:
Array = {6'd4, 6'd5}; and Cris72's almost correct: Array = {6'b4, 6'd5}; Once you notice, the error (Error: illegal character in binary number) makes more sense. - Altera_Forum
Honored Contributor
Sorry for the typo. :oops: I missed it
- Altera_Forum
Honored Contributor
--- Quote Start --- Once you notice, the error (Error: illegal character in binary number) makes more sense. --- Quote End --- A pretty strong hint to read error messages thorougly before posting at Altera Forum? - Altera_Forum
Honored Contributor
Haha that's worked. Thank you all. ;)