From 536a117eded82c45a5c217a378b3c289ba8e03da Mon Sep 17 00:00:00 2001 From: nella Date: Tue, 19 May 2026 10:39:01 +0200 Subject: [PATCH] Remove elarith-fast for now. --- kernel/compressor_tree.h | 15 --------------- passes/techmap/arith_tree.cc | 1 + 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/kernel/compressor_tree.h b/kernel/compressor_tree.h index 7785aab4d..ff5978977 100644 --- a/kernel/compressor_tree.h +++ b/kernel/compressor_tree.h @@ -47,7 +47,6 @@ enum class FinalAdder { DEFAULT, // emit $add and let downstream techmap pick RIPPLE, // emit $add with explicit narrow hint PARALLEL_PREFIX, // emit $add with PARALLEL_PREFIX - ELARITH_FAST, // black-box instance of \AddCfast ELARITH_MOP_CSV, // black-box instance of \AddMopCsv }; @@ -328,19 +327,6 @@ inline Cell *emit_final_adder(Module *module, SigSpec a, SigSpec b, SigSpec y, F c->set_string_attribute(ID(adder_arch), "parallel_prefix"); return c; } - case FinalAdder::ELARITH_FAST: { - Cell *c = module->addCell(NEW_ID, IdString("\\AddCfast")); - int w = GetSize(y); - c->setParam(IdString("\\WIDTH"), w); - c->setParam(IdString("\\SPEED"), Const("fast")); - c->setParam(IdString("\\SIGNED"), any_signed ? 1 : 0); - c->setPort(IdString("\\A"), a); - c->setPort(IdString("\\B"), b); - c->setPort(IdString("\\Cin"), State::S0); - c->setPort(IdString("\\Sum"), y); - c->setPort(IdString("\\Cout"), module->addWire(NEW_ID)); - return c; - } case FinalAdder::ELARITH_MOP_CSV: { Cell *c = module->addCell(NEW_ID, IdString("\\AddMopCsv")); int w = GetSize(y); @@ -361,7 +347,6 @@ inline FinalAdder pick_final_adder(int width, FinalMode mode) { switch (mode) { case FinalMode::RIPPLE: return FinalAdder::RIPPLE; case FinalMode::PREFIX: return FinalAdder::PARALLEL_PREFIX; - case FinalMode::ELARITH: return FinalAdder::ELARITH_FAST; case FinalMode::AUTO: default: return (width < RIPPLE_PREFIX_THRESHOLD) ? FinalAdder::DEFAULT : FinalAdder::PARALLEL_PREFIX; } diff --git a/passes/techmap/arith_tree.cc b/passes/techmap/arith_tree.cc index aa91dab51..11eec0c14 100644 --- a/passes/techmap/arith_tree.cc +++ b/passes/techmap/arith_tree.cc @@ -353,6 +353,7 @@ struct ArithTreeWorker { void emit_elarith_macro(std::vector &operands, SigSpec result_y, int neg_compensation, bool any_signed, const char *desc) { + // Multi operand int width = GetSize(result_y); auto pool = build_operand_pool(operands, width, neg_compensation);