diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-12 09:21:15 -0800 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2019-02-12 09:21:15 -0800 |
commit | a2ae39381124ccfec348293c7c7926597c26a5b8 (patch) | |
tree | ea2cfd0cb8b69d3bd1f6f8eb826e4d6b801ba6af /frontends/aiger/aigerparse.cc | |
parent | fb6df09dd210faddf1d238d2605e645bdbda9723 (diff) | |
download | yosys-a2ae39381124ccfec348293c7c7926597c26a5b8.tar.gz yosys-a2ae39381124ccfec348293c7c7926597c26a5b8.tar.bz2 yosys-a2ae39381124ccfec348293c7c7926597c26a5b8.zip |
Use module->add{Not,And}Gate() functions
Diffstat (limited to 'frontends/aiger/aigerparse.cc')
-rw-r--r-- | frontends/aiger/aigerparse.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/frontends/aiger/aigerparse.cc b/frontends/aiger/aigerparse.cc index c45de8531..888a4afe6 100644 --- a/frontends/aiger/aigerparse.cc +++ b/frontends/aiger/aigerparse.cc @@ -134,9 +134,7 @@ static RTLIL::Wire* createWireIfNotExists(RTLIL::Module *module, unsigned litera } log_debug("Creating %s = ~%s\n", wire_name.c_str(), wire_inv_name.c_str()); - RTLIL::Cell *inv = module->addCell(stringf("\\n%d_not", variable), "$_NOT_"); // FIXME: is "_not" the right suffix? - inv->setPort("\\A", wire_inv); - inv->setPort("\\Y", wire); + module->addNotGate(stringf("\\n%d_not", variable), wire_inv, wire); // FIXME: is "_not" the right suffix? return wire; } @@ -236,11 +234,7 @@ void AigerReader::parse_aiger_ascii() RTLIL::Wire *o_wire = createWireIfNotExists(module, l1); RTLIL::Wire *i1_wire = createWireIfNotExists(module, l2); RTLIL::Wire *i2_wire = createWireIfNotExists(module, l3); - - RTLIL::Cell *and_cell = module->addCell(NEW_ID, "$_AND_"); - and_cell->setPort("\\A", i1_wire); - and_cell->setPort("\\B", i2_wire); - and_cell->setPort("\\Y", o_wire); + module->addAndGate(NEW_ID, i1_wire, i2_wire, o_wire); } std::getline(f, line); // Ignore up to start of next line } |