From 7ed9d189079135ef53e8a19a5e3a38e240994103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelina=20Ko=C5=9Bcielnicka?= Date: Thu, 2 Jul 2020 18:22:43 +0200 Subject: dfflibmap: Refactor to use dfflegalize internally. --- tests/techmap/dfflibmap-sim.v | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/techmap/dfflibmap-sim.v (limited to 'tests/techmap/dfflibmap-sim.v') diff --git a/tests/techmap/dfflibmap-sim.v b/tests/techmap/dfflibmap-sim.v new file mode 100644 index 000000000..1788a683b --- /dev/null +++ b/tests/techmap/dfflibmap-sim.v @@ -0,0 +1,22 @@ +module dffn(input CLK, D, output reg Q, output QN); + +always @(negedge CLK) + Q <= D; + +assign QN = ~Q; + +endmodule + +module dffsr(input CLK, D, CLEAR, PRESET, output reg Q, output QN); + +always @(posedge CLK, posedge CLEAR, posedge PRESET) + if (CLEAR) + Q <= 0; + else if (PRESET) + Q <= 1; + else + Q <= D; + +assign QN = ~Q; + +endmodule -- cgit v1.2.3