Merge pull request #751 from daveshah1/fix_589

memory_dff: Fix typo when checking init value
This commit is contained in:
Clifford Wolf 2018-12-18 19:55:42 +01:00 committed by GitHub
commit eddf075d93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ struct MemoryDffWorker
if (wire->attributes.count("\\init") == 0) if (wire->attributes.count("\\init") == 0)
continue; continue;
SigSpec sig = sigmap(wire); SigSpec sig = sigmap(wire);
Const initval = wire->attributes.count("\\init"); Const initval = wire->attributes.at("\\init");
for (int i = 0; i < GetSize(sig) && i < GetSize(initval); i++) for (int i = 0; i < GetSize(sig) && i < GetSize(initval); i++)
if (initval[i] == State::S0 || initval[i] == State::S1) if (initval[i] == State::S0 || initval[i] == State::S1)
init_bits.insert(sig[i]); init_bits.insert(sig[i]);