- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
why not just assign LEDG to a constant?
assign LEDG[7:0] <= 8'hff;- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's just a small code snippet to illustrate the issue, I intend to fill variable values into the array in full project...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
why not post the whole code then?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page