https://vlsiuniverse.blogspot.com/2013/06/setup-and-hold-basics-of-timing-analysis.html
Tck->q + Tprop + Tsetup < Tperiod + Tskew
Tck->q + Tprop > Thold + Tskew
Data valid window = Clock period – Setup window – Hold window
Start of data valid window = Tlaunch + Thold
End of data valid window = Tlaunch + Tperiod – Tsetup

Setup slack = Tperiod – (Tck->q + Tprop + Tsetup – Tskew)
Hold slack = Tck->q + Tprop – Thold – Tskew
Mitigating setup violation: Thus, we can meet the setup requirement, if violating, by
- Decreasing clk->q delay of launching flop
- Decreasing the propagation delay of the combinational cloud
- Reducing the setup time requirement of capturing flop
- Increasing the skew between capture and launch clocks
- Increasing the clock period
- Increasing the clk->q delay of launching flop
- Decreasing the hold requirement of capturing flop
- Decreasing clock skew between capturing clock and launching flip-flops