I have coded the following negative-edge triggered D-FF below:
ENTITY d_ff IS
PORT (d, cl : IN BIT; q, qbar : INOUT BIT);
END d_ff;
ARCHITECTURE dataflow of d_ff IS
BEGIN
PROCESS (clk)
IF (clk = '0' AND clk'EVENT)
q <= d;
ELSE
q <= q;
END IF;
END dataflow;
My question is, if I want to modify this code to include generic setup/hold times (say of 8 and 5 ns respectively), how would I do it? I know I should add a GENERIC statement in the entity for those times, but how would I use them in conditions? Could I not say something like:
If (d'STABLE(hold))
q <= d AFTER setup;
Or something similar?
Thanks for any and all help provided!