From 322ab1cd54f4cddba4e9408887ed822c541185f9 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 22 Mar 2022 14:43:18 +0100 Subject: [PATCH] Proper SigBit forming in sim --- passes/sat/sim.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/passes/sat/sim.cc b/passes/sat/sim.cc index b56ccb987..8081ffffe 100644 --- a/passes/sat/sim.cc +++ b/passes/sat/sim.cc @@ -1708,13 +1708,13 @@ struct AIWWriter : public OutputWriter if (index < w->start_offset || index > w->start_offset + w->width) log_error("Index %d for wire %s is out of range\n", index, log_signal(w)); if (type == "input") { - aiw_inputs[variable] = SigBit(w,index); + aiw_inputs[variable] = SigBit(w,index-w->start_offset); } else if (type == "init") { - aiw_inits[variable] = SigBit(w,index); + aiw_inits[variable] = SigBit(w,index-w->start_offset); } else if (type == "latch") { - aiw_latches[variable] = {SigBit(w,index), false}; + aiw_latches[variable] = {SigBit(w,index-w->start_offset), false}; } else if (type == "invlatch") { - aiw_latches[variable] = {SigBit(w,index), true}; + aiw_latches[variable] = {SigBit(w,index-w->start_offset), true}; } } -- 2.30.2