aboutsummaryrefslogtreecommitdiffstats
path: root/tests/sim/dlatchsr.v
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2022-02-16 13:58:51 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2022-02-16 13:58:51 +0100
commit21baf48e04bfb75527a6c04f1e98b34e62b8eec4 (patch)
tree59010c1cb5c351fc253a40217102d025865b2d79 /tests/sim/dlatchsr.v
parent271ac28b417be00d7be1cc898762c8e425a0aae3 (diff)
downloadyosys-21baf48e04bfb75527a6c04f1e98b34e62b8eec4.tar.gz
yosys-21baf48e04bfb75527a6c04f1e98b34e62b8eec4.tar.bz2
yosys-21baf48e04bfb75527a6c04f1e98b34e62b8eec4.zip
test dlatchsr and adlatch
Diffstat (limited to 'tests/sim/dlatchsr.v')
-rw-r--r--tests/sim/dlatchsr.v11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/sim/dlatchsr.v b/tests/sim/dlatchsr.v
new file mode 100644
index 000000000..1d13ac2ad
--- /dev/null
+++ b/tests/sim/dlatchsr.v
@@ -0,0 +1,11 @@
+module dlatchsr( input d, set, clr, en, output reg q );
+ always @* begin
+ if ( clr )
+ q = 0;
+ else if (set)
+ q = 1;
+ else
+ if (en)
+ q = d;
+ end
+endmodule