Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Arrays issue

Altera_Forum
Honored Contributor II
1,401 Views

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
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
566 Views

why not just assign LEDG to a constant? 

 

assign LEDG[7:0] <= 8'hff;
0 Kudos
Altera_Forum
Honored Contributor II
566 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
566 Views

why not post the whole code then?

0 Kudos
Reply