How to write compact DFF chain?

Mar 25, 2006 1 Replies

Hi all,



Sometimes I have to write long DFF chain like below:



//------code-------------- ... reg [7:0] DFF0,DFF1,DFF2,...DFF50;



always@(posedge clk) if(rst) begin DFF0


Can't you declare it as :

reg [7:0] DFF[0:50];

and then use for loops with the loop counter declared as an integer? I believe this is synthesizeable. Am I right?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required