Skip to content

Commit

Permalink
macc_v2: Fix v2 omissions
Browse files Browse the repository at this point in the history
  • Loading branch information
povik committed Jan 27, 2025
1 parent aabb4ea commit 6c76dce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions passes/techmap/techmap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,8 @@ struct TechmapWorker

if (extmapper_name == "maccmap") {
log("Creating %s with maccmap.\n", log_id(extmapper_module));
if (extmapper_cell->type != ID($macc))
log_error("The maccmap mapper can only map $macc (not %s) cells!\n", log_id(extmapper_cell->type));
if (!extmapper_cell->type.in(ID($macc), ID($macc_v2)))
log_error("The maccmap mapper can only map $macc/$macc_v2 (not %s) cells!\n", log_id(extmapper_cell->type));
maccmap(extmapper_module, extmapper_cell);
extmapper_module->remove(extmapper_cell);
}
Expand Down Expand Up @@ -600,8 +600,8 @@ struct TechmapWorker
}

if (extmapper_name == "maccmap") {
if (cell->type != ID($macc))
log_error("The maccmap mapper can only map $macc (not %s) cells!\n", log_id(cell->type));
if (!cell->type.in(ID($macc), ID($macc_v2)))
log_error("The maccmap mapper can only map $macc/$macc_v2 (not %s) cells!\n", log_id(cell->type));
maccmap(module, cell);
}

Expand Down
2 changes: 1 addition & 1 deletion techlibs/common/techmap.v
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ module _90_alu (A, B, CI, BI, X, Y, CO);
endmodule

(* techmap_maccmap *)
(* techmap_celltype = "$macc" *)
(* techmap_celltype = "$macc $macc_v2" *)
module _90_macc;
endmodule

Expand Down

0 comments on commit 6c76dce

Please sign in to comment.