littlefield
Junior Member level 3
In my design, I use an AND gate worked as a clock gating cell, this is the RTL simulation result of this circuit.
__A________________ B _______ C_______ D _____ time
__| ̄ ̄|____| ̄ ̄|____| ̄ ̄|____| ̄ ̄|____| ̄ ̄ clk1
__| ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄|____________ enable
__| ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ | ________________ | ̄ ̄ clk2
__| ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ | _____________________ output
‘enable’ is the clock gating control signal; it is in clk1 clock domain.
‘clk2’ is the clock to be gated.
‘output’ is the output of AND gate.
By default,
PT checks setup time from C (enable) to D (clk2).
PT checks hold time from A (enable) to B (clk2).
But in my opinion,
PT should check setup time from A (enable) to A (clk2),
check hold time from C (enable) to B (clk2).
Is it right?
I constrain the setup timing check:
set_multicycle_path 0 -to enable -setup -start
How to constrain the hold time check?
__A________________ B _______ C_______ D _____ time
__| ̄ ̄|____| ̄ ̄|____| ̄ ̄|____| ̄ ̄|____| ̄ ̄ clk1
__| ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄|____________ enable
__| ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ | ________________ | ̄ ̄ clk2
__| ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ | _____________________ output
‘enable’ is the clock gating control signal; it is in clk1 clock domain.
‘clk2’ is the clock to be gated.
‘output’ is the output of AND gate.
By default,
PT checks setup time from C (enable) to D (clk2).
PT checks hold time from A (enable) to B (clk2).
But in my opinion,
PT should check setup time from A (enable) to A (clk2),
check hold time from C (enable) to B (clk2).
Is it right?
I constrain the setup timing check:
set_multicycle_path 0 -to enable -setup -start
How to constrain the hold time check?