Skip to content

Commit

Permalink
MultPassWorker -> BoothPassWorker
Browse files Browse the repository at this point in the history
  • Loading branch information
andyfox-rushc committed Sep 11, 2023
1 parent eccc0ae commit e4fe522
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions passes/techmap/booth.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ synth -top my_design -booth
USING_YOSYS_NAMESPACE
PRIVATE_NAMESPACE_BEGIN

struct MultPassWorker {
struct BoothPassWorker {

RTLIL::Module *module;
SigMap sigmap;
int booth_counter;

MultPassWorker(RTLIL::Module *module) : module(module), sigmap(module) { booth_counter = 0; }
BoothPassWorker(RTLIL::Module *module) : module(module), sigmap(module) { booth_counter = 0; }

// Helper routines for building architecture subcomponents

Expand Down Expand Up @@ -1505,15 +1505,16 @@ struct MultPassWorker {
}
};

struct MultPass : public Pass {
MultPass() : Pass("booth", "Map $mul to booth multipliers") {}
struct BoothPass : public Pass {
BoothPass() : Pass("booth", "Map $mul to booth multipliers") {}
void execute(vector<string> args, RTLIL::Design *design) override
{
(void)args;
log_header(design, "Executing multpass. Generating Booth Multiplier structures for signed/unsigned multipliers of 4 bits or more\n");
log_header(design,
"Executing booth pass. Generating Booth Multiplier structures for signed/unsigned multipliers of 4 bits or more\n");
for (auto mod : design->selected_modules())
if (!mod->has_processes_warn()) {
MultPassWorker worker(mod);
BoothPassWorker worker(mod);
worker.run();
log_header(design, "Created %d booth multipliers.\n", worker.booth_counter);
}
Expand Down

0 comments on commit e4fe522

Please sign in to comment.