mirror of https://github.com/YosysHQ/yosys.git
Added GP_DLATCH and GP_DLATCHI
This commit is contained in:
parent
981f014301
commit
8767cdcac9
|
@ -240,6 +240,24 @@ module GP_DFFSRI(input D, CLK, nSR, output reg nQ);
|
|||
end
|
||||
endmodule
|
||||
|
||||
module GP_DLATCH(input D, input nCLK, output reg Q);
|
||||
parameter [0:0] INIT = 1'bx;
|
||||
initial Q = INIT;
|
||||
always @(*) begin
|
||||
if(!nCLK)
|
||||
Q <= D;
|
||||
end
|
||||
endmodule
|
||||
|
||||
module GP_DLATCHI(input D, input nCLK, output reg Q);
|
||||
parameter [0:0] INIT = 1'bx;
|
||||
initial Q = INIT;
|
||||
always @(*) begin
|
||||
if(!nCLK)
|
||||
Q <= ~D;
|
||||
end
|
||||
endmodule
|
||||
|
||||
module GP_DLATCHR(input D, input nCLK, input nRST, output reg Q);
|
||||
parameter [0:0] INIT = 1'bx;
|
||||
initial Q = INIT;
|
||||
|
|
Loading…
Reference in New Issue