sc_module_registry.h revision 12027:1eb7dc7aa10b
1955SN/A/***************************************************************************** 2955SN/A 31762SN/A Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4955SN/A more contributor license agreements. See the NOTICE file distributed 5955SN/A with this work for additional information regarding copyright ownership. 6955SN/A Accellera licenses this file to you under the Apache License, Version 2.0 7955SN/A (the "License"); you may not use this file except in compliance with the 8955SN/A License. You may obtain a copy of the License at 9955SN/A 10955SN/A http://www.apache.org/licenses/LICENSE-2.0 11955SN/A 12955SN/A Unless required by applicable law or agreed to in writing, software 13955SN/A distributed under the License is distributed on an "AS IS" BASIS, 14955SN/A WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 15955SN/A implied. See the License for the specific language governing 16955SN/A permissions and limitations under the License. 17955SN/A 18955SN/A *****************************************************************************/ 19955SN/A 20955SN/A/***************************************************************************** 21955SN/A 22955SN/A sc_module_registry.h -- Registry for all modules. 23955SN/A FOR INTERNAL USE ONLY. 24955SN/A 25955SN/A Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21 26955SN/A 27955SN/A CHANGE LOG AT THE END OF THE FILE 282665Ssaidi@eecs.umich.edu *****************************************************************************/ 292665Ssaidi@eecs.umich.edu 30955SN/A 31955SN/A#ifndef SC_MODULE_REGISTRY_H 32955SN/A#define SC_MODULE_REGISTRY_H 331608SN/A 34955SN/A 35955SN/Anamespace sc_core { 36955SN/A 37955SN/Aclass sc_module; 38955SN/Aclass sc_simcontext; 39955SN/A 40955SN/A 41955SN/A// ---------------------------------------------------------------------------- 42955SN/A// CLASS : sc_module_registry 43955SN/A// 44955SN/A// Registry for all modules. 45955SN/A// FOR INTERNAL USE ONLY! 46955SN/A// ---------------------------------------------------------------------------- 47955SN/A 482023SN/Aclass sc_module_registry 49955SN/A{ 503089Ssaidi@eecs.umich.edu friend class sc_simcontext; 51955SN/A 52955SN/Apublic: 53955SN/A 54955SN/A void insert( sc_module& ); 55955SN/A void remove( sc_module& ); 56955SN/A 57955SN/A int size() const 58955SN/A { return m_module_vec.size(); } 591031SN/A 60955SN/Aprivate: 611388SN/A 62955SN/A // constructor 63955SN/A explicit sc_module_registry( sc_simcontext& simc_ ); 641296SN/A 65955SN/A // destructor 66955SN/A ~sc_module_registry(); 67955SN/A 68955SN/A // called when construction is done 69955SN/A bool construction_done(); 70955SN/A 71955SN/A // called when elaboration is done 72955SN/A void elaboration_done(); 73955SN/A 74955SN/A // called before simulation begins 75955SN/A void start_simulation(); 76955SN/A 77955SN/A // called after simulation ends 78955SN/A void simulation_done(); 79955SN/A 80955SN/A 81955SN/Aprivate: 82955SN/A 83955SN/A int m_construction_done; 842325SN/A std::vector<sc_module*> m_module_vec; 851717SN/A sc_simcontext* m_simc; 862652Ssaidi@eecs.umich.edu 87955SN/Aprivate: 882736Sktlim@umich.edu 892410SN/A // disabled 90955SN/A sc_module_registry(); 912290SN/A sc_module_registry( const sc_module_registry& ); 92955SN/A sc_module_registry& operator = ( const sc_module_registry& ); 932683Sktlim@umich.edu}; 942683Sktlim@umich.edu 952669Sktlim@umich.edu} // namespace sc_core 962568SN/A 972568SN/A#endif 983012Ssaidi@eecs.umich.edu 992462SN/A// $Log: sc_module_registry.h,v $ 1002568SN/A// Revision 1.6 2011/08/26 20:46:10 acg 1012395SN/A// Andy Goodrich: moved the modification log to the end of the file to 1022405SN/A// eliminate source line number skew when check-ins are done. 1032914Ssaidi@eecs.umich.edu// 104955SN/A// Revision 1.5 2011/05/09 04:07:49 acg 1052811Srdreslin@umich.edu// Philipp A. Hartmann: 1062811Srdreslin@umich.edu// (1) Restore hierarchy in all phase callbacks. 1072811Srdreslin@umich.edu// (2) Ensure calls to before_end_of_elaboration. 1082811Srdreslin@umich.edu// 1092811Srdreslin@umich.edu// Revision 1.4 2011/02/18 20:27:14 acg 1102811Srdreslin@umich.edu// Andy Goodrich: Updated Copyrights. 1112811Srdreslin@umich.edu// 1122811Srdreslin@umich.edu// Revision 1.3 2011/02/13 21:47:37 acg 1132811Srdreslin@umich.edu// Andy Goodrich: update copyright notice. 1142811Srdreslin@umich.edu// 1152811Srdreslin@umich.edu// Revision 1.2 2008/05/22 17:06:26 acg 1162811Srdreslin@umich.edu// Andy Goodrich: updated copyright notice to include 2008. 1172811Srdreslin@umich.edu// 1182811Srdreslin@umich.edu// Revision 1.1.1.1 2006/12/15 20:20:05 acg 1192811Srdreslin@umich.edu// SystemC 2.3 1202811Srdreslin@umich.edu// 1212814Srdreslin@umich.edu// Revision 1.3 2006/01/13 18:44:30 acg 1222811Srdreslin@umich.edu// Added $Log to record CVS changes into the source. 1232811Srdreslin@umich.edu 1242811Srdreslin@umich.edu// Taf! 1252811Srdreslin@umich.edu