112027Sjungma@eit.uni-kl.de/***************************************************************************** 212027Sjungma@eit.uni-kl.de 312027Sjungma@eit.uni-kl.de Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 412027Sjungma@eit.uni-kl.de more contributor license agreements. See the NOTICE file distributed 512027Sjungma@eit.uni-kl.de with this work for additional information regarding copyright ownership. 612027Sjungma@eit.uni-kl.de Accellera licenses this file to you under the Apache License, Version 2.0 712027Sjungma@eit.uni-kl.de (the "License"); you may not use this file except in compliance with the 812027Sjungma@eit.uni-kl.de License. You may obtain a copy of the License at 912027Sjungma@eit.uni-kl.de 1012027Sjungma@eit.uni-kl.de http://www.apache.org/licenses/LICENSE-2.0 1112027Sjungma@eit.uni-kl.de 1212027Sjungma@eit.uni-kl.de Unless required by applicable law or agreed to in writing, software 1312027Sjungma@eit.uni-kl.de distributed under the License is distributed on an "AS IS" BASIS, 1412027Sjungma@eit.uni-kl.de WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 1512027Sjungma@eit.uni-kl.de implied. See the License for the specific language governing 1612027Sjungma@eit.uni-kl.de permissions and limitations under the License. 1712027Sjungma@eit.uni-kl.de 1812027Sjungma@eit.uni-kl.de *****************************************************************************/ 1912027Sjungma@eit.uni-kl.de 2012027Sjungma@eit.uni-kl.de/***************************************************************************** 2112027Sjungma@eit.uni-kl.de 2212027Sjungma@eit.uni-kl.de sc_module_registry.h -- Registry for all modules. 2312027Sjungma@eit.uni-kl.de FOR INTERNAL USE ONLY. 2412027Sjungma@eit.uni-kl.de 2512027Sjungma@eit.uni-kl.de Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21 2612027Sjungma@eit.uni-kl.de 2712027Sjungma@eit.uni-kl.de CHANGE LOG AT THE END OF THE FILE 2812027Sjungma@eit.uni-kl.de *****************************************************************************/ 2912027Sjungma@eit.uni-kl.de 3012027Sjungma@eit.uni-kl.de 3112027Sjungma@eit.uni-kl.de#ifndef SC_MODULE_REGISTRY_H 3212027Sjungma@eit.uni-kl.de#define SC_MODULE_REGISTRY_H 3312027Sjungma@eit.uni-kl.de 3412027Sjungma@eit.uni-kl.de 3512027Sjungma@eit.uni-kl.denamespace sc_core { 3612027Sjungma@eit.uni-kl.de 3712027Sjungma@eit.uni-kl.declass sc_module; 3812027Sjungma@eit.uni-kl.declass sc_simcontext; 3912027Sjungma@eit.uni-kl.de 4012027Sjungma@eit.uni-kl.de 4112027Sjungma@eit.uni-kl.de// ---------------------------------------------------------------------------- 4212027Sjungma@eit.uni-kl.de// CLASS : sc_module_registry 4312027Sjungma@eit.uni-kl.de// 4412027Sjungma@eit.uni-kl.de// Registry for all modules. 4512027Sjungma@eit.uni-kl.de// FOR INTERNAL USE ONLY! 4612027Sjungma@eit.uni-kl.de// ---------------------------------------------------------------------------- 4712027Sjungma@eit.uni-kl.de 4812027Sjungma@eit.uni-kl.declass sc_module_registry 4912027Sjungma@eit.uni-kl.de{ 5012027Sjungma@eit.uni-kl.de friend class sc_simcontext; 5112027Sjungma@eit.uni-kl.de 5212027Sjungma@eit.uni-kl.depublic: 5312027Sjungma@eit.uni-kl.de 5412027Sjungma@eit.uni-kl.de void insert( sc_module& ); 5512027Sjungma@eit.uni-kl.de void remove( sc_module& ); 5612027Sjungma@eit.uni-kl.de 5712027Sjungma@eit.uni-kl.de int size() const 5812027Sjungma@eit.uni-kl.de { return m_module_vec.size(); } 5912027Sjungma@eit.uni-kl.de 6012027Sjungma@eit.uni-kl.deprivate: 6112027Sjungma@eit.uni-kl.de 6212027Sjungma@eit.uni-kl.de // constructor 6312027Sjungma@eit.uni-kl.de explicit sc_module_registry( sc_simcontext& simc_ ); 6412027Sjungma@eit.uni-kl.de 6512027Sjungma@eit.uni-kl.de // destructor 6612027Sjungma@eit.uni-kl.de ~sc_module_registry(); 6712027Sjungma@eit.uni-kl.de 6812027Sjungma@eit.uni-kl.de // called when construction is done 6912027Sjungma@eit.uni-kl.de bool construction_done(); 7012027Sjungma@eit.uni-kl.de 7112027Sjungma@eit.uni-kl.de // called when elaboration is done 7212027Sjungma@eit.uni-kl.de void elaboration_done(); 7312027Sjungma@eit.uni-kl.de 7412027Sjungma@eit.uni-kl.de // called before simulation begins 7512027Sjungma@eit.uni-kl.de void start_simulation(); 7612027Sjungma@eit.uni-kl.de 7712027Sjungma@eit.uni-kl.de // called after simulation ends 7812027Sjungma@eit.uni-kl.de void simulation_done(); 7912027Sjungma@eit.uni-kl.de 8012027Sjungma@eit.uni-kl.de 8112027Sjungma@eit.uni-kl.deprivate: 8212027Sjungma@eit.uni-kl.de 8312027Sjungma@eit.uni-kl.de int m_construction_done; 8412027Sjungma@eit.uni-kl.de std::vector<sc_module*> m_module_vec; 8512027Sjungma@eit.uni-kl.de sc_simcontext* m_simc; 8612027Sjungma@eit.uni-kl.de 8712027Sjungma@eit.uni-kl.deprivate: 8812027Sjungma@eit.uni-kl.de 8912027Sjungma@eit.uni-kl.de // disabled 9012027Sjungma@eit.uni-kl.de sc_module_registry(); 9112027Sjungma@eit.uni-kl.de sc_module_registry( const sc_module_registry& ); 9212027Sjungma@eit.uni-kl.de sc_module_registry& operator = ( const sc_module_registry& ); 9312027Sjungma@eit.uni-kl.de}; 9412027Sjungma@eit.uni-kl.de 9512027Sjungma@eit.uni-kl.de} // namespace sc_core 9612027Sjungma@eit.uni-kl.de 9712027Sjungma@eit.uni-kl.de#endif 9812027Sjungma@eit.uni-kl.de 9912027Sjungma@eit.uni-kl.de// $Log: sc_module_registry.h,v $ 10012027Sjungma@eit.uni-kl.de// Revision 1.6 2011/08/26 20:46:10 acg 10112027Sjungma@eit.uni-kl.de// Andy Goodrich: moved the modification log to the end of the file to 10212027Sjungma@eit.uni-kl.de// eliminate source line number skew when check-ins are done. 10312027Sjungma@eit.uni-kl.de// 10412027Sjungma@eit.uni-kl.de// Revision 1.5 2011/05/09 04:07:49 acg 10512027Sjungma@eit.uni-kl.de// Philipp A. Hartmann: 10612027Sjungma@eit.uni-kl.de// (1) Restore hierarchy in all phase callbacks. 10712027Sjungma@eit.uni-kl.de// (2) Ensure calls to before_end_of_elaboration. 10812027Sjungma@eit.uni-kl.de// 10912027Sjungma@eit.uni-kl.de// Revision 1.4 2011/02/18 20:27:14 acg 11012027Sjungma@eit.uni-kl.de// Andy Goodrich: Updated Copyrights. 11112027Sjungma@eit.uni-kl.de// 11212027Sjungma@eit.uni-kl.de// Revision 1.3 2011/02/13 21:47:37 acg 11312027Sjungma@eit.uni-kl.de// Andy Goodrich: update copyright notice. 11412027Sjungma@eit.uni-kl.de// 11512027Sjungma@eit.uni-kl.de// Revision 1.2 2008/05/22 17:06:26 acg 11612027Sjungma@eit.uni-kl.de// Andy Goodrich: updated copyright notice to include 2008. 11712027Sjungma@eit.uni-kl.de// 11812027Sjungma@eit.uni-kl.de// Revision 1.1.1.1 2006/12/15 20:20:05 acg 11912027Sjungma@eit.uni-kl.de// SystemC 2.3 12012027Sjungma@eit.uni-kl.de// 12112027Sjungma@eit.uni-kl.de// Revision 1.3 2006/01/13 18:44:30 acg 12212027Sjungma@eit.uni-kl.de// Added $Log to record CVS changes into the source. 12312027Sjungma@eit.uni-kl.de 12412027Sjungma@eit.uni-kl.de// Taf! 125