Hi all,
I have a following design:
I have created a the following Module (in SystemC)
Task Module: (Thread)
This module gets the load of each task, calculate the remaining time, stores the remaining Time in a global "list" called "ActivationTimings" and sends a signal to Timer Module
Timer Module
This Module recieves signal from all the task and choose the minimum value from the "ActivationTiming"and advances the Time through event. And the Task Module is sensitive to the event
The above things happens till the remaining times of all tasks are zero.
Since I need to resue the code, I used Array of ports to communicate. My elaboration would look as follows:
{
Task *A = new Task("Module Name", .....Task Parameters like speed, load.....);
Task *B = new Task("Module Name"..... T);
sc_signal<bool> connect[2];
A->outputTask(connect[0]); // outTask is the output port of "Task" Module
B->outputTask(connect[1]);
Timer T("Timer");
for(int i=0;i<2;i++)
{
T.InputTimer[i](connect[i]); // Using Array of Ports(InputTimer[1]) in Timer Module
}
sc_start();
}
The code works perfectly. but, when i am trying to run the simulation for several iterations,
like,
for(int i=0;i<100;i++)
{
sc_start(...);
}
the simulation time gets degraded .
Is array of ports reason for this slowdown?? And If so, Why?
Thanks