Quantcast
Channel: SystemC Language Forum RSS Feed
Viewing all articles
Browse latest Browse all 595

Instantiating N submodules (N is a template parameter)

$
0
0

I'll give a brief example of what I intend to to:

 

template <int N>

SC_MODULE(request_scheduler_m) 
{  
   subblock subblock[N];
 
   void proc();
   
   SC_CTOR(request_scheduler_m)     
   {
      unsigned int i;
 
      for (i = 0; i < N; i++)
      {
         round_robin[N]("subblock instance");
      }
(...)
 
Basically, N subblocks must be instantiated inside request_scheduler and N is a template parameter. The compiler is complaining about the code above. Is it possible to do that?

Viewing all articles
Browse latest Browse all 595

Trending Articles