00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef SC_SIMCONTEXT_H
00029 #define SC_SIMCONTEXT_H
00030
00031 #include "sysc/kernel/sc_cmnhdr.h"
00032 #include "sysc/kernel/sc_process.h"
00033 #include "sysc/kernel/sc_status.h"
00034 #include "sysc/kernel/sc_time.h"
00035 #include "sysc/utils/sc_hash.h"
00036 #include "sysc/utils/sc_pq.h"
00037 #include <list>
00038 #include <string.h>
00039
00040
00041 namespace sc_core {
00042
00043
00044
00045 class sc_cor;
00046 class sc_cor_pkg;
00047 class sc_event;
00048 class sc_event_timed;
00049 class sc_export_registry;
00050 class sc_module;
00051 class sc_module_name;
00052 class sc_module_registry;
00053 class sc_name_gen;
00054 class sc_object;
00055 class sc_object_manager;
00056 class sc_phase_callback_registry;
00057 class sc_process_handle;
00058 class sc_port_registry;
00059 class sc_prim_channel_registry;
00060 class sc_process_table;
00061 class sc_signal_bool_deval;
00062 class sc_trace_file;
00063 class sc_runnable;
00064 class sc_process_host;
00065 class sc_method_process;
00066 class sc_cthread_process;
00067 class sc_thread_process;
00068
00069 template< typename > class sc_plist;
00070 typedef sc_plist< sc_process_b* > sc_process_list;
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 enum sc_stop_mode {
00082 SC_STOP_FINISH_DELTA,
00083 SC_STOP_IMMEDIATE
00084 };
00085 extern void sc_set_stop_mode( sc_stop_mode mode );
00086 extern sc_stop_mode sc_get_stop_mode();
00087
00088 enum sc_starvation_policy
00089 {
00090 SC_EXIT_ON_STARVATION,
00091 SC_RUN_TO_TIME
00092 };
00093 extern void sc_start();
00094 extern void sc_start( const sc_time& duration,
00095 sc_starvation_policy p=SC_RUN_TO_TIME );
00096 inline void sc_start( int duration, sc_time_unit unit,
00097 sc_starvation_policy p=SC_RUN_TO_TIME )
00098 {
00099 sc_start( sc_time((double)duration,unit), p );
00100 }
00101
00102 inline void sc_start( double duration, sc_time_unit unit,
00103 sc_starvation_policy p=SC_RUN_TO_TIME )
00104 {
00105 sc_start( sc_time(duration,unit), p );
00106 }
00107
00108 extern void sc_stop();
00109
00110
00111 extern bool _SYSC_SYNC_PAR_SIM;
00112
00113
00114
00115 sc_dt::uint64 sc_delta_count();
00116 const std::vector<sc_event*>& sc_get_top_level_events(
00117 const sc_simcontext* simc_p);
00118 const std::vector<sc_object*>& sc_get_top_level_objects(
00119 const sc_simcontext* simc_p);
00120 bool sc_is_running( const sc_simcontext* simc_p );
00121 void sc_pause();
00122 bool sc_end_of_simulation_invoked();
00123 void sc_start( const sc_time&, sc_starvation_policy );
00124 bool sc_start_of_simulation_invoked();
00125 void sc_set_time_resolution( double, sc_time_unit );
00126 sc_time sc_get_time_resolution();
00127 void sc_set_default_time_unit( double, sc_time_unit );
00128 sc_time sc_get_default_time_unit();
00129 bool sc_pending_activity_at_current_time( const sc_simcontext* );
00130 bool sc_pending_activity_at_future_time( const sc_simcontext* );
00131 sc_time sc_time_to_pending_activity( const sc_simcontext* );
00132
00133 struct sc_invoke_method;
00134
00138
00139 struct sc_kernel_lock {
00140 sc_simcontext* simc_p;
00141 sc_cor* m_cor_p;
00142 explicit sc_kernel_lock();
00143 ~sc_kernel_lock();
00144 };
00145
00149
00150 extern bool _OoO_Data_Conflict_Table[];
00151
00155
00156 extern unsigned int _OoO_Data_Conflict_Table_Size;
00157
00161
00162 extern bool _OoO_Event_Notify_Table[];
00163
00167
00168 extern unsigned int _OoO_Event_Notify_Table_Size;
00169
00174
00175 extern int _OoO_Conflict_Index_Lookup_Table[];
00176
00180
00181 extern unsigned int _OoO_Max_Number_of_Instances;
00182
00186
00187 extern unsigned int _OoO_Number_of_Segments;
00188
00193
00194 extern long long _OoO_Curr_Time_Advance_Table_Time[];
00195
00200
00201 extern int _OoO_Curr_Time_Advance_Table_Delta[];
00202
00206
00207 extern unsigned int _OoO_Curr_Time_Advance_Table_Size;
00208
00213
00214 extern long long _OoO_Next_Time_Advance_Table_Time[];
00215
00220
00221 extern int _OoO_Next_Time_Advance_Table_Delta[];
00222
00226
00227 extern unsigned int _OoO_Next_Time_Advance_Table_Size;
00228
00232
00233 extern int _OoO_Time_Advance_Index_Lookup_Table[];
00234
00238
00239 extern unsigned int _OoO_Time_Advance_Index_Lookup_Table_Size;
00240
00241
00247 class sc_simcontext
00248 {
00249 friend struct sc_invoke_method;
00250 friend class sc_event;
00251 friend class sc_module;
00252
00253
00254 friend class sc_channel;
00255
00256 friend class sc_object;
00257 friend class sc_time;
00258 friend class sc_clock;
00259 friend class sc_method_process;
00260 friend class sc_phase_callback_registry;
00261 friend class sc_process_b;
00262 friend class sc_process_handle;
00263 friend class sc_prim_channel;
00264 friend class sc_cthread_process;
00265 friend class sc_thread_process;
00266 friend sc_dt::uint64 sc_delta_count();
00267 friend const std::vector<sc_event*>& sc_get_top_level_events(
00268 const sc_simcontext* simc_p);
00269 friend const std::vector<sc_object*>& sc_get_top_level_objects(
00270 const sc_simcontext* simc_p);
00271 friend bool sc_is_running( const sc_simcontext* simc_p );
00272 friend void sc_pause();
00273 friend bool sc_end_of_simulation_invoked();
00274 friend void sc_start( const sc_time&, sc_starvation_policy );
00275 friend bool sc_start_of_simulation_invoked();
00276 friend void sc_thread_cor_fn(void*);
00277 friend sc_time sc_time_to_pending_activity( const sc_simcontext* );
00278 friend bool sc_pending_activity_at_current_time( const sc_simcontext* );
00279 friend bool sc_pending_activity_at_future_time( const sc_simcontext* );
00280
00281
00282 friend struct sc_kernel_lock;
00283
00284
00285 friend sc_cor* get_cor_pointer( sc_process_b* process_p );
00286
00287
00288 void init();
00289 void clean();
00290
00291 public:
00292
00293 sc_simcontext();
00294 ~sc_simcontext();
00295
00296 void initialize( bool = false );
00297
00302
00303 void cycle( const sc_time& );
00304
00305 void simulate( const sc_time& duration );
00306 void stop();
00307 void end();
00308 void reset();
00309
00310
00311
00312
00318
00319
00320
00324
00325 void oooschedule( sc_cor *cor );
00326
00327 int sim_status() const;
00328 bool elaboration_done() const;
00329
00330 std::vector<sc_thread_handle>& get_active_invokers();
00331
00332 sc_object_manager* get_object_manager();
00333
00334 inline sc_status get_status() const;
00335
00336 sc_object* active_object();
00337
00338 void hierarchy_push( sc_module* );
00339 sc_module* hierarchy_pop();
00340 sc_module* hierarchy_curr() const;
00341 sc_object* first_object();
00342 sc_object* next_object();
00343 sc_object* find_object( const char* name );
00344
00345 sc_module_registry* get_module_registry();
00346 sc_port_registry* get_port_registry();
00347 sc_export_registry* get_export_registry();
00348 sc_prim_channel_registry* get_prim_channel_registry();
00349
00350
00351 const char* gen_unique_name( const char* basename_,
00352 bool preserve_first = false
00353 );
00354
00355
00356
00361
00362
00363 sc_process_handle create_cthread_process(
00364 const char* name_p, bool free_host, SC_ENTRY_FUNC method_p,
00365 sc_process_host* host_p, const sc_spawn_options* opt_p,
00366 int seg_id, int inst_id );
00367
00372
00373
00374 sc_process_handle create_method_process(
00375 const char* name_p, bool free_host, SC_ENTRY_FUNC method_p,
00376 sc_process_host* host_p, const sc_spawn_options* opt_p,
00377 int seg_id, int inst_id );
00378
00383
00384
00385 sc_process_handle create_thread_process(
00386 const char* name_p, bool free_host, SC_ENTRY_FUNC method_p,
00387 sc_process_host* host_p, const sc_spawn_options* opt_p,
00388 int seg_id, int inst_id );
00389
00390
00391
00392
00393 sc_process_b* get_curr_proc() const;
00394 sc_object* get_current_writer() const;
00395 bool write_check() const;
00396
00401
00402 void set_curr_proc( sc_process_b* );
00403
00404 void reset_curr_proc();
00405
00406 int next_proc_id();
00407
00408 void add_trace_file( sc_trace_file* );
00409 void remove_trace_file( sc_trace_file* );
00410
00411 friend void sc_set_time_resolution( double, sc_time_unit );
00412 friend sc_time sc_get_time_resolution();
00413 friend void sc_set_default_time_unit( double, sc_time_unit );
00414 friend sc_time sc_get_default_time_unit();
00415
00416 const sc_time& max_time() const;
00417
00418
00419 const sc_time& time_stamp() const;
00420
00421 sc_dt::uint64 change_stamp() const;
00422
00423
00424 sc_dt::uint64 delta_count() const;
00425
00426 bool event_occurred( sc_dt::uint64 last_change_count ) const;
00427 bool evaluation_phase() const;
00428 bool is_running() const;
00429 bool update_phase() const;
00430 bool notify_phase() const;
00431 bool get_error();
00432 void set_error( sc_report* );
00433
00434 sc_cor_pkg* cor_pkg()
00435 { return m_cor_pkg; }
00436 sc_cor* next_cor();
00437
00438 const ::std::vector<sc_object*>& get_child_objects() const;
00439
00440 void elaborate();
00441 void prepare_to_simulate();
00442
00447
00448 inline void initial_crunch( bool no_crunch );
00449
00450 bool next_time( sc_time& t ) const;
00451 bool pending_activity_at_current_time() const;
00452
00456
00457 void remove_running_process( sc_process_b* );
00458
00462
00463 bool is_running_process( sc_process_b* );
00464
00468
00469 void suspend_cor( sc_cor* );
00470
00474
00475 void resume_cor( sc_cor* );
00476
00480
00481 bool is_locked();
00482
00486
00487 bool is_unlocked();
00488
00493
00494 bool is_lock_owner();
00495
00500
00501 bool is_not_owner();
00502
00507
00508 bool is_locked_and_owner();
00509
00514
00515 unsigned int conflict_table_index_lookup( int, int );
00516
00520
00521 unsigned int time_adv_table_index_lookup( int );
00522
00523 private:
00524
00525 void add_child_event( sc_event* );
00526 void add_child_object( sc_object* );
00527 void remove_child_event( sc_event* );
00528 void remove_child_object( sc_object* );
00529
00530
00531
00532 int add_delta_event( sc_event* );
00533 void remove_delta_event( sc_event* );
00534 void add_timed_event( sc_event_timed* );
00535
00536 void trace_cycle( bool delta_cycle );
00537
00538 const ::std::vector<sc_event*>& get_child_events_internal() const;
00539 const ::std::vector<sc_object*>& get_child_objects_internal() const;
00540
00541 void execute_method_next( sc_method_handle );
00542 void execute_thread_next( sc_thread_handle );
00543
00544 sc_method_handle pop_runnable_method();
00545 sc_thread_handle pop_runnable_thread();
00546
00551
00552 void preempt_with( sc_method_handle );
00553
00558
00559 inline void preempt_with( sc_thread_handle );
00560
00561 void push_runnable_method( sc_method_handle );
00562 void push_runnable_thread( sc_thread_handle );
00563
00564 void push_runnable_method_front( sc_method_handle );
00565 void push_runnable_thread_front( sc_thread_handle );
00566
00567 void remove_runnable_method( sc_method_handle );
00568 void remove_runnable_thread( sc_thread_handle );
00569
00570 void requeue_current_process();
00571 void suspend_current_process();
00572
00573 void do_sc_stop_action();
00574 void mark_to_collect_process( sc_process_b* zombie_p );
00575
00579
00580 void acquire_sched_mutex();
00581
00585
00586 void release_sched_mutex();
00587
00591
00592 bool has_no_conflicts( sc_process_b* );
00593
00597
00598 bool conflict_between( sc_process_b*, sc_process_b* );
00599
00600
00601 private:
00602
00603 enum execution_phases {
00604 phase_initialize = 0,
00605 phase_evaluate,
00606 phase_update,
00607 phase_notify
00608 };
00609 sc_object_manager* m_object_manager;
00610
00611 sc_module_registry* m_module_registry;
00612 sc_port_registry* m_port_registry;
00613 sc_export_registry* m_export_registry;
00614 sc_prim_channel_registry* m_prim_channel_registry;
00615 sc_phase_callback_registry* m_phase_cb_registry;
00616
00617 sc_name_gen* m_name_gen;
00618
00619 sc_process_table* m_process_table;
00620
00621
00622
00623
00624 std::list<sc_process_b*> m_curr_proc_queue;
00625
00626
00627
00628
00629
00630
00631
00632 bool m_write_check;
00633 int m_next_proc_id;
00634
00635 std::vector<sc_thread_handle> m_active_invokers;
00636
00637 std::vector<sc_event*> m_child_events;
00638 std::vector<sc_object*> m_child_objects;
00639
00640 std::vector<sc_event*> m_delta_events;
00641 sc_ppq<sc_event_timed*>* m_timed_events;
00642
00643 std::vector<sc_trace_file*> m_trace_files;
00644 bool m_something_to_trace;
00645
00646 sc_runnable* m_runnable;
00647 sc_process_list* m_collectable;
00648
00649 sc_time_params* m_time_params;
00650
00651
00652
00653
00654 mutable sc_time m_max_time;
00655
00656 sc_invoke_method* m_method_invoker_p;
00657 sc_dt::uint64 m_change_stamp;
00658
00659
00660
00661
00662 bool m_forced_stop;
00663 bool m_paused;
00664 bool m_ready_to_simulate;
00665 bool m_elaboration_done;
00666 execution_phases m_execution_phase;
00667 sc_report* m_error;
00668 bool m_in_simulator_control;
00669 bool m_end_of_simulation_called;
00670 sc_status m_simulation_status;
00671 bool m_start_of_simulation_called;
00672
00673 sc_cor_pkg* m_cor_pkg;
00674 sc_cor* m_cor;
00675
00676
00677
00678 bool m_one_delta_cycle;
00679 bool m_one_timed_cycle;
00680 sc_time m_finish_time;
00681
00682 private:
00683
00684
00685 sc_simcontext( const sc_simcontext& );
00686 sc_simcontext& operator = ( const sc_simcontext& );
00687 };
00688
00689
00690
00691
00692
00693 #if 1
00694 extern sc_simcontext* sc_curr_simcontext;
00695 extern sc_simcontext* sc_default_global_context;
00696
00697 inline sc_simcontext*
00698 sc_get_curr_simcontext()
00699 {
00700 if( sc_curr_simcontext == 0 ) {
00701 sc_default_global_context = new sc_simcontext;
00702 sc_curr_simcontext = sc_default_global_context;
00703 }
00704 return sc_curr_simcontext;
00705 }
00706 #else
00707 extern sc_simcontext* sc_get_curr_simcontext();
00708 #endif // 0
00709 inline sc_status sc_get_status()
00710 {
00711 return sc_get_curr_simcontext()->get_status();
00712 }
00713
00714
00715
00716
00717 inline
00718 bool
00719 sc_simcontext::elaboration_done() const
00720 {
00721 return m_elaboration_done;
00722 }
00723
00724
00725 inline sc_status sc_simcontext::get_status() const
00726 {
00727 return m_simulation_status != SC_RUNNING ?
00728 m_simulation_status :
00729 (m_in_simulator_control ? SC_RUNNING : SC_PAUSED);
00730 }
00731
00732 inline
00733 int
00734 sc_simcontext::sim_status() const
00735 {
00736 if( m_error ) {
00737 return SC_SIM_ERROR;
00738 }
00739 if( m_forced_stop ) {
00740 return SC_SIM_USER_STOP;
00741 }
00742 return SC_SIM_OK;
00743 }
00744
00745
00746 inline
00747 sc_object_manager*
00748 sc_simcontext::get_object_manager()
00749 {
00750 return m_object_manager;
00751 }
00752
00753 inline
00754 sc_module_registry*
00755 sc_simcontext::get_module_registry()
00756 {
00757 return m_module_registry;
00758 }
00759
00760 inline
00761 sc_port_registry*
00762 sc_simcontext::get_port_registry()
00763 {
00764 return m_port_registry;
00765 }
00766
00767 inline
00768 sc_export_registry*
00769 sc_simcontext::get_export_registry()
00770 {
00771 return m_export_registry;
00772 }
00773
00774 inline
00775 sc_prim_channel_registry*
00776 sc_simcontext::get_prim_channel_registry()
00777 {
00778 return m_prim_channel_registry;
00779 }
00780
00781
00782 inline
00783 int
00784 sc_simcontext::next_proc_id()
00785 {
00786 return ( ++ m_next_proc_id );
00787 }
00788
00789
00790 inline
00791 const sc_time&
00792 sc_simcontext::max_time() const
00793 {
00794 if ( m_max_time == SC_ZERO_TIME )
00795 {
00796 m_max_time = sc_time::from_value( ~sc_dt::UINT64_ZERO );
00797 }
00798 return m_max_time;
00799 }
00800
00801 inline
00802 sc_dt::uint64
00803 sc_simcontext::change_stamp() const
00804 {
00805 return m_change_stamp;
00806 }
00807
00808 inline
00809 const sc_time&
00810 sc_simcontext::time_stamp() const
00811 {
00812
00813
00814
00815 sc_process_b* proc = get_curr_proc();
00816 static sc_time zero_time = sc_time::from_value( 0 );
00817
00818 if ( proc )
00819 return proc->get_timestamp().get_time_count();
00820 else
00821 return zero_time;
00822 }
00823
00824
00825 inline
00826 bool
00827 sc_simcontext::event_occurred(sc_dt::uint64 last_change_stamp) const
00828 {
00829 return m_change_stamp == last_change_stamp;
00830 }
00831
00832 inline
00833 bool
00834 sc_simcontext::evaluation_phase() const
00835 {
00836 return (m_execution_phase == phase_evaluate) &&
00837 m_ready_to_simulate;
00838 }
00839
00840 inline
00841 bool
00842 sc_simcontext::update_phase() const
00843 {
00844 return m_execution_phase == phase_update;
00845 }
00846
00847 inline
00848 bool
00849 sc_simcontext::notify_phase() const
00850 {
00851 return m_execution_phase == phase_notify;
00852 }
00853
00854 inline
00855 void
00856 sc_simcontext::set_error( sc_report* err )
00857 {
00858 delete m_error;
00859 m_error = err;
00860 }
00861
00862
00863 inline
00864 bool
00865 sc_simcontext::get_error()
00866 {
00867 return m_error != NULL;
00868 }
00869
00870 inline
00871 int
00872 sc_simcontext::add_delta_event( sc_event* e )
00873 {
00874 m_delta_events.push_back( e );
00875 return ( m_delta_events.size() - 1 );
00876 }
00877
00878 inline
00879 void
00880 sc_simcontext::add_timed_event( sc_event_timed* et )
00881 {
00882 m_timed_events->insert( et );
00883 }
00884
00885 inline sc_object*
00886 sc_simcontext::get_current_writer() const
00887 {
00888
00889 return m_write_check ? get_curr_proc() : (sc_object*)0;
00890 }
00891
00892 inline bool
00893 sc_simcontext::write_check() const
00894 {
00895 return m_write_check;
00896 }
00897
00898 inline void
00899 sc_simcontext::remove_running_process( sc_process_b* proc )
00900 {
00901 m_curr_proc_queue.remove( proc );
00902 }
00903
00904 inline bool
00905 sc_simcontext::is_running_process( sc_process_b* proc )
00906 {
00907 for ( std::list<sc_process_b*>::iterator it = m_curr_proc_queue.begin();
00908 it != m_curr_proc_queue.end(); it++ )
00909 if ( *it == proc )
00910 return true;
00911 return false;
00912 }
00913
00914
00915
00916
00917 class sc_process_handle;
00918 sc_process_handle sc_get_current_process_handle();
00919
00920
00921
00922
00923
00924
00925
00926 inline sc_object*
00927 sc_get_current_object()
00928 {
00929 return sc_get_curr_simcontext()->active_object();
00930 }
00931
00932 inline
00933 sc_process_b*
00934 sc_get_current_process_b()
00935 {
00936 return sc_get_curr_simcontext()->get_curr_proc();
00937 }
00938
00939
00940 extern sc_process_b* sc_get_curr_process_handle();
00941
00942 inline
00943 sc_curr_proc_kind
00944 sc_get_curr_process_kind()
00945 {
00946 return sc_get_curr_simcontext()->get_curr_proc()->proc_kind();
00947 }
00948
00949
00950 inline int sc_get_simulator_status()
00951 {
00952 return sc_get_curr_simcontext()->sim_status();
00953 }
00954
00955
00956
00957 extern
00958 const char*
00959 sc_gen_unique_name( const char* basename_, bool preserve_first = false );
00960
00961
00962
00963 extern
00964 void
00965 sc_set_random_seed( unsigned int seed_ );
00966
00967
00968 extern void sc_initialize();
00969
00970 extern const sc_time& sc_max_time();
00971 extern const sc_time& sc_time_stamp();
00972 extern double sc_simulation_time();
00973
00974 inline
00975 const std::vector<sc_event*>& sc_get_top_level_events(
00976 const sc_simcontext* simc_p = sc_get_curr_simcontext() )
00977 {
00978 return simc_p->m_child_events;
00979 }
00980
00981 inline
00982 const std::vector<sc_object*>& sc_get_top_level_objects(
00983 const sc_simcontext* simc_p = sc_get_curr_simcontext() )
00984 {
00985 return simc_p->m_child_objects;
00986 }
00987
00988 extern sc_event* sc_find_event( const char* name );
00989
00990 extern sc_object* sc_find_object( const char* name );
00991
00995 inline
00996 sc_dt::uint64 sc_delta_count()
00997 {
00998
00999
01000
01001 sc_process_b* proc = sc_get_current_process_b();
01002
01003 if ( proc )
01004 return proc->get_timestamp().get_delta_count();
01005 else
01006 return 0;
01007 }
01008
01009 inline
01010 bool sc_is_running( const sc_simcontext* simc_p = sc_get_curr_simcontext() )
01011 {
01012 return simc_p->m_ready_to_simulate;
01013 }
01014
01015 bool sc_is_unwinding();
01016
01017 inline void sc_pause()
01018 {
01019 sc_get_curr_simcontext()->m_paused = true;
01020 }
01021
01022
01023
01024 inline bool sc_pending_activity_at_current_time
01025 ( const sc_simcontext* simc_p = sc_get_curr_simcontext() )
01026 {
01027 return simc_p->pending_activity_at_current_time();
01028 }
01029
01030
01031
01032 inline bool sc_pending_activity_at_future_time
01033 ( const sc_simcontext* simc_p = sc_get_curr_simcontext() )
01034 {
01035 sc_time ignored;
01036 return simc_p->next_time( ignored );
01037 }
01038
01039
01040
01041
01042 inline bool sc_pending_activity
01043 ( const sc_simcontext* simc_p = sc_get_curr_simcontext() )
01044 {
01045 return sc_pending_activity_at_current_time( simc_p )
01046 || sc_pending_activity_at_future_time( simc_p );
01047 }
01048
01049 sc_time
01050 sc_time_to_pending_activity
01051 ( const sc_simcontext* simc_p = sc_get_curr_simcontext() );
01052
01053
01054 inline
01055 bool
01056 sc_end_of_simulation_invoked()
01057 {
01058 return sc_get_curr_simcontext()->m_end_of_simulation_called;
01059 }
01060
01061 inline bool sc_hierarchical_name_exists( const char* name )
01062 {
01063 return sc_find_object(name) || sc_find_event(name);
01064 }
01065
01066 inline
01067 bool
01068 sc_start_of_simulation_invoked()
01069 {
01070 return sc_get_curr_simcontext()->m_start_of_simulation_called;
01071 }
01072
01073
01074
01075
01076
01077 extern bool sc_allow_process_control_corners;
01078
01079 }
01080
01081
01082
01083
01084
01085
01086
01087
01088
01089
01090
01091
01092
01093
01094
01095
01096
01097
01098
01099
01100
01101
01102
01103
01104
01105
01106
01107
01108
01109
01110
01111
01112
01113
01114
01115
01116
01117
01118
01119
01120
01121
01122
01123
01124
01125
01126
01127
01128
01129
01130
01131
01132
01133
01134
01135
01136
01137
01138
01139
01140
01141
01142
01143
01144
01145
01146
01147
01148
01149
01150
01151
01152
01153
01154
01155
01156
01157
01158
01159
01160
01161
01162
01163
01164
01165
01166
01167
01168
01169
01170
01171
01172
01173
01174
01175
01176
01177
01178
01179
01180
01181
01182
01183
01184
01185
01186
01187
01188
01189
01190
01191
01192
01193
01194
01195
01196
01197
01198
01199
01200
01201
01202
01203
01204
01205
01206
01207
01208
01209
01210
01211
01212
01213
01214
01215
01216
01217
01218
01219
01220
01221
01222
01223
01224
01225
01226
01227
01228
01229
01230
01231
01232
01233
01234
01235
01236
01237
01238
01239
01240
01241
01242
01243
01244
01245
01246
01247
01248
01249 #endif