diff options
author | Keith Rothman <537074+litghost@users.noreply.github.com> | 2019-02-22 10:28:28 -0800 |
---|---|---|
committer | Keith Rothman <537074+litghost@users.noreply.github.com> | 2019-02-22 10:30:42 -0800 |
commit | 25680f6a078bb32f157bd580705656496717bafb (patch) | |
tree | 5a7166ce7bfd4385cd1fd9bd53b02291a85f8b85 /tests | |
parent | d55790909c3b4244889d092c8eae630c7efd1aee (diff) | |
download | yosys-25680f6a078bb32f157bd580705656496717bafb.tar.gz yosys-25680f6a078bb32f157bd580705656496717bafb.tar.bz2 yosys-25680f6a078bb32f157bd580705656496717bafb.zip |
Fix WREDUCE on FF not fixing ARST_VALUE parameter.
Adds test case that fails without code change.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/opt/opt_ff.v | 21 | ||||
-rw-r--r-- | tests/opt/opt_ff.ys | 3 |
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 |