mirror of https://github.com/YosysHQ/yosys.git
Fixed "abc" pass for clk and enable signals driven by logic
This commit is contained in:
parent
f7b323196f
commit
25844b5683
|
@ -147,6 +147,8 @@ void extract_cell(RTLIL::Cell *cell, bool keepff)
|
||||||
return;
|
return;
|
||||||
if (clk_sig != assign_map(cell->getPort("\\C")))
|
if (clk_sig != assign_map(cell->getPort("\\C")))
|
||||||
return;
|
return;
|
||||||
|
if (GetSize(en_sig) != 0)
|
||||||
|
return;
|
||||||
goto matching_dff;
|
goto matching_dff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -692,12 +694,6 @@ void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std::strin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clk_sig.size() != 0)
|
|
||||||
mark_port(clk_sig);
|
|
||||||
|
|
||||||
if (en_sig.size() != 0)
|
|
||||||
mark_port(en_sig);
|
|
||||||
|
|
||||||
std::vector<RTLIL::Cell*> cells;
|
std::vector<RTLIL::Cell*> cells;
|
||||||
cells.reserve(module->cells_.size());
|
cells.reserve(module->cells_.size());
|
||||||
for (auto &it : module->cells_)
|
for (auto &it : module->cells_)
|
||||||
|
@ -715,6 +711,12 @@ void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std::strin
|
||||||
for (auto &port_it : cell_it.second->connections())
|
for (auto &port_it : cell_it.second->connections())
|
||||||
mark_port(port_it.second);
|
mark_port(port_it.second);
|
||||||
|
|
||||||
|
if (clk_sig.size() != 0)
|
||||||
|
mark_port(clk_sig);
|
||||||
|
|
||||||
|
if (en_sig.size() != 0)
|
||||||
|
mark_port(en_sig);
|
||||||
|
|
||||||
handle_loops();
|
handle_loops();
|
||||||
|
|
||||||
std::string buffer = stringf("%s/input.blif", tempdir_name.c_str());
|
std::string buffer = stringf("%s/input.blif", tempdir_name.c_str());
|
||||||
|
|
Loading…
Reference in New Issue