|
楼主 |
发表于 2021-2-4 08:53:00
|
显示全部楼层
`timescale 1ns/1ps
`celldefine
module SDFFHQX1 (Q, D, SI, SE, CK);
output Q;
input D, SI, SE, CK;
reg NOTIFIER;
supply1 xRN, xSN;
supply1 dRN, dSN;
buf IC (clk, CK);
udp_dff I0 (n0, n1, clk, xRN, xSN, NOTIFIER);
udp_mux I1 (n1, D, SI, SE);
buf I2 (Q, n0);
and I4 (SandR, xSN, xRN);
and I5 (SandRandSE, SandR, SE);
not I6 (SEb, SE);
and I7 (SandRandSEb, SandR, SEb);
xor I8 (DxorSD, D, SI);
and I9 (flag, DxorSD, SandR);
specify
specparam
tplh$CK$Q = 1.0,
tphl$CK$Q = 1.0,
tsetup$D$CK = 1.0,
thold$D$CK = 0.5,
tsetup$SI$CK = 1.0,
thold$SI$CK = 0.5,
tsetup$SE$CK = 1.0,
thold$SE$CK = 0.5,
tminpwl$CK = 1.0,
tminpwh$CK = 1.0;
// path delays
if ( SandRandSEb )
(posedge CK *> (Q +: D)) = (tplh$CK$Q, tphl$CK$Q);
if ( SandRandSE )
(posedge CK *> (Q +: SI)) = (tplh$CK$Q, tphl$CK$Q);
// timing checks
$setuphold(posedge CK &&& (SandRandSEb == 1), posedge D, tsetup$D$CK ,thold$D$CK , NOTIFIER);
$setuphold(posedge CK &&& (SandRandSEb == 1), negedge D, tsetup$D$CK ,thold$D$CK , NOTIFIER);
$setuphold(posedge CK &&& (SandRandSE == 1), posedge SI, tsetup$SI$CK, thold$SI$CK , NOTIFIER);
$setuphold(posedge CK &&& (SandRandSE == 1), negedge SI, tsetup$SI$CK, thold$SI$CK , NOTIFIER);
$setuphold(posedge CK &&& (SandR == 1), posedge SE, tsetup$SE$CK, thold$SE$CK , NOTIFIER);
$setuphold(posedge CK &&& (SandR == 1), negedge SE, tsetup$SE$CK, thold$SE$CK , NOTIFIER);
$width(negedge CK &&& (SandR == 1), tminpwl$CK, 0, NOTIFIER);
$width(posedge CK &&& (SandR == 1), tminpwh$CK, 0, NOTIFIER);
endspecify
endmodule // SDFFHQX1
`endcelldefine
这个是这个寄存器的代码,它的波形我正在研究怎么弄出来
|
|