Fix sim for assignments with lhs<rhs size, fixes #1565
authorClifford Wolf <clifford@clifford.at>
Tue, 17 Dec 2019 16:32:48 +0000 (17:32 +0100)
committerClifford Wolf <clifford@clifford.at>
Tue, 17 Dec 2019 16:36:30 +0000 (17:36 +0100)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
passes/sat/sim.cc

index 4c3022c709d451d7a48d5f63800209025fb178ac..d5634b26d20967f4544ee710b13151172106245c 100644 (file)
@@ -230,7 +230,7 @@ struct SimInstance
                bool did_something = false;
 
                sig = sigmap(sig);
-               log_assert(GetSize(sig) == GetSize(value));
+               log_assert(GetSize(sig) <= GetSize(value));
 
                for (int i = 0; i < GetSize(sig); i++)
                        if (state_nets.at(sig[i]) != value[i]) {