Bugfix in ice40_ffinit
authorClifford Wolf <clifford@clifford.at>
Tue, 22 Dec 2015 11:18:06 +0000 (12:18 +0100)
committerClifford Wolf <clifford@clifford.at>
Tue, 22 Dec 2015 11:18:06 +0000 (12:18 +0100)
techlibs/ice40/ice40_ffinit.cc

index c77ddc5f1802b4faf93c7b66ccaee23c31685d82..8c4b9a37dd0e7b54d28931cb5274d24c107c5fac 100644 (file)
@@ -148,8 +148,8 @@ struct Ice40FfinitPass : public Pass {
 
                                for (int i = 0; i < GetSize(wirebits) && i < GetSize(initval); i++) {
                                        if (handled_initbits.count(wirebits[i]))
-                                               wirebits[i] = State::Sx;
-                                       else
+                                               initval[i] = State::Sx;
+                                       else if (initval[i] != State::Sx)
                                                remove_attribute = false;
                                }