Adding an "sc_pause" function.

From: Jeremiassen, Tor <tor@ti.com>
Date: Tue Mar 02 2010 - 13:25:16 PST

All,

One issue with SystemC that has been somewhat of a nuisance to us at TI in fully utilizing it's capabilities in our tools is how sc_start() can only be called more than once if it is given a time interval as an argument. That is, there is no way to cause the kernel to pause, return from sc_start(), and be able to be resume execution based on api call or event. Instead, the time at which it is to return has to be pre-determined by the argument to sc_start().

I would like to propose the addition of a function sc_pause() which can be invoked and cause a return from the kernel, while not invoking end_of_simulation and allowing sc_start() to be called again without an argument.

There are three potential points following the sc_pause() call when the scheduler could return:
- Immediately (even in the middle of the delta cycle)
- At the end of the delta cycle
- At the end of the time step

I don't think it is strictly necessary to support all the pause modes (though it would be nice), particularly if the first or first two are expected to cause issues or inefficiencies in the scheduler. I would like to see something similar in behavior to sc_stop, possibly including an sc_set_pause_mode()

Possibly something along the lines of:

enum sc_pause_mode {
SC_PAUSE_IMMEDIATELY, /* optional */
SC_PAUSE_FINISH_DELTA, /* strongly desired, but not absolutely required */
SC_PAUSE_FINISH_TIMESTEP /* required */
};

The availability of such a call would make it easier to interact with the overall host system in a reasonable manner and allow events occurring in simulation to cause restartable escapes out of the scheduler to handle such interactions even in simple systems using sc_main() functions.

Best regards,

Tor Jeremiassen

---
Tor Jeremiassen, Ph.D.
Simulation and Modeling CTO
SDO Foundational Tools
Texas Instruments                    Ph:    281 274 3483
P.O. Box 1443, MS 730                Fax:   281 274 2703
Houston, TX 77251-1443               Email: tor@ti.com<mailto:tor@ti.com>
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Mar 2 13:25:38 2010

This archive was generated by hypermail 2.1.8 : Tue Mar 02 2010 - 13:25:41 PST