2020-04-15 14:28:03 -05:00
|
|
|
logger -nowarn "Yosys has only limited support for tri-state logic at the moment\. .*"
|
|
|
|
|
|
|
|
read_verilog <<EOT
|
|
|
|
module top(input C, D, output [7:0] Q);
|
|
|
|
FDRE /*#(.INIT(0))*/ fd1(.C(C), .CE(1'b1), .D(D), .R(1'b1), .Q(Q[0]));
|
|
|
|
FDSE #(.INIT(0)) fd2(.C(C), .CE(1'b1), .D(D), .S(1'b1), .Q(Q[1]));
|
|
|
|
FDCE #(.INIT(0)) fd3(.C(C), .CE(1'b1), .D(D), .CLR(1'b1), .Q(Q[2]));
|
|
|
|
FDPE #(.INIT(0)) fd4(.C(C), .CE(1'b1), .D(D), .PRE(1'b1), .Q(Q[3]));
|
|
|
|
FDRE_1 #(.INIT(0)) fd5(.C(C), .CE(1'b1), .D(D), .R(1'b1), .Q(Q[4]));
|
|
|
|
FDSE_1 #(.INIT(0)) fd6(.C(C), .CE(1'b1), .D(D), .S(1'b1), .Q(Q[5]));
|
|
|
|
FDCE_1 #(.INIT(0)) fd7(.C(C), .CE(1'b1), .D(D), .CLR(1'b1), .Q(Q[6]));
|
|
|
|
FDPE_1 #(.INIT(0)) fd8(.C(C), .CE(1'b1), .D(D), .PRE(1'b1), .Q(Q[7]));
|
|
|
|
endmodule
|
|
|
|
EOT
|
|
|
|
equiv_opt -assert -multiclock -map +/xilinx/cells_sim.v synth_xilinx -abc9 -dff -noiopad -noclkbuf
|
|
|
|
design -load postopt
|
2020-04-15 17:41:55 -05:00
|
|
|
select -assert-count 6 t:FD*
|
2020-04-15 14:28:03 -05:00
|
|
|
select -assert-count 6 c:fd2 c:fd3 c:fd4 c:fd6 c:fd7 c:fd8
|
|
|
|
|
|
|
|
|
|
|
|
design -reset
|
2019-12-31 18:16:05 -06:00
|
|
|
read_verilog <<EOT
|
2020-01-02 16:38:59 -06:00
|
|
|
module top(input C, D, output [7:0] Q);
|
2020-04-15 14:28:03 -05:00
|
|
|
FDRE #(.INIT(0)) fd1(.C(C), .CE(1'b0), .D(D), .R(1'b0), .Q(Q[0]));
|
|
|
|
FDSE #(.INIT(0)) fd2(.C(C), .CE(1'b0), .D(D), .S(1'b0), .Q(Q[1]));
|
|
|
|
FDCE #(.INIT(0)) fd3(.C(C), .CE(1'b0), .D(D), .CLR(1'b0), .Q(Q[2]));
|
|
|
|
FDPE #(.INIT(0)) fd4(.C(C), .CE(1'b0), .D(D), .PRE(1'b0), .Q(Q[3]));
|
|
|
|
FDRE_1 /*#(.INIT(0))*/ fd5(.C(C), .CE(1'b0), .D(D), .R(1'b0), .Q(Q[4]));
|
|
|
|
FDSE_1 #(.INIT(0)) fd6(.C(C), .CE(1'b0), .D(D), .S(1'b0), .Q(Q[5]));
|
|
|
|
FDCE_1 #(.INIT(0)) fd7(.C(C), .CE(1'b0), .D(D), .CLR(1'b0), .Q(Q[6]));
|
|
|
|
FDPE_1 #(.INIT(0)) fd8(.C(C), .CE(1'b0), .D(D), .PRE(1'b0), .Q(Q[7]));
|
2019-12-31 18:16:05 -06:00
|
|
|
endmodule
|
|
|
|
EOT
|
|
|
|
equiv_opt -assert -multiclock -map +/xilinx/cells_sim.v synth_xilinx -abc9 -dff -noiopad -noclkbuf
|
|
|
|
design -load postopt
|
2020-04-15 17:41:55 -05:00
|
|
|
select -assert-count 4 t:FD*
|
2020-04-15 14:28:03 -05:00
|
|
|
select -assert-count 4 c:fd3 c:fd4 c:fd7 c:fd8
|
|
|
|
|
2019-12-31 18:16:05 -06:00
|
|
|
|
|
|
|
design -reset
|
|
|
|
read_verilog <<EOT
|
2020-01-02 16:38:59 -06:00
|
|
|
module top(input C, D, output [7:0] Q);
|
2020-04-15 14:28:03 -05:00
|
|
|
FDRE #(.INIT(1)) fd1(.C(C), .CE(1'b0), .D(D), .R(1'b0), .Q(Q[0]));
|
|
|
|
FDSE /*#(.INIT(1))*/ fd2(.C(C), .CE(1'b0), .D(D), .S(1'b0), .Q(Q[1]));
|
|
|
|
FDCE #(.INIT(1)) fd3(.C(C), .CE(1'b0), .D(D), .CLR(1'b0), .Q(Q[2]));
|
|
|
|
FDPE #(.INIT(1)) fd4(.C(C), .CE(1'b0), .D(D), .PRE(1'b0), .Q(Q[3]));
|
|
|
|
FDRE_1 #(.INIT(1)) fd5(.C(C), .CE(1'b0), .D(D), .R(1'b0), .Q(Q[4]));
|
|
|
|
FDSE_1 #(.INIT(1)) fd6(.C(C), .CE(1'b0), .D(D), .S(1'b0), .Q(Q[5]));
|
|
|
|
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]));
|
2019-12-31 18:16:05 -06:00
|
|
|
endmodule
|
|
|
|
EOT
|
2020-04-15 14:28:03 -05:00
|
|
|
logger -expect warning "Module '\$paramod\\FDRE\\INIT=1' contains a \$_DFF_P_ cell .*" 1
|
|
|
|
logger -expect warning "Module '\$paramod\\FDRE_1\\INIT=1' contains a \$_DFF_N_ cell .*" 1
|
|
|
|
logger -expect warning "Module 'FDSE' contains a \$_DFF_P_ cell .*" 1
|
|
|
|
logger -expect warning "Module '\$paramod\\FDSE_1\\INIT=1' contains a \$_DFF_N_ cell .*" 1
|
2019-12-31 18:16:05 -06:00
|
|
|
equiv_opt -assert -multiclock -map +/xilinx/cells_sim.v synth_xilinx -abc9 -dff -noiopad -noclkbuf
|
|
|
|
design -load postopt
|
2020-04-15 17:41:55 -05:00
|
|
|
select -assert-count 8 t:FD*
|
2020-04-15 14:28:03 -05:00
|
|
|
|
|
|
|
logger -expect-no-warnings
|