Jump to content

Static order of execution for the SystemC Scheduler


NickIlieskou

Recommended Posts

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 

Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...