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.

what is the main essence of generate block and how is it useful??

Status
Not open for further replies.

anusha vasanta

Member level 1
Joined
Sep 23, 2014
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
251
Code:
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.
 

thanku then in how many clock cycles we can get the o/p for a generate block of above kind.
 

U can get the output in a single clock. This is because all the different pieces of hardware generated will work at the same time.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top