3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-04-28 06:43:37 +00:00

aigerparse: sanity-check AIGER header

This commit is contained in:
Lofty 2026-02-11 11:46:17 +00:00
parent 43a15113ff
commit 2e03ee1434

View file

@ -657,6 +657,9 @@ void AigerReader::parse_aiger_binary()
unsigned l1, l2, l3;
std::string line;
if (M != I + L + A)
log_error("Binary AIGER input is malformed: maximum variable index M is %u, but number of inputs, latches and AND gates adds up to %u.\n", M, I + L + A);
// Parse inputs
int digits = decimal_digits(I);
for (unsigned i = 1; i <= I; ++i) {