diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-05-31 13:03:03 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-05-31 13:03:03 -0700 |
commit | eb08e71bd10004cb37c3ceab37607866d9240630 (patch) | |
tree | 21754a7525d42c3662d081c7d9b995d731fae00f /frontends/aiger/aigerparse.cc | |
parent | a379234f56753c3d72a6966c380ac6f83fde789c (diff) | |
parent | ac2aff9e28a087a9a2697cd6ccf754af738903a7 (diff) | |
download | yosys-eb08e71bd10004cb37c3ceab37607866d9240630.tar.gz yosys-eb08e71bd10004cb37c3ceab37607866d9240630.tar.bz2 yosys-eb08e71bd10004cb37c3ceab37607866d9240630.zip |
Merge branch 'xaig' into xc7mux
Diffstat (limited to 'frontends/aiger/aigerparse.cc')
-rw-r--r-- | frontends/aiger/aigerparse.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/frontends/aiger/aigerparse.cc b/frontends/aiger/aigerparse.cc index 399e46737..69404b19d 100644 --- a/frontends/aiger/aigerparse.cc +++ b/frontends/aiger/aigerparse.cc @@ -249,6 +249,24 @@ void AigerReader::parse_xaiger() module->addLut(stringf("\\__%d__$lut", rootNodeID), input_sig, output_sig, std::move(lut_mask)); } } + else if (c == 'r') { + /*uint32_t dataSize =*/ parse_xaiger_literal(f); + uint32_t flopNum = parse_xaiger_literal(f); + f.ignore(flopNum * sizeof(uint32_t)); + log_assert(inputs.size() >= flopNum); + for (auto it = inputs.end() - flopNum; it != inputs.end(); ++it) { + log_assert((*it)->port_input); + (*it)->port_input = false; + } + inputs.erase(inputs.end() - flopNum, inputs.end()); + log_assert(outputs.size() >= flopNum); + for (auto it = outputs.end() - flopNum; it != outputs.end(); ++it) { + log_assert((*it)->port_output); + (*it)->port_output = false; + } + outputs.erase(outputs.end() - flopNum, outputs.end()); + module->fixup_ports(); + } else if (c == 'n') { parse_xaiger_literal(f); f >> s; |