mirror of https://github.com/YosysHQ/yosys.git
gowin: Fix X output of $alu techmap
This commit is contained in:
parent
cee3cb31b9
commit
30f1d10948
|
@ -62,6 +62,6 @@ module _80_gw1n_alu(A, B, CI, BI, X, Y, CO);
|
|||
.SUM(Y[i])
|
||||
);
|
||||
end endgenerate
|
||||
assign X = AA ^ BB;
|
||||
assign X = AA ^ BB ^ {Y_WIDTH{BI}};
|
||||
endmodule
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
module top
|
||||
(
|
||||
input [4:0] x,
|
||||
input [4:0] y,
|
||||
|
||||
output lt,
|
||||
output le,
|
||||
output gt,
|
||||
output ge,
|
||||
output eq,
|
||||
output ne
|
||||
);
|
||||
|
||||
assign lt = x < y;
|
||||
assign le = x <= y;
|
||||
assign gt = x > y;
|
||||
assign ge = x >= y;
|
||||
assign eq = x == y;
|
||||
assign ne = x != y;
|
||||
endmodule
|
|
@ -0,0 +1,9 @@
|
|||
read_verilog compare.v
|
||||
hierarchy -top top
|
||||
proc
|
||||
equiv_opt -assert -map +/gowin/cells_sim.v synth_gowin # 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 5 t:ALU
|
||||
|
||||
|
Loading…
Reference in New Issue