CAN WE PROGRESS THIS, PLEASE?
sc_is_running() and sc_pause(): Previously we concluded the following: 
* Drop the requirement that sc_is_running must return false in destructors 
* Add an sc_core::sc_pause() that is similar to sc_stop but allows 
sc_start to be called again 
* Have an implicit call to sc_pause on return from sc_start except when 
sc_stop has been called 
* Simulation is only PAUSED on return from sc_start without sc_stop having 
been called 
* When simulation is PAUSED, sc_start can be called again (even if paused 
due to event starvation) 
* Add an sc_core::sc_get_status() that returns an enum indicating the 
RUNNING/PAUSE/STOPPED etcetera 
I would propose sc_core::sc_get_status() returns the following 
namespace sc_core 
{ 
  enum sc_status { ... 
 
ELABORATION                                        prior to the first call 
to sc_start or before_end_of_elaboration 
BEFORE_END_OF_ELABORATION          within a callback of that name 
END_OF_ELABORATION                         within a callback of that name 
START_OF_SIMULATION                       within a callback of that name 
RUNNING                                           from the evaluation or 
update phases of the scheduler 
PAUSED                                             within sc_main after 
sc_pause has taken effect 
STOPPED                                            within sc_main after 
sc_stop has taken effect 
END_OF_SIMULATION                         within a callback of that name 
(after sc_stop or, in the absence of sc_start, at the end of simulation) 
                            
if (sc_get_status() == RUNNING) 
  sc_assert( sc_is_running() ); 
Some questions: 
- Exactly when should sc_pause take effect? 
- Is it influenced by sc_set_stop_mode = 
SC_STOP_FINISH_DELTA/SC_STOP_IMMEDIATE? 
- or do we add an sc_set_pause_mode? 
- or do we add a PAUSE argument to sc_stop instead of adding sc_pause? 
- What should sc_is_running return when PAUSED? Tor and I were thinking 
<true>. 
John A 
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu May 20 09:33:47 2010
This archive was generated by hypermail 2.1.8 : Thu May 20 2010 - 09:33:47 PDT