mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-18 18:36:43 +00:00
parse_xaiger() to really pass single and multi-bit inout tests
This commit is contained in:
parent
3ea0161ae7
commit
da076344cc
1 changed files with 12 additions and 10 deletions
|
@ -380,20 +380,22 @@ void AigerReader::parse_xaiger()
|
||||||
else if (c == 'o') wire = outputs[l1];
|
else if (c == 'o') wire = outputs[l1];
|
||||||
else log_abort();
|
else log_abort();
|
||||||
|
|
||||||
if (wideports && (wire->port_input || wire->port_output)) {
|
RTLIL::IdString escaped_s = RTLIL::escape_id(s);
|
||||||
RTLIL::IdString escaped_symbol;
|
|
||||||
|
if (escaped_s.ends_with("$inout.out")) {
|
||||||
|
deferred_inouts.emplace_back(wire, escaped_s.substr(0, escaped_s.size()-10));
|
||||||
|
goto next_line;
|
||||||
|
}
|
||||||
|
else if (wideports && (wire->port_input || wire->port_output)) {
|
||||||
|
RTLIL::IdString wide_symbol;
|
||||||
int index;
|
int index;
|
||||||
std::tie(escaped_symbol,index) = wideports_split(RTLIL::escape_id(s));
|
std::tie(wide_symbol,index) = wideports_split(escaped_s.str());
|
||||||
if (escaped_symbol.size() > 10 && escaped_symbol.substr(escaped_symbol.size()-10) == "$inout.out") {
|
if (wide_symbol.ends_with("$inout.out")) {
|
||||||
deferred_inouts.emplace_back(wire, stringf("%s[%d]", escaped_symbol.substr(0, escaped_symbol.size()-10).c_str(), index));
|
deferred_inouts.emplace_back(wire, stringf("%s[%d]", wide_symbol.substr(0, wide_symbol.size()-10).c_str(), index));
|
||||||
goto next_line;
|
goto next_line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
deferred_renames.emplace_back(wire, escaped_s);
|
||||||
if (s.size() > 10 && s.substr(s.size()-10) == "$inout.out")
|
|
||||||
deferred_inouts.emplace_back(wire, RTLIL::escape_id(s.substr(0, s.size()-10)));
|
|
||||||
else
|
|
||||||
deferred_renames.emplace_back(wire, RTLIL::escape_id(s));
|
|
||||||
|
|
||||||
next_line:
|
next_line:
|
||||||
std::getline(f, line); // Ignore up to start of next line
|
std::getline(f, line); // Ignore up to start of next line
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue