aboutsummaryrefslogtreecommitdiffstats
path: root/tests/opt/opt_ff_sat.v
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/opt_ff_sat.v
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/opt_ff_sat.v')
-rw-r--r--tests/opt/opt_ff_sat.v12
1 files changed, 12 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