00001 /***************************************************************************** 00002 00003 The following code is derived, directly or indirectly, from the SystemC 00004 source code Copyright (c) 1996-2006 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 Version 2.4 (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.systemc.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_signal_resolved_ports.cpp -- The sc_signal_resolved port classes. 00021 00022 Original Author: Martin Janssen, Synopsys, Inc., 2001-08-20 00023 00024 *****************************************************************************/ 00025 00026 /***************************************************************************** 00027 00028 MODIFICATION LOG - modifiers, enter your name, affiliation, date and 00029 changes you are making here. 00030 00031 Name, Affiliation, Date: 00032 Description of Modification: 00033 00034 *****************************************************************************/ 00035 00036 00037 // $Log: sc_signal_resolved_ports.cpp,v $ 00038 // Revision 1.1.1.1 2006/12/15 20:31:35 acg 00039 // SystemC 2.2 00040 // 00041 // Revision 1.3 2006/01/13 18:47:42 acg 00042 // Added $Log command so that CVS comments are reproduced in the source. 00043 // 00044 00045 #include <stdio.h> 00046 00047 #include "sysc/communication/sc_communication_ids.h" 00048 #include "sysc/communication/sc_signal_resolved.h" 00049 #include "sysc/communication/sc_signal_resolved_ports.h" 00050 00051 namespace sc_core { 00052 00053 // ---------------------------------------------------------------------------- 00054 // CLASS : sc_in_resolved 00055 // 00056 // The sc_signal_resolved input port class. 00057 // ---------------------------------------------------------------------------- 00058 00059 // called when elaboration is done 00060 00061 void 00062 sc_in_resolved::end_of_elaboration() 00063 { 00064 base_type::end_of_elaboration(); 00065 // check if bound channel is a resolved signal 00066 if( DCAST<sc_signal_resolved*>( get_interface() ) == 0 ) { 00067 char msg[BUFSIZ]; 00068 std::sprintf( msg, "%s (%s)", name(), kind() ); 00069 SC_REPORT_ERROR( SC_ID_RESOLVED_PORT_NOT_BOUND_, msg ); 00070 } 00071 } 00072 00073 00074 // ---------------------------------------------------------------------------- 00075 // CLASS : sc_inout_resolved 00076 // 00077 // The sc_signal_resolved input/output port class. 00078 // ---------------------------------------------------------------------------- 00079 00080 // called when elaboration is done 00081 00082 void 00083 sc_inout_resolved::end_of_elaboration() 00084 { 00085 base_type::end_of_elaboration(); 00086 // check if bound channel is a resolved signal 00087 if( DCAST<sc_signal_resolved*>( get_interface() ) == 0 ) { 00088 char msg[BUFSIZ]; 00089 std::sprintf( msg, "%s (%s)", name(), kind() ); 00090 SC_REPORT_ERROR( SC_ID_RESOLVED_PORT_NOT_BOUND_, msg ); 00091 } 00092 } 00093 00094 00095 // ---------------------------------------------------------------------------- 00096 // CLASS : sc_out_resolved 00097 // 00098 // The sc_signal_resolved output port class. 00099 // ---------------------------------------------------------------------------- 00100 00101 } // namespace sc_core 00102 00103 // Taf!