diff options
author | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-07-29 16:55:15 +0200 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-07-29 17:30:07 +0200 |
commit | 54e75129e57f29df1099f5cd45cec633d80e3841 (patch) | |
tree | b3293b8f52d9f1c9cc9802588e750e30346178a5 /tests/arch | |
parent | 3156226233133f5da9dba15c63ca560b4794b831 (diff) | |
download | yosys-54e75129e57f29df1099f5cd45cec633d80e3841.tar.gz yosys-54e75129e57f29df1099f5cd45cec633d80e3841.tar.bz2 yosys-54e75129e57f29df1099f5cd45cec633d80e3841.zip |
opt_lut: Allow more than one -dlogic per cell type.
Fixes #2061.
Diffstat (limited to 'tests/arch')
-rw-r--r-- | tests/arch/ice40/bug2061.ys | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/arch/ice40/bug2061.ys b/tests/arch/ice40/bug2061.ys new file mode 100644 index 000000000..7dd7ee6a3 --- /dev/null +++ b/tests/arch/ice40/bug2061.ys @@ -0,0 +1,24 @@ +read_verilog <<EOT +module top #( + parameter integer WIDTH = 12 +)( + output reg [WIDTH:0] cnt, + input wire clk, + input wire rst +); + wire last_n; + + assign last_n = cnt[WIDTH]; + + always @(posedge clk or posedge rst) + if (rst) + cnt <= 0; + else + cnt <= last_n ? ( cnt + { (WIDTH+1){last_n} } ) : 13'h1aaa; + +endmodule +EOT + +synth_ice40 +splitnets +select -assert-count 12 t:SB_CARRY %co:+[CO] t:SB_LUT4 %ci:+[I3] %i |