Forum Discussion

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

Arrays issue

I've been trying to code arrays lately (verilog newbie) and I'm having issues reading values inside them.

Narrowed issue down to a small code sample:

module arrays(LEDG);
output LEDG;
reg array;
reg wat=0;
initial begin
    array=8'hff;
end
//assign LEDG=array;
assign LEDG=array;
endmodule

First (commented) assign will return the correct value (0xff), second one won't (returns 0x00).

Cannot understand why, is there something about arrays usage I missed out? Didn't find much info.

Using Quartus 13.0.1

Thanks

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It's just a small code snippet to illustrate the issue, I intend to fill variable values into the array in full project...