Bugfix in parsing of BLIF latch init values
authorClifford Wolf <clifford@clifford.at>
Tue, 6 Sep 2016 15:35:06 +0000 (17:35 +0200)
committerClifford Wolf <clifford@clifford.at>
Tue, 6 Sep 2016 15:35:06 +0000 (17:35 +0200)
frontends/blif/blifparse.cc

index 1f6d0ee375e018d2d93b4c2d5b16f909390eaf4d..3717a1e5e37f0ee877129a0b0283c17d8af429af 100644 (file)
@@ -241,7 +241,7 @@ void parse_blif(RTLIL::Design *design, std::istream &f, std::string dff_name, bo
                                }
 
                                if (init != nullptr && (init[0] == '0' || init[0] == '1'))
-                                       blif_wire(d)->attributes["\\init"] = Const(init[0] == '1' ? 1 : 0, 1);
+                                       blif_wire(q)->attributes["\\init"] = Const(init[0] == '1' ? 1 : 0, 1);
 
                                if (clock == nullptr)
                                        goto no_latch_clock;