1/*****************************************************************************
2
3  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4  more contributor license agreements.  See the NOTICE file distributed
5  with this work for additional information regarding copyright ownership.
6  Accellera licenses this file to you under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with the
8  License.  You may obtain a copy of the License at
9
10    http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  implied.  See the License for the specific language governing
16  permissions and limitations under the License.
17
18 *****************************************************************************/
19
20/*****************************************************************************
21
22  sc_signal_resolved_ports.cpp -- The sc_signal_resolved port classes.
23
24  Original Author: Martin Janssen, Synopsys, Inc., 2001-08-20
25
26  CHANGE LOG IS AT THE END OF THE FILE
27 *****************************************************************************/
28
29#include <cstdio>
30
31#include "sysc/kernel/sc_simcontext.h"
32#include "sysc/kernel/sc_process_handle.h"
33#include "sysc/communication/sc_communication_ids.h"
34#include "sysc/communication/sc_signal_resolved.h"
35#include "sysc/communication/sc_signal_resolved_ports.h"
36
37namespace sc_core {
38
39// ----------------------------------------------------------------------------
40//  CLASS : sc_in_resolved
41//
42//  The sc_signal_resolved input port class.
43// ----------------------------------------------------------------------------
44
45// called when elaboration is done
46
47void
48sc_in_resolved::end_of_elaboration()
49{
50    base_type::end_of_elaboration();
51    // check if bound channel is a resolved signal
52    if( DCAST<sc_signal_resolved*>( get_interface() ) == 0 ) {
53	char msg[BUFSIZ];
54	std::sprintf( msg, "%s (%s)", name(), kind() );
55	SC_REPORT_ERROR( SC_ID_RESOLVED_PORT_NOT_BOUND_, msg );
56    }
57}
58
59
60// ----------------------------------------------------------------------------
61//  CLASS : sc_inout_resolved
62//
63//  The sc_signal_resolved input/output port class.
64// ----------------------------------------------------------------------------
65
66// called when elaboration is done
67
68void
69sc_inout_resolved::end_of_elaboration()
70{
71    base_type::end_of_elaboration();
72    // check if bound channel is a resolved signal
73    if( DCAST<sc_signal_resolved*>( get_interface() ) == 0 ) {
74	char msg[BUFSIZ];
75	std::sprintf( msg, "%s (%s)", name(), kind() );
76	SC_REPORT_ERROR( SC_ID_RESOLVED_PORT_NOT_BOUND_, msg );
77    }
78}
79
80
81// ----------------------------------------------------------------------------
82//  CLASS : sc_out_resolved
83//
84//  The sc_signal_resolved output port class.
85// ----------------------------------------------------------------------------
86
87} // namespace sc_core
88
89// $Log: sc_signal_resolved_ports.cpp,v $
90// Revision 1.4  2011/08/26 20:45:44  acg
91//  Andy Goodrich: moved the modification log to the end of the file to
92//  eliminate source line number skew when check-ins are done.
93//
94// Revision 1.3  2011/02/18 20:23:45  acg
95//  Andy Goodrich: Copyright update.
96//
97// Revision 1.2  2011/02/07 19:16:50  acg
98//  Andy Goodrich: changes for handling multiple writers.
99//
100// Revision 1.1.1.1  2006/12/15 20:20:04  acg
101// SystemC 2.3
102//
103// Revision 1.3  2006/01/13 18:47:42  acg
104// Added $Log command so that CVS comments are reproduced in the source.
105//
106
107// Taf!
108