tests: add testcase for abc9 -dff preserving flop names

This commit is contained in:
Eddie Hung 2020-05-25 07:18:21 -07:00
parent 1ebf7155a7
commit 8dd93e389e
1 changed files with 34 additions and 0 deletions

View File

@ -82,4 +82,38 @@ select -assert-count 1 t:FDPE
select -assert-count 2 t:INV select -assert-count 2 t:INV
select -assert-count 0 t:FD* t:INV %% t:* %D select -assert-count 0 t:FD* t:INV %% t:* %D
design -reset
read_verilog <<EOT
module top(input clk, input d, output q);
reg r;
always @(posedge clk) begin
r <= d;
end
assign q = ~r;
endmodule
EOT
proc
equiv_opt -assert -multiclock -map +/xilinx/cells_sim.v synth_xilinx -abc9 -dff -noiopad -noclkbuf
design -load postopt
select -assert-count 1 t:FDRE %co w:r %i
design -reset
read_verilog <<EOT
module top(input clk, input a, b, output reg q1, output q2);
reg r;
always @(posedge clk) begin
q1 <= a | b;
r <= ~(~a & ~b);
end
assign q2 = r;
endmodule
EOT
proc
equiv_opt -assert -multiclock -map +/xilinx/cells_sim.v synth_xilinx -abc9 -dff -noiopad -noclkbuf
design -load postopt
select -assert-count 1 t:FDRE %co %a w:r %i
logger -expect-no-warnings logger -expect-no-warnings