33 log(
" copy old_name new_name\n");
35 log(
"Copy the specified module. Note that selection patterns are not supported\n");
36 log(
"by this command.\n");
47 if (design->
modules_.count(src_name) == 0)
48 log_cmd_error(
"Can't find source module %s.\n", src_name.c_str());
50 if (design->
modules_.count(trg_name) != 0)
51 log_cmd_error(
"Target module name %s already exists.\n", trg_name.c_str());
54 new_mod->
name = trg_name;
virtual void execute(std::vector< std::string > args, RTLIL::Design *design)
void add(RTLIL::Module *module)
static std::string escape_id(std::string str)
#define PRIVATE_NAMESPACE_BEGIN
#define PRIVATE_NAMESPACE_END
void log_cmd_error(const char *format,...)
RTLIL::Module * module(RTLIL::IdString name)
#define USING_YOSYS_NAMESPACE
std::map< RTLIL::IdString, RTLIL::Module * > modules_
void log(const char *format,...)
virtual RTLIL::Module * clone() const