memory_dff: Fix typo when checking init value
authorDavid Shah <davey1576@gmail.com>
Tue, 18 Dec 2018 17:40:01 +0000 (17:40 +0000)
committerDavid Shah <davey1576@gmail.com>
Tue, 18 Dec 2018 17:40:01 +0000 (17:40 +0000)
Signed-off-by: David Shah <davey1576@gmail.com>
passes/memory/memory_dff.cc

index 32df191740c14964233a0782ced6e4787053e73a..220d29295467a0c3fa32a4bed836a89d8a321afb 100644 (file)
@@ -41,7 +41,7 @@ struct MemoryDffWorker
                        if (wire->attributes.count("\\init") == 0)
                                continue;
                        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++)
                                if (initval[i] == State::S0 || initval[i] == State::S1)
                                        init_bits.insert(sig[i]);