From 21baf48e04bfb75527a6c04f1e98b34e62b8eec4 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Wed, 16 Feb 2022 13:58:51 +0100 Subject: [PATCH] test dlatchsr and adlatch --- tests/sim/dlatchsr.v | 11 +++++++ tests/sim/sim_adlatch.ys | 12 ++++--- tests/sim/sim_dlatchsr.ys | 10 ++++++ tests/sim/tb/tb_dlatchsr.v | 65 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 4 deletions(-) create mode 100644 tests/sim/dlatchsr.v create mode 100644 tests/sim/sim_dlatchsr.ys create mode 100755 tests/sim/tb/tb_dlatchsr.v 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 diff --git a/tests/sim/sim_adlatch.ys b/tests/sim/sim_adlatch.ys index 787b00c39..eece7dc0d 100644 --- a/tests/sim/sim_adlatch.ys +++ b/tests/sim/sim_adlatch.ys @@ -1,6 +1,10 @@ -read_verilog adlatch.v -synth -#TODO: adlatch is not emited +read_verilog -icells <