diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-06-04 08:15:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 08:15:25 -0700 |
commit | 69850204c4e6d86436237ea022b55e5070f54610 (patch) | |
tree | 05f359789160c7aa6e06665697bc6a500ad66d8c /tests/arch | |
parent | 5e8a9c61cd0ae2127fb1c33b8a4c9c798573cafc (diff) | |
parent | 08d9703ecba375ba5588cbbb9dbf0f86757f6bb5 (diff) | |
download | yosys-69850204c4e6d86436237ea022b55e5070f54610.tar.gz yosys-69850204c4e6d86436237ea022b55e5070f54610.tar.bz2 yosys-69850204c4e6d86436237ea022b55e5070f54610.zip |
Merge pull request #2077 from YosysHQ/eddie/abc9_dff_improve
abc9: -dff improvements
Diffstat (limited to 'tests/arch')
-rw-r--r-- | tests/arch/xilinx/abc9_dff.ys | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/tests/arch/xilinx/abc9_dff.ys b/tests/arch/xilinx/abc9_dff.ys index fd343969b..210e87477 100644 --- a/tests/arch/xilinx/abc9_dff.ys +++ b/tests/arch/xilinx/abc9_dff.ys @@ -50,10 +50,10 @@ FDCE_1 /*#(.INIT(1))*/ fd7(.C(C), .CE(1'b0), .D(D), .CLR(1'b0), .Q(Q[6])); FDPE_1 #(.INIT(1)) fd8(.C(C), .CE(1'b0), .D(D), .PRE(1'b0), .Q(Q[7])); endmodule EOT -logger -expect warning "Module '\$paramod\\FDRE\\INIT=1' contains a \$dff cell .*" 1 -logger -expect warning "Module '\$paramod\\FDRE_1\\INIT=1' contains a \$dff cell .*" 1 -logger -expect warning "Module 'FDSE' contains a \$dff cell .*" 1 -logger -expect warning "Module '\$paramod\\FDSE_1\\INIT=1' contains a \$dff cell .*" 1 +logger -expect warning "Whitebox '\$paramod\\FDRE\\INIT=1' with \(\* abc9_flop \*\) contains a \$dff cell with non-zero initial state -- this is not supported for ABC9 sequential synthesis. Treating as a blackbox\." 1 +logger -expect warning "Whitebox '\$paramod\\FDRE_1\\INIT=1' with \(\* abc9_flop \*\) contains a \$dff cell with non-zero initial state -- this is not supported for ABC9 sequential synthesis. Treating as a blackbox\." 1 +logger -expect warning "Whitebox 'FDSE' with \(\* abc9_flop \*\) contains a \$dff cell with non-zero initial state -- this is not supported for ABC9 sequential synthesis. Treating as a blackbox\." 1 +logger -expect warning "Whitebox '\$paramod\\FDSE_1\\INIT=1' with \(\* abc9_flop \*\) contains a \$dff cell with non-zero initial state -- this is not supported for ABC9 sequential synthesis. Treating as a blackbox\." 1 equiv_opt -assert -multiclock -map +/xilinx/cells_sim.v synth_xilinx -abc9 -dff -noiopad -noclkbuf design -load postopt select -assert-count 8 t:FD* @@ -82,4 +82,53 @@ select -assert-count 1 t:FDPE select -assert-count 2 t:INV 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 + + +design -reset +read_verilog <<EOT +module top(input clk, input a, b, output o); +reg r1, r2; +always @(posedge clk) begin + r1 <= a | b; + r2 <= ~(~a & ~b); +end +assign o = r1 | r2; +endmodule +EOT +proc +equiv_opt -assert -multiclock -map +/xilinx/cells_sim.v synth_xilinx -abc9 -dff -noiopad -noclkbuf + + logger -expect-no-warnings |