/usr/share/tkgate/primitives/flipflop.v is in tkgate-data 2.0~b10-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | module flipflop #(.Dsetup(1), .Dhold(1), .Dck_q(1)) (Q, _Q, D, EN, CLR, CK);
input CK,EN,CLR;
input ${DQ_RANGE} D;
output ${DQ_RANGE} Q,_Q;
reg ${DQ_RANGE} Qreg;
specify
$setup(D,posedge CK &&& (!EN && CLR), Dsetup);
$hold(posedge CK &&& (!EN && CLR),D, Dhold);
endspecify
assign #Dck_q Q = ${invQ}Qreg;
assign #Dck_q _Q = ${invNQ}Qreg;
always @(posedge CK or negedge CLR)
if (CLR === 1'b0)
Qreg = ${DQ_BITS}'b0;
else if (CK === 1'b1 && EN === 1'b0)
Qreg = D;
endmodule
|