mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-09 00:40:16 +00:00
fabulous: remove legacy arith_map.v mapping
Signed-off-by: Leo Moser <leomoser99@gmail.com>
This commit is contained in:
parent
f79c0ad214
commit
aa84f4a13b
2 changed files with 3 additions and 67 deletions
|
|
@ -1,64 +0,0 @@
|
|||
`default_nettype none
|
||||
|
||||
`ifdef ARITH_ha
|
||||
(* techmap_celltype = "$alu" *)
|
||||
module _80_fabulous_ha_alu (A, B, CI, BI, X, Y, CO);
|
||||
|
||||
parameter A_SIGNED = 0;
|
||||
parameter B_SIGNED = 0;
|
||||
parameter A_WIDTH = 1;
|
||||
parameter B_WIDTH = 1;
|
||||
parameter Y_WIDTH = 1;
|
||||
|
||||
parameter _TECHMAP_CONSTMSK_CI_ = 0;
|
||||
parameter _TECHMAP_CONSTVAL_CI_ = 0;
|
||||
|
||||
(* force_downto *)
|
||||
input [A_WIDTH-1:0] A;
|
||||
(* force_downto *)
|
||||
input [B_WIDTH-1:0] B;
|
||||
input CI, BI;
|
||||
(* force_downto *)
|
||||
output [Y_WIDTH-1:0] X, Y, CO;
|
||||
|
||||
(* force_downto *)
|
||||
wire [Y_WIDTH-1:0] A_buf, B_buf;
|
||||
\$pos #(.A_SIGNED(A_SIGNED), .A_WIDTH(A_WIDTH), .Y_WIDTH(Y_WIDTH)) A_conv (.A(A), .Y(A_buf));
|
||||
\$pos #(.A_SIGNED(B_SIGNED), .A_WIDTH(B_WIDTH), .Y_WIDTH(Y_WIDTH)) B_conv (.A(B), .Y(B_buf));
|
||||
|
||||
(* force_downto *)
|
||||
wire [Y_WIDTH-1:0] AA = A_buf;
|
||||
(* force_downto *)
|
||||
wire [Y_WIDTH-1:0] BB = BI ? ~B_buf : B_buf;
|
||||
wire [Y_WIDTH:0] CARRY;
|
||||
|
||||
|
||||
LUT4_HA #(
|
||||
.INIT(16'b0),
|
||||
.I0MUX(1'b1)
|
||||
) carry_statrt (
|
||||
.I0(), .I1(CI), .I2(CI), .I3(),
|
||||
.Ci(),
|
||||
.Co(CARRY[0])
|
||||
);
|
||||
|
||||
// Carry chain
|
||||
genvar i;
|
||||
generate for (i = 0; i < Y_WIDTH; i = i + 1) begin:slice
|
||||
LUT4_HA #(
|
||||
.INIT(16'b1001_0110_1001_0110), // full adder sum over (I2, I1, I0)
|
||||
.I0MUX(1'b1)
|
||||
) lut_i (
|
||||
.I0(), .I1(AA[i]), .I2(BB[i]), .I3(),
|
||||
.Ci(CARRY[i]),
|
||||
.O(Y[i]),
|
||||
.Co(CARRY[i+1])
|
||||
);
|
||||
|
||||
assign CO[i] = (AA[i] && BB[i]) || ((Y[i] ^ AA[i] ^ BB[i]) && (AA[i] || BB[i]));
|
||||
end endgenerate
|
||||
|
||||
assign X = AA ^ BB;
|
||||
|
||||
endmodule
|
||||
`endif
|
||||
|
|
@ -357,8 +357,7 @@ struct SynthPass : public ScriptPass
|
|||
|
||||
if (check_label("map_gates")) {
|
||||
run("opt -full");
|
||||
run(stringf("techmap -map +/techmap.v -map +/fabulous/arith_map.v -D ARITH_%s",
|
||||
help_mode ? "<carry>" : carry_mode.c_str()));
|
||||
run("techmap -map +/techmap.v");
|
||||
run("opt -fast");
|
||||
}
|
||||
|
||||
|
|
@ -386,11 +385,12 @@ struct SynthPass : public ScriptPass
|
|||
|
||||
if (check_label("map_extra")) {
|
||||
if (help_mode) {
|
||||
run("techmap -map <extra_map.v>...", "(for each -extra-map)");
|
||||
run("techmap -map <extra_map.v> -D ARITH_<carry>...", "(for each -extra-map)");
|
||||
} else if (!extra_map.empty()) {
|
||||
std::string map_str = "techmap";
|
||||
for (auto map : extra_map)
|
||||
map_str += stringf(" -map %s", map);
|
||||
map_str += stringf(" -D ARITH_%s", carry_mode.c_str());
|
||||
run(map_str);
|
||||
}
|
||||
run("simplemap");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue