mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
read_aiger fixes
This commit is contained in:
parent
9c5ceb5b4f
commit
8f5388ea5b
|
@ -490,9 +490,9 @@ void AigerReader::parse_aiger_ascii()
|
||||||
log_error("Line %u cannot be interpreted as an input!\n", line_count);
|
log_error("Line %u cannot be interpreted as an input!\n", line_count);
|
||||||
log_debug2("%d is an input\n", l1);
|
log_debug2("%d is an input\n", l1);
|
||||||
log_assert(!(l1 & 1)); // Inputs can't be inverted
|
log_assert(!(l1 & 1)); // Inputs can't be inverted
|
||||||
RTLIL::Wire *wire = module->addWire(stringf("$i%0*d", digits, i));
|
RTLIL::Wire *wire = module->addWire(stringf("$i%0*d", digits, l1 >> 1));
|
||||||
wire->port_input = true;
|
wire->port_input = true;
|
||||||
module->connect(createWireIfNotExists(module, l1 << 1), wire);
|
module->connect(createWireIfNotExists(module, l1), wire);
|
||||||
inputs.push_back(wire);
|
inputs.push_back(wire);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,7 +553,7 @@ void AigerReader::parse_aiger_ascii()
|
||||||
module->connect(wire, createWireIfNotExists(module, l1));
|
module->connect(wire, createWireIfNotExists(module, l1));
|
||||||
outputs.push_back(wire);
|
outputs.push_back(wire);
|
||||||
}
|
}
|
||||||
std::getline(f, line); // Ignore up to start of next line
|
//std::getline(f, line); // Ignore up to start of next line
|
||||||
|
|
||||||
// Parse bad properties
|
// Parse bad properties
|
||||||
for (unsigned i = 0; i < B; ++i, ++line_count) {
|
for (unsigned i = 0; i < B; ++i, ++line_count) {
|
||||||
|
@ -565,8 +565,8 @@ void AigerReader::parse_aiger_ascii()
|
||||||
wire->port_output = true;
|
wire->port_output = true;
|
||||||
bad_properties.push_back(wire);
|
bad_properties.push_back(wire);
|
||||||
}
|
}
|
||||||
if (B > 0)
|
//if (B > 0)
|
||||||
std::getline(f, line); // Ignore up to start of next line
|
// std::getline(f, line); // Ignore up to start of next line
|
||||||
|
|
||||||
// TODO: Parse invariant constraints
|
// TODO: Parse invariant constraints
|
||||||
for (unsigned i = 0; i < C; ++i, ++line_count)
|
for (unsigned i = 0; i < C; ++i, ++line_count)
|
||||||
|
|
Loading…
Reference in a new issue