aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/xilinx/cells_sim.v
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-12-18 12:08:38 -0800
committerEddie Hung <eddie@fpgeh.com>2019-12-18 12:08:38 -0800
commitd0afe4e10d474e9254a6d5ebc7fbeeb8e2e0149a (patch)
tree526c60c70ac41f71eb0c1a0d83f556ce1b35b126 /techlibs/xilinx/cells_sim.v
parentdccd7eb39f897f7fb04b038ee8ac11e676a8ea77 (diff)
parent520f1646cf0c0d83603c4bec2f6a37acca1d4960 (diff)
downloadyosys-d0afe4e10d474e9254a6d5ebc7fbeeb8e2e0149a.tar.gz
yosys-d0afe4e10d474e9254a6d5ebc7fbeeb8e2e0149a.tar.bz2
yosys-d0afe4e10d474e9254a6d5ebc7fbeeb8e2e0149a.zip
Merge branch 'master' of github.com:YosysHQ/yosys
Diffstat (limited to 'techlibs/xilinx/cells_sim.v')
-rw-r--r--techlibs/xilinx/cells_sim.v35
1 files changed, 35 insertions, 0 deletions
diff --git a/techlibs/xilinx/cells_sim.v b/techlibs/xilinx/cells_sim.v
index f9ce496ff..cf7923777 100644
--- a/techlibs/xilinx/cells_sim.v
+++ b/techlibs/xilinx/cells_sim.v
@@ -329,6 +329,41 @@ module FDSE (
endcase endgenerate
endmodule
+module FDRSE (
+ output reg Q,
+ (* clkbuf_sink *)
+ (* invertible_pin = "IS_C_INVERTED" *)
+ input C,
+ (* invertible_pin = "IS_CE_INVERTED" *)
+ input CE,
+ (* invertible_pin = "IS_D_INVERTED" *)
+ input D,
+ (* invertible_pin = "IS_R_INVERTED" *)
+ input R,
+ (* invertible_pin = "IS_S_INVERTED" *)
+ input S
+);
+ parameter [0:0] INIT = 1'b0;
+ parameter [0:0] IS_C_INVERTED = 1'b0;
+ parameter [0:0] IS_CE_INVERTED = 1'b0;
+ parameter [0:0] IS_D_INVERTED = 1'b0;
+ parameter [0:0] IS_R_INVERTED = 1'b0;
+ parameter [0:0] IS_S_INVERTED = 1'b0;
+ initial Q <= INIT;
+ wire c = C ^ IS_C_INVERTED;
+ wire ce = CE ^ IS_CE_INVERTED;
+ wire d = D ^ IS_D_INVERTED;
+ wire r = R ^ IS_R_INVERTED;
+ wire s = S ^ IS_S_INVERTED;
+ always @(posedge c)
+ if (r)
+ Q <= 0;
+ else if (s)
+ Q <= 1;
+ else if (ce)
+ Q <= d;
+endmodule
+
module FDCE (
(* abc9_arrival=303 *)
output reg Q,