From 8767cdcac95d30a454ba2bdd7c0d81083d3215ec Mon Sep 17 00:00:00 2001 From: Andrew Zonenberg Date: Mon, 5 Dec 2016 23:49:06 -0800 Subject: [PATCH] Added GP_DLATCH and GP_DLATCHI --- techlibs/greenpak4/cells_sim.v | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/techlibs/greenpak4/cells_sim.v b/techlibs/greenpak4/cells_sim.v index 1b3a66038..a59d17154 100644 --- a/techlibs/greenpak4/cells_sim.v +++ b/techlibs/greenpak4/cells_sim.v @@ -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; -- 2.30.2