mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-26 10:38:47 +00:00
Replace suitable (2^k-1)-x with ~x.
This commit is contained in:
parent
8eb3133076
commit
d52670e58b
2 changed files with 69 additions and 0 deletions
19
tests/arch/xilinx/dynamic_upto_select.ys
Normal file
19
tests/arch/xilinx/dynamic_upto_select.ys
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# https://github.com/YosysHQ/yosys/issues/892
|
||||
|
||||
read_verilog <<EOT
|
||||
module top (input clk, sel, di, output do);
|
||||
reg [0:1] data [0:0];
|
||||
always @(posedge clk)
|
||||
data[0] <= {di, data[0][0]};
|
||||
assign do = data[0][sel];
|
||||
endmodule
|
||||
EOT
|
||||
|
||||
proc
|
||||
equiv_opt -assert -map +/xilinx/cells_sim.v synth_xilinx -noiopad
|
||||
design -load postopt
|
||||
|
||||
select -assert-count 1 t:BUFG
|
||||
select -assert-count 2 t:FDRE
|
||||
select -assert-count 1 t:LUT3
|
||||
select -assert-none t:BUFG t:FDRE t:LUT3 %% t:* %D
|
||||
Loading…
Add table
Add a link
Reference in a new issue