genvar a;
generate
for(a=0;a<=7;a=a+1) //converting input data_in bits into bytes format
begin : MEM
assign data[a]= data_in [((a*8)+7):(a*8)];
end
endgenerate
hi all, here i had one generate which is converting my bits into bytes of 8. is taking the conversion in gen block will reduce my no.of clock cycles?
will i get the o/p of 8 bytes in one clk during my elaboration phase?? help me thanku
Generate statement is used to replicate hardware without the need to write explicit pieces of code.
In the example you have shown, you don't need separate code for data[0], data[1],data[2]..and so on. The given piece of code will do the job.