Documente Academic
Documente Profesional
Documente Cultură
What ? Why?
What? Transferring data between 2 different clock domains. Data may be lost or duplicated if transfer is not synchronous to target Why? Consumer devices / PCs have more interfaces every day protocols with different clock frequencies Common situation is a fast processor or controller to slow interface Low Power operation clock device at slower speed High Speed operation GHz range
Concerns
Communication between clock domains needs to be designed such that information is not missed or duplicated. Communication between asynchronous domains needs to be designed so that (setup, hold) timing relationships are satisfied. Transfer of data must avoid metastability in target domain 2 serial flops is rule of thumb (1 in 106 chance / flop) May use 3+ flops in critical and/or GHz applications
D
CLK_FAST
Q
CLK_SLOW
D Q
D Q
D Q
D Q
CLK_FAST Handshake Logic CLK_SLOW
D Q
Bus Synchronization
Clock skew between bits in each domain prevents syncing entire bus in same manner
D Q D Q
0
D Q
0
D Q
1
D Q
CLK_A
D Q
CLK_B
Bus Synchronization
D Q D Q
0
D Q
0
D Q
1
D Q
CLK_A
D Q
CLK_B
Solutions: Create a valid or load bit, and synchronize that across domains Perhaps one can guarantee the source domain has been stable & propagation time met before clocking target register?
CLK_BAD
CLK_GOOD
Synthesis
Bottom-Up synthesis still needed for large designs, Top-Down works fine with smaller designs (50 100K gates). Synthesis scripts need to be developed with cooperation of designers: timing, scan, false paths May want to consider clock tree synthesis for large fanout nets (LFO) such as reset or test signals (scan shift) Good idea to quickly scan netlist:
1. 2. 3.
Do you see the flops used that you expect? Were attributes you set carried outdoes the netlist have a ripple carry adder or a CLA? Excessive buffering fixing a race path with a long chain of buffers wont work across corner PVT conditions anyway.
duplicated as many times as the loop index. Some optimizations not done inside a for loop. Always block should only contain sensitivity list and register assignments that are applicable see example Good coding practice to keep the sequential and combinational logic in separate blocks too. Use uni-directional busses whenever possible: simplifies logic, timing & false constraints, and synthesis constraints.