mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
Do not clean up buffer cells with "keep" attribute, closes #1128
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
b3c36b4448
commit
8e9ef891fe
|
@ -480,7 +480,7 @@ void rmunused_module(RTLIL::Module *module, bool purge_mode, bool verbose, bool
|
||||||
|
|
||||||
std::vector<RTLIL::Cell*> delcells;
|
std::vector<RTLIL::Cell*> delcells;
|
||||||
for (auto cell : module->cells())
|
for (auto cell : module->cells())
|
||||||
if (cell->type.in("$pos", "$_BUF_")) {
|
if (cell->type.in("$pos", "$_BUF_") && !cell->has_keep_attr()) {
|
||||||
bool is_signed = cell->type == "$pos" && cell->getParam("\\A_SIGNED").as_bool();
|
bool is_signed = cell->type == "$pos" && cell->getParam("\\A_SIGNED").as_bool();
|
||||||
RTLIL::SigSpec a = cell->getPort("\\A");
|
RTLIL::SigSpec a = cell->getPort("\\A");
|
||||||
RTLIL::SigSpec y = cell->getPort("\\Y");
|
RTLIL::SigSpec y = cell->getPort("\\Y");
|
||||||
|
|
Loading…
Reference in a new issue