NickIlieskou

Static order of execution for the SystemC Scheduler

5 posts in this topic

Hello to everyone, 

 

I would like to ask if it is possible to give a static order for a number of processes in the SystemC Scheduler. Suppose we have 4 processes a,b,c and d. I would like for each clock tick to trigger the processes in the following way: 

 

clock tick=1     a,b,c,a,b,c,a,b,c,d,d,d

clock tick=2     a,b,c,a,b,c,a,b,c,d,d,d

clock tick=3     a,b,c,a,b,c,a,b,c,d,d,d

clock tick=4     a,b,c,a,b,c,a,b,c,d,d,d

....

 

Thank you in advance 

Share this post


Link to post
Share on other sites

No. The evaluation order of runnable processes is implementation-defined in SystemC, see IEEE 1666-2011, 4.2.1.2. There is no (standardized) backdoor API to influence the process scheduling of the kernel.

 

Of course, you can add additional layers of scheduling on top of the SystemC scheduler, e.g. by defining your process dependencies and notifying properly crafted sc_events to trigger the successor process(es).

 

Another option might be to model the system with the SystemC AMS extensions, which provides the timed dataflow (TDF) model of computation.  But this somewhat depends on the real requirements.  Additionally, the resulting TDF schedule can only be implicitly defined by constraining the scheduler in terms of process dependencies (AFAIK).
 

Greetings from Oldenburg,
  Philipp

maehne likes this

Share this post


Link to post
Share on other sites

Hello to everyone, 

 

I would like to ask if it is possible to give a static order for a number of processes in the SystemC Scheduler. Suppose we have 4 processes a,b,c and d. I would like for each clock tick to trigger the processes in the following way: 

 

clock tick=1     a,b,c,a,b,c,a,b,c,d,d,d

clock tick=2     a,b,c,a,b,c,a,b,c,d,d,d

clock tick=3     a,b,c,a,b,c,a,b,c,d,d,d

clock tick=4     a,b,c,a,b,c,a,b,c,d,d,d

....

 

Thank you in advance 

 

The standard doesn't provide any "hooks" by which the user can control the order in which the processes must trigger. The standard only says (my emphasis):

 

The order in which process instances are selected from the set of runnable processes is implementation-

defined. However, if a specific version of a specific implementation runs a specific application using a

specific input data set, the order of process execution shall not vary from run to run.

Share this post


Link to post
Share on other sites

Hello to everyone, 

 

I would like to ask if it is possible to give a static order for a number of processes in the SystemC Scheduler. Suppose we have 4 processes a,b,c and d. I would like for each clock tick to trigger the processes in the following way: 

 

clock tick=1     a,b,c,a,b,c,a,b,c,d,d,d

clock tick=2     a,b,c,a,b,c,a,b,c,d,d,d

clock tick=3     a,b,c,a,b,c,a,b,c,d,d,d

clock tick=4     a,b,c,a,b,c,a,b,c,d,d,d

....

 

Thank you in advance 

Impossible to achieve as thread scheduling is controlled fully by the underlying

operating system's thread scheduler. Hope that helps.

Share this post


Link to post
Share on other sites

Impossible to achieve as thread scheduling is controlled fully by the underlying operating system's thread scheduler.

 

This is not true. The OS scheduler has nothing to do with the SystemC process scheduler, see my recent answer here.

 

/Philipp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now