Fix handling of (* keep *) wires in wreduce

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-12-31 16:34:27 +01:00
parent e09e49ca54
commit 0a840dd883
1 changed files with 4 additions and 1 deletions

View File

@ -235,8 +235,11 @@ struct WreduceWorker
} else {
while (GetSize(sig) > 0)
{
auto info = mi.query(sig[GetSize(sig)-1]);
auto bit = sig[GetSize(sig)-1];
if (keep_bits.count(bit))
break;
auto info = mi.query(bit);
if (info->is_output || GetSize(info->ports) > 1)
break;