Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Array initialization in SystemVerilog

Status
Not open for further replies.

chandan_c9

Newbie level 3
Joined
May 13, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,300
Hi All,

Why is it not possible to initialize array like reg [7:0] mem [0:3] = '{'h0,'h1,2{'h0}};
:smile:
 

Because that's no legal syntax.

Just do:

reg [7:0] mem [0:3] = '{'h0,'h1,'h0,'h0};
 
I think this is because the 2{'h0} can be assigned to something like reg [0:3][7:0] mem only.
If you put [0:3] after mem, you must assign them separately.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top