Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

unsized 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I am writing SystemVerilog. The code worked fine in Modelsim, but got error in Quartus. :)

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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?