From 58af70624febaad80e10538b4803a731bdcaac41 Mon Sep 17 00:00:00 2001 From: George Rennie Date: Tue, 24 Sep 2024 14:20:40 +0100 Subject: [PATCH] opt_demorgan: skip zero width cells --- passes/opt/opt_demorgan.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/passes/opt/opt_demorgan.cc b/passes/opt/opt_demorgan.cc index 4db3a8101..1a2c1fe82 100644 --- a/passes/opt/opt_demorgan.cc +++ b/passes/opt/opt_demorgan.cc @@ -39,6 +39,10 @@ void demorgan_worker( return; auto insig = sigmap(cell->getPort(ID::A)); + + if (GetSize(insig) < 1) + return; + log("Inspecting %s cell %s (%d inputs)\n", log_id(cell->type), log_id(cell->name), GetSize(insig)); int num_inverted = 0; for(int i=0; i