Re: How to write compact DFF chain?

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 ... > DFF50 end > else > begin > DFF0 ... > DFF50 end > > //------code end----------- > It's too long, is there any good compact style?

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?

Reply to
Andrew Holme
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.