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.

can we initailise an array in verilog

Status
Not open for further replies.

cccvamshikr

Newbie level 3
Joined
Jan 7, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,297
can we intialise the array in verilog. I mean

input in1;
input in2;
wire w1[1:0] = {in1,in2}

is this a valid syntax.
Thanks in advance...
 

Initializing implies constant expressions, not input signals. If the inputs are connected to a constant in your design hierarchy, it may possibly work.
 
Thanks for the answer...But how can we use arrays in the design.......if i want to delcare an array as an output how can i declare that..
example: output [15:0]w1 [1:0];
wire w1[1:0];
is this a valid syntax.
 

Standard Verilog doesn't allow structurized signals, e.g. arrays or records, for interfaces. You have to convert them to one dimensional bit vectors for in-and output.
 
Thank you..thanks alot for the answer...iam parsing the verilog code...thatswhy iam facing these type of problems...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top