00001 /***************************************************************************** 00002 00003 The following code is derived, directly or indirectly, from the SystemC 00004 source code Copyright (c) 1996-2014 by all Contributors. 00005 All Rights reserved. 00006 00007 The contents of this file are subject to the restrictions and limitations 00008 set forth in the SystemC Open Source License (the "License"); 00009 You may not use this file except in compliance with such restrictions and 00010 limitations. You may obtain instructions on how to receive a copy of the 00011 License at http://www.accellera.org/. Software distributed by Contributors 00012 under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 00013 ANY KIND, either express or implied. See the License for the specific 00014 language governing rights and limitations under the License. 00015 00016 *****************************************************************************/ 00017 00018 /***************************************************************************** 00019 00020 sc_status.h -- Definition of the simulation phases 00021 00022 Original Author: Philipp A. Hartmann, OFFIS, 2013-02-15 00023 00024 CHANGE LOG AT THE END OF THE FILE 00025 *****************************************************************************/ 00026 00027 #ifndef SC_STATUS_H_INCLUDED_ 00028 #define SC_STATUS_H_INCLUDED_ 00029 00030 #include <iosfwd> 00031 00032 namespace sc_core { 00033 00034 // simulation status codes 00035 00036 const int SC_SIM_OK = 0; 00037 const int SC_SIM_ERROR = 1; 00038 const int SC_SIM_USER_STOP = 2; 00039 00040 enum sc_status 00041 { // sc_get_status values: 00042 SC_UNITIALIZED=0x00, // initialize() not called yet 00043 00044 SC_ELABORATION = 0x01, // during module hierarchy construction 00045 SC_BEFORE_END_OF_ELABORATION = 0x02, // during before_end_of_elaboration() 00046 SC_END_OF_ELABORATION = 0x04, // during end_of_elaboration() 00047 SC_START_OF_SIMULATION = 0x08, // during start_of_simulation() 00048 00049 SC_RUNNING = 0x10, // initialization, evaluation or update 00050 SC_PAUSED = 0x20, // when scheduler stopped by sc_pause() 00051 SC_STOPPED = 0x40, // when scheduler stopped by sc_stop() 00052 SC_END_OF_SIMULATION = 0x80, // during end_of_simulation() 00053 00054 // detailed simulation phases (for dynamic callbacks) 00055 SC_END_OF_INITIALIZATION = 0x100, // after initialization 00056 // SC_END_OF_EVALUATION = 0x200, // between eval and update 00057 SC_END_OF_UPDATE = 0x400, // after update/notify phase 00058 SC_BEFORE_TIMESTEP = 0x800, // before next time step 00059 00060 SC_STATUS_LAST = SC_BEFORE_TIMESTEP, 00061 SC_STATUS_ANY = 0xdff 00062 }; 00063 00064 // pretty-printing of sc_status values 00065 std::ostream& operator << ( std::ostream&, sc_status ); 00066 00067 } // namespace sc_core 00068 00069 /***************************************************************************** 00070 00071 MODIFICATION LOG - modifiers, enter your name, affiliation, date and 00072 changes you are making here. 00073 00074 Name, Affiliation, Date: 00075 Description of Modification: 00076 00077 *****************************************************************************/ 00078 00079 #endif /* SC_STATUS_H_INCLUDED_ */ 00080 // Taf! 00081