electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

How to write compact DFF chain?


Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital) -> How to write compact DFF chain?
Author Message
davyzhu



Joined: 23 May 2004
Posts: 521
Helped: 3
Location: oriental


Post25 Mar 2006 3:04   

How to write compact DFF chain?


Hi all,

Sometimes I have to write long DFF chain like below:

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

always@(posedge clk)
    if(rst)
    begin
        DFF0 <= 0;
        ...
        DFF50 <= 0;
    end
    else
    begin
        DFF0 <= INPUT;
        ...
        DFF50 <= DFF49;
    end


//------code end-----------
It's too long, is there any good compact style?

Any suggestions will be appreciated!
Best regards,
Davy
Back to top
Google
AdSense
Google Adsense




Post25 Mar 2006 3:04   

Ads




Back to top
linuxluo



Joined: 26 Jul 2002
Posts: 516
Helped: 4


Post25 Mar 2006 3:15   

Re: How to write compact DFF chain?


hi,
1. why not using dft eda tools such as dftcompiler ?
2. you can using 1-d array and using for statement .
Back to top
davyzhu



Joined: 23 May 2004
Posts: 521
Helped: 3
Location: oriental


Post25 Mar 2006 6:35   

How to write compact DFF chain?


Hi linuxluo,

Sorry, but I am a newbie.
1. What's dftcompiler for?
2. Can you give me the example of 2?

Best regards,
Davy
Back to top
leeenghan



Joined: 28 Dec 2004
Posts: 125
Helped: 7


Post25 Mar 2006 22:14   

Re: How to write compact DFF chain?


Hi,

There is nothing long with the code; clarity is more important.

However, to make the code compact, I can think of the following:

1. Make them into one array. Then use something similiar to DFF[50:1] = DFF[49:0]; DFF[0] = input

2. Use a for loop

3. Use generate statement

Regards,
Eng Han
www.eda-utilities.com
Back to top
linuxluo



Joined: 26 Jul 2002
Posts: 516
Helped: 4


Post27 Mar 2006 2:50   

Re: How to write compact DFF chain?


hi, davyzhu
as to2, you should read a verilog book and then it's clear.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital) -> How to write compact DFF chain?
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
when a Z input to DFF , what output of DFF? (19)
8051 Interface with Compact Flash Card to Read and Write Dat (1)
Compact flash & FPGA (read & write without FAT) (4)
how to implement a DFF in verilog? (5)
how to set some DFF not scan replaced? (2)
How can I connect the layout of Dff to scan circuit ? (1)
How to insert scan for DFF in RTL level with verilog? (6)
how to choose device sizing for a TSPC edge triggered DFF? (5)
how to do a scan chain in Astro? (9)
How to reduce the Scan Chain Length in Astro? (1)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS