From 3c5a9411b1c17d9e4474fb7edb54117c2298cfc1 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Wed, 11 Dec 2019 12:10:30 -0800 Subject: Add testcase for $_DFF_[NP][NP][01]_ --- tests/techmap/zinit.ys | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/techmap/zinit.ys (limited to 'tests') diff --git a/tests/techmap/zinit.ys b/tests/techmap/zinit.ys new file mode 100644 index 000000000..3652f2d72 --- /dev/null +++ b/tests/techmap/zinit.ys @@ -0,0 +1,24 @@ +read_verilog -icells < Date: Mon, 13 Apr 2020 14:29:44 -0700 Subject: tests: zinit on $adff --- tests/techmap/zinit.ys | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'tests') diff --git a/tests/techmap/zinit.ys b/tests/techmap/zinit.ys index 3652f2d72..caeab69d3 100644 --- a/tests/techmap/zinit.ys +++ b/tests/techmap/zinit.ys @@ -1,24 +1,23 @@ read_verilog -icells < Date: Mon, 13 Apr 2020 15:16:51 -0700 Subject: zinit: fix review comments from @mwkmwkmwk --- tests/techmap/zinit.ys | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/techmap/zinit.ys b/tests/techmap/zinit.ys index caeab69d3..c74218f7c 100644 --- a/tests/techmap/zinit.ys +++ b/tests/techmap/zinit.ys @@ -1,5 +1,5 @@ read_verilog -icells < Date: Mon, 13 Apr 2020 15:25:37 -0700 Subject: zinit: resolve one more comment by @mwkmwkmwk --- tests/techmap/zinit.ys | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/techmap/zinit.ys b/tests/techmap/zinit.ys index c74218f7c..18b17621f 100644 --- a/tests/techmap/zinit.ys +++ b/tests/techmap/zinit.ys @@ -23,6 +23,8 @@ design -load postopt select -assert-count 20 t:$_NOT_ select -assert-count 1 w:unused a:init %i select -assert-count 1 w:Q a:init=13'bxxxx1xxxxxxxx %i +select -assert-count 4 c:dff0 c:dff2 c:dff4 c:dff6 %% t:$_DFF_??1_ %i +select -assert-count 4 c:dff1 c:dff3 c:dff5 c:dff7 %% t:$_DFF_??0_ %i design -reset @@ -45,6 +47,11 @@ $adff #(.WIDTH(2), .CLK_POLARITY(1), .ARST_POLARITY(1'b0), .ARST_VALUE(2'b10)) d $adff #(.WIDTH(2), .CLK_POLARITY(0), .ARST_POLARITY(1'b1), .ARST_VALUE(2'b01)) dff9 (.CLK(C), .ARST(R), .D(D), .Q(Q[12:11])); endmodule EOT +equiv_opt -assert -map +/simcells.v -multiclock zinit +design -load postopt + select -assert-count 0 t:$_NOT_ select -assert-count 1 w:unused a:init %i -select -assert-count 1 w:Q a:init=13'bx00x100000000 %i +select -assert-count 1 w:Q a:init=13'bxxxx1xxxxxxxx %i +select -assert-count 4 c:dff0 c:dff2 c:dff4 c:dff6 %% t:$_DFF_??0_ %i +select -assert-count 4 c:dff1 c:dff3 c:dff5 c:dff7 %% t:$_DFF_??1_ %i -- cgit v1.2.3