Hi,
I'm trying to dynamically allocate N instances of a single module type. I'm trying to use the following algorithm:
int N = 5; TMyModuleType *(module[N]); std::string moduleName; for( unsigned int i =0; i < N; i++ ) { moduleName = std::string::to_string("module[%d]", i); module[N] = new TMyModuleType(moduleName) }
However the module's name is a legacy of sc_module hierarchy (SC_MODULE), which type is sc_module_name and is not compatible with std::string. How should I initialize dynamically allocated modules? I've already tried to use sc_string, but it's not compatible neither.
best regards,
Rafael Kioji