layowblue
Advanced Member level 4
Hi All
First time posting question here...
I want to create a circuit as:
"
"
I know it's not synthesizable, so I am wondering if the follow code is:
"
"
Thanks a lot
Leo
First time posting question here...
I want to create a circuit as:
"
Code:
reg [7:0] mem [0:255];
reg [256*8-1:0] data_o;
for (int i=0; i<= size; i++) //size[7:0] is a register output that may vary
data_o[8*i+7 -: 8] <= mem[i]; //
I know it's not synthesizable, so I am wondering if the follow code is:
"
Code:
for (int i=0; i<= MAX_SIZE-1; i++) //MAX_SIZE is a parameter, say 256
if( i<=size)
data_o[8*i+7 -: 8] <= mem[i]; //
Thanks a lot
Leo