Use module->addLut()
authorEddie Hung <eddieh@ece.ubc.ca>
Thu, 14 Feb 2019 01:08:32 +0000 (17:08 -0800)
committerEddie Hung <eddieh@ece.ubc.ca>
Thu, 14 Feb 2019 01:08:32 +0000 (17:08 -0800)
frontends/aiger/aigerparse.cc

index 62354498c247b2d07074b1e85e1705da7aa009e1..931d2fd36995016041016a1d58f6dcd663a975f4 100644 (file)
@@ -227,11 +227,7 @@ void AigerReader::parse_xaiger()
                     RTLIL::Cell *output_cell = module->cell(stringf("\\n%d_and", rootNodeID));
                     log_assert(output_cell);
                     module->remove(output_cell);
-                                       RTLIL::Cell *cell = module->addCell(NEW_ID, "$lut");
-                                       cell->parameters["\\WIDTH"] = RTLIL::Const(input_sig.size());
-                                       cell->parameters["\\LUT"] = std::move(lut_mask);
-                                       cell->setPort("\\A", input_sig);
-                                       cell->setPort("\\Y", output_sig);
+                                       module->addLut(NEW_ID, input_sig, output_sig, std::move(lut_mask));
                 }
             }
             else if (c == 'n') {