285 bool sel_by_cell =
false;
286 bool sel_by_wire =
false;
287 bool sel_any_bit =
false;
288 bool no_outputs =
false;
289 std::set<RTLIL::IdString> ports, no_ports;
292 for (argidx = 1; argidx <
args.size(); argidx++) {
293 if (
args[argidx] ==
"-sel_by_cell") {
297 if (
args[argidx] ==
"-sel_by_wire") {
301 if (
args[argidx] ==
"-sel_any_bit") {
305 if (
args[argidx] ==
"-no_outputs") {
309 if (
args[argidx] ==
"-port" && argidx+1 <
args.size()) {
314 if (
args[argidx] ==
"-no_port" && argidx+1 <
args.size()) {
322 if (sel_by_cell && sel_by_wire)
323 log_cmd_error(
"The options -sel_by_cell and -sel_by_wire are exclusive!\n");
325 if (sel_by_cell && sel_any_bit)
326 log_cmd_error(
"The options -sel_by_cell and -sel_any_bit are exclusive!\n");
328 if (!ports.empty() && !no_ports.empty())
329 log_cmd_error(
"The options -port and -no_port are exclusive!\n");
331 log_header(
"Executing SPLICE pass (creating cells for signal splicing).\n");
333 for (
auto &mod_it : design->
modules_)
335 if (!design->
selected(mod_it.second))
338 if (mod_it.second->processes.size()) {
339 log(
"Skipping module %s as it contains processes.\n", mod_it.second->name.c_str());
344 worker.sel_by_cell = sel_by_cell;
345 worker.sel_by_wire = sel_by_wire;
346 worker.sel_any_bit = sel_any_bit;
347 worker.no_outputs = no_outputs;
348 worker.ports = ports;
349 worker.no_ports = no_ports;
bool selected(T1 *module) const
void log_header(const char *format,...)
static std::string escape_id(std::string str)
void log_cmd_error(const char *format,...)
std::map< RTLIL::IdString, RTLIL::Module * > modules_
void log(const char *format,...)
void extra_args(std::vector< std::string > args, size_t argidx, RTLIL::Design *design, bool select=true)