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.

Connecting 2D array output to 1D array input

Status
Not open for further replies.

bit_an

Junior Member level 3
Joined
Mar 11, 2017
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
235
Hi,

Can I use the below code in my top module to connect the output of five X_type blocks with the input of one Y_type block?!

//output of five X_type blocks
wire [3:0] data_out [0:4];

//input of one Y_type block
wire [19:0] get_data;
assign [19:0] get_data = {data_out[4], data_out[3], data_out[2], data_out[1], data_out[0]};


Also in the above case how is the order of the columns for data_out?! Is this a stack such as below or upward down?!

data_out[4]
data_out[3]
data_out[2]
data_out[1]
data_out[0]


In case there is a better solution, please suggest...

Thanks
 

you can, but the syntax is broken. the assign line cannot have the []s in there
 

Thanks. Yes [] was a typo..
Can you also comment on the stack?!
 

I presume you mean bit order with "stack". It's fixed by the descending definition of get_data and the concatenation order, respectively you get data_out[0] assigned to get_data[3:0] and so on.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top