aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-02-24 11:29:14 -0800
committerGitHub <noreply@github.com>2019-02-24 11:29:14 -0800
commitda14bc8524c21c0d33a82fcb66d08d08f2654e6e (patch)
tree8a785b0d4de8bc7a6c16b99cc902d726fd3587ed /tests
parent1816fe06af9ab2c50bd293dc10359238acc88f12 (diff)
parent25680f6a078bb32f157bd580705656496717bafb (diff)
downloadyosys-da14bc8524c21c0d33a82fcb66d08d08f2654e6e.tar.gz
yosys-da14bc8524c21c0d33a82fcb66d08d08f2654e6e.tar.bz2
yosys-da14bc8524c21c0d33a82fcb66d08d08f2654e6e.zip
Merge pull request #824 from litghost/fix_reduce_on_ff
Fix WREDUCE on FF not fixing ARST_VALUE parameter.
Diffstat (limited to 'tests')
-rw-r--r--tests/opt/opt_ff.v21
-rw-r--r--tests/opt/opt_ff.ys3
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/opt/opt_ff.v b/tests/opt/opt_ff.v
new file mode 100644
index 000000000..a01b64b61
--- /dev/null
+++ b/tests/opt/opt_ff.v
@@ -0,0 +1,21 @@
+module top(
+ input clk,
+ input rst,
+ input [2:0] a,
+ output [1:0] b
+);
+ reg [2:0] b_reg;
+ initial begin
+ b_reg <= 3'b0;
+ end
+
+ assign b = b_reg[1:0];
+ always @(posedge clk or posedge rst) begin
+ if(rst) begin
+ b_reg <= 3'b0;
+ end else begin
+ b_reg <= a;
+ end
+ end
+endmodule
+
diff --git a/tests/opt/opt_ff.ys b/tests/opt/opt_ff.ys
new file mode 100644
index 000000000..704c7acf3
--- /dev/null
+++ b/tests/opt/opt_ff.ys
@@ -0,0 +1,3 @@
+read_verilog opt_ff.v
+synth_ice40
+ice40_unlut