Go to the source code of this file.
Definition at line 25 of file add.cc.
32 if (module->
wires_.count(name) > 0)
33 wire = module->
wires_.at(name);
47 log(
"Module %s already has such an object.\n", module->
name.
c_str());
51 wire = module->
addWire(name, width);
55 if (flag_input || flag_output) {
60 log(
"Added wire %s to module %s.\n", name.c_str(), module->
name.
c_str());
66 for (
auto &it : module->
cells_)
68 if (design->
modules_.count(it.second->type) == 0)
74 if (mod->get_bool_attribute(
"\\blackbox"))
76 if (it.second->hasPort(name))
79 it.second->setPort(name, wire);
80 log(
"Added connection %s to cell %s.%s (%s).\n", name.c_str(), module->
name.
c_str(), it.first.c_str(), it.second->type.c_str());
const char * c_str() const
std::map< RTLIL::IdString, RTLIL::Wire * > wires_
static std::string escape_id(std::string str)
RTLIL::Wire * addWire(RTLIL::IdString name, int width=1)
bool selected_whole_module(RTLIL::IdString mod_name) const
void log_cmd_error(const char *format,...)
virtual size_t count_id(RTLIL::IdString id)
std::map< RTLIL::IdString, RTLIL::Module * > modules_
std::map< RTLIL::IdString, RTLIL::Cell * > cells_
void log(const char *format,...)