mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #1639 from YosysHQ/eddie/fix_read_xaiger
read_aiger: $lut prefix in front
This commit is contained in:
commit
2bda51ac34
|
@ -1001,9 +1001,9 @@ void AigerReader::post_process()
|
||||||
if (cell->type != "$lut") continue;
|
if (cell->type != "$lut") continue;
|
||||||
auto y_port = cell->getPort("\\Y").as_bit();
|
auto y_port = cell->getPort("\\Y").as_bit();
|
||||||
if (y_port.wire->width == 1)
|
if (y_port.wire->width == 1)
|
||||||
module->rename(cell, stringf("%s$lut", y_port.wire->name.c_str()));
|
module->rename(cell, stringf("$lut%s", y_port.wire->name.c_str()));
|
||||||
else
|
else
|
||||||
module->rename(cell, stringf("%s[%d]$lut", y_port.wire->name.c_str(), y_port.offset));
|
module->rename(cell, stringf("$lut%s[%d]", y_port.wire->name.c_str(), y_port.offset));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,3 +38,15 @@ abc9 -lut 4
|
||||||
design -load gold
|
design -load gold
|
||||||
scratchpad -copy abc9.script.flow3 abc9.script
|
scratchpad -copy abc9.script.flow3 abc9.script
|
||||||
abc9 -lut 4
|
abc9 -lut 4
|
||||||
|
|
||||||
|
|
||||||
|
design -reset
|
||||||
|
read_verilog -icells <<EOT
|
||||||
|
module top(input a, b, output o);
|
||||||
|
assign o = ~(a & b);
|
||||||
|
endmodule
|
||||||
|
EOT
|
||||||
|
abc9 -lut 4
|
||||||
|
clean
|
||||||
|
select -assert-count 1 t:$lut
|
||||||
|
select -assert-none t:$lut t:* %D
|
||||||
|
|
Loading…
Reference in New Issue