aboutsummaryrefslogtreecommitdiffstats
path: root/tests/opt
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-06-28 11:09:42 -0700
committerEddie Hung <eddie@fpgeh.com>2019-06-28 11:09:42 -0700
commit4ef26d4755d355e562a173c86d3eace100a266fe (patch)
tree6d331a5b3fa83d9072c25f7825cacb4e3d30cea5 /tests/opt
parent1c79a32276ef4ae3601cb75e0ab05ba1afe4d385 (diff)
parentda5f83039527bf50af001671744f351988c3261a (diff)
downloadyosys-4ef26d4755d355e562a173c86d3eace100a266fe.tar.gz
yosys-4ef26d4755d355e562a173c86d3eace100a266fe.tar.bz2
yosys-4ef26d4755d355e562a173c86d3eace100a266fe.zip
Merge remote-tracking branch 'origin/master' into xc7mux
Diffstat (limited to 'tests/opt')
-rw-r--r--tests/opt/opt_ff_sat.v12
-rw-r--r--tests/opt/opt_ff_sat.ys5
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/opt/opt_ff_sat.v b/tests/opt/opt_ff_sat.v
new file mode 100644
index 000000000..5a0a6fe37
--- /dev/null
+++ b/tests/opt/opt_ff_sat.v
@@ -0,0 +1,12 @@
+module top (
+ input clk,
+ output reg [7:0] cnt
+);
+ initial cnt = 0;
+ always @(posedge clk) begin
+ if (cnt < 20)
+ cnt <= cnt + 1;
+ else
+ cnt <= 0;
+ end
+endmodule
diff --git a/tests/opt/opt_ff_sat.ys b/tests/opt/opt_ff_sat.ys
new file mode 100644
index 000000000..4e7cc6ca4
--- /dev/null
+++ b/tests/opt/opt_ff_sat.ys
@@ -0,0 +1,5 @@
+read_verilog opt_ff_sat.v
+prep -flatten
+opt_rmdff -sat
+synth
+select -assert-count 5 t:$_DFF_P_