3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-12 18:26:24 +00:00
yosys/tests/arch/fabulous/counter.ys
Leo Moser e87d8e162e fabulous: update tests for new options
Signed-off-by: Leo Moser <leomoser99@gmail.com>
2026-07-01 13:38:44 +02:00

26 lines
825 B
Text

read_verilog <<EOT
module top ( out, clk, reset );
output [7:0] out;
input clk, reset;
reg [7:0] out;
always @(posedge clk)
if (reset)
out <= 8'b0;
else
out <= out + 1;
endmodule
EOT
hierarchy -top top
proc
flatten
equiv_opt -assert -map prims.v synth_fabulous -noiopad -ff $_DFF_P_ x -ff $_DLATCH_?_ x -extra-plib prims.v -cells-map cells_map.v -arith-map arith_map.v -extra-map ff_map.v -extra-map latches_map.v # equivalency check
design -load postopt # load the post-opt design (otherwise equiv_opt loads the pre-opt design)
cd top # Constrain all select calls below inside the top module
select -assert-count 1 t:LUT2
select -assert-count 7 t:LUT3
select -assert-count 4 t:LUT4
select -assert-count 8 t:LUTFF
select -assert-none t:LUT2 t:LUT3 t:LUT4 t:LUTFF %% t:* %D