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.

flexible wire name ussing 2d array method?

Status
Not open for further replies.

hangchiu

Newbie level 1
Joined
Jul 25, 2011
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,291
Verilog-flexible wire name ussing 2d array method?

hello everyone,

I want to write a flexible design , so I need to set my variable by parameter like

wire [31:0] v_sum [0:`Y_FRAME_WIDTH -1];

[[[[My question is can I see this v_sum[0] as a wire with 32-bits ans then connect it to a module port?? ]]]]]]

(I want to use this variable like

wire [31:0] v_sum0; --------> v_sum[0]
wire [31:0] v_sum1; --------> v_sum[1]
wire [31:0] v_sum2;
wire [31:0] v_sum3;
...
wire [31:0] v_sum499; <assume `YFRAME_WIDTH=500
)

module00 u0_instance(......, v_sum[0]);
module01 u1_instance(......, v_sum[1]);
module02 u2_instance(......, v_sum[2]);
module03 u3_instance(......, v_sum[3]);...etc

why I ask this question is when I code like that and use ModelSim to simulate,

somehow v_sum[0], v_sum[1] .... will turn into unknown .

can anyone give me some hints or direction ....Thank you sincerely...
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top