SystemC 3.0.0
Accellera SystemC proof-of-concept library
sc_signal_resolved_ports.h
Go to the documentation of this file.
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.h -- 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#ifndef SC_SIGNAL_RESOLVED_PORTS_H
30#define SC_SIGNAL_RESOLVED_PORTS_H
31
32
35
36namespace sc_core {
37
38// ----------------------------------------------------------------------------
39// CLASS : sc_in_resolved
40//
41// The sc_signal_resolved input port class.
42// ----------------------------------------------------------------------------
43
45 : public sc_in<sc_dt::sc_logic>
46{
47public:
48
49 // typedefs
50
52
55
56 typedef base_type::in_if_type in_if_type;
57 typedef base_type::in_port_type in_port_type;
58 typedef base_type::inout_port_type inout_port_type;
59
60public:
61
62 // constructors
63
65 : base_type()
66 {}
67
68 explicit sc_in_resolved( const char* name_ )
69 : base_type( name_ )
70 {}
71
72 explicit sc_in_resolved( const in_if_type& interface_ )
73 : base_type( interface_ )
74 {}
75
76 sc_in_resolved( const char* name_, const in_if_type& interface_ )
77 : base_type( name_, interface_ )
78 {}
79
80 explicit sc_in_resolved( in_port_type& parent_ )
81 : base_type( parent_ )
82 {}
83
84 sc_in_resolved( const char* name_, in_port_type& parent_ )
85 : base_type( name_, parent_ )
86 {}
87
88 explicit sc_in_resolved( inout_port_type& parent_ )
89 : base_type( parent_ )
90 {}
91
92 sc_in_resolved( const char* name_, inout_port_type& parent_ )
93 : base_type( name_, parent_ )
94 {}
95
97 : base_type( parent_ )
98 {}
99
100 sc_in_resolved( const char* name_, this_type& parent_ )
101 : base_type( name_, parent_ )
102 {}
103
104
105 // destructor (does nothing)
106
108 {}
109
110
111 // called when elaboration is done
112 /* WHEN DEFINING THIS METHOD IN A DERIVED CLASS, */
113 /* MAKE SURE THAT THIS METHOD IS CALLED AS WELL. */
114
115 virtual void end_of_elaboration();
116
117 virtual const char* kind() const
118 { return "sc_in_resolved"; }
119
120private:
121
122 // disabled
123 sc_in_resolved( const this_type& );
124 this_type& operator = ( const this_type& );
125};
126
127
128// ----------------------------------------------------------------------------
129// CLASS : sc_inout_resolved
130//
131// The sc_signal_resolved input/output port class.
132// ----------------------------------------------------------------------------
133
135 : public sc_inout<sc_dt::sc_logic>
136{
137public:
138
139 // typedefs
140
142
145
146 typedef base_type::in_if_type in_if_type;
147 typedef base_type::in_port_type in_port_type;
148 typedef base_type::inout_if_type inout_if_type;
149 typedef base_type::inout_port_type inout_port_type;
150
151public:
152
153 // constructors
154
156 : base_type()
157 {}
158
159 explicit sc_inout_resolved( const char* name_ )
160 : base_type( name_ )
161 {}
162
163 explicit sc_inout_resolved( inout_if_type& interface_ )
164 : base_type( interface_ )
165 {}
166
167 sc_inout_resolved( const char* name_, inout_if_type& interface_ )
168 : base_type( name_, interface_ )
169 {}
170
172 : base_type( parent_ )
173 {}
174
175 sc_inout_resolved( const char* name_, inout_port_type& parent_ )
176 : base_type( name_, parent_ )
177 {}
178
180 : base_type( parent_ )
181 {}
182
183 sc_inout_resolved( const char* name_, this_type& parent_ )
184 : base_type( name_, parent_ )
185 {}
186
187
188 // destructor (does nothing)
189
191 {}
192
193
194 // write the new value
195
196 using base_type::operator=;
197 this_type& operator = ( const this_type& port_ )
198 { base_type::operator=(port_); return *this; }
199
200
201 // called when elaboration is done
202 /* WHEN DEFINING THIS METHOD IN A DERIVED CLASS, */
203 /* MAKE SURE THAT THIS METHOD IS CALLED AS WELL. */
204
205 virtual void end_of_elaboration();
206
207 virtual const char* kind() const
208 { return "sc_inout_resolved"; }
209
210private:
211
212 // disabled
213 sc_inout_resolved( const this_type& );
214};
215
216
217// ----------------------------------------------------------------------------
218// CLASS : sc_out_resolved
219//
220// The sc_signal_resolved output port class.
221// ----------------------------------------------------------------------------
222
223// sc_out_resolved can also read from its port, hence no difference with
224// sc_inout_resolved. For debugging reasons, a class is provided instead
225// of a typedef.
226
228 : public sc_inout_resolved
229{
230public:
231
232 // typedefs
233
236
237 typedef base_type::data_type data_type;
238
239 typedef base_type::in_if_type in_if_type;
240 typedef base_type::in_port_type in_port_type;
241 typedef base_type::inout_if_type inout_if_type;
242 typedef base_type::inout_port_type inout_port_type;
243
244public:
245
246 // constructors
247
249 : base_type()
250 {}
251
252 explicit sc_out_resolved( const char* name_ )
253 : base_type( name_ )
254 {}
255
256 explicit sc_out_resolved( inout_if_type& interface_ )
257 : base_type( interface_ )
258 {}
259
260 sc_out_resolved( const char* name_, inout_if_type& interface_ )
261 : base_type( name_, interface_ )
262 {}
263
264 explicit sc_out_resolved( inout_port_type& parent_ )
265 : base_type( parent_ )
266 {}
267
268 sc_out_resolved( const char* name_, inout_port_type& parent_ )
269 : base_type( name_, parent_ )
270 {}
271
273 : base_type( parent_ )
274 {}
275
276 sc_out_resolved( const char* name_, this_type& parent_ )
277 : base_type( name_, parent_ )
278 {}
279
280
281 // destructor (does nothing)
282
284 {}
285
286
287 // write the new value
288
289 using base_type::operator=;
290 this_type& operator = ( const this_type& port_ )
291 { base_type::operator=(port_); return *this; }
292
293 virtual const char* kind() const
294 { return "sc_out_resolved"; }
295
296private:
297
298 // disabled
299 sc_out_resolved( const this_type& );
300};
301
302} // namespace sc_core
303
304//$Log: sc_signal_resolved_ports.h,v $
305//Revision 1.3 2011/08/26 20:45:44 acg
306// Andy Goodrich: moved the modification log to the end of the file to
307// eliminate source line number skew when check-ins are done.
308//
309//Revision 1.2 2011/02/18 20:23:45 acg
310// Andy Goodrich: Copyright update.
311//
312//Revision 1.1.1.1 2006/12/15 20:20:04 acg
313//SystemC 2.3
314//
315//Revision 1.2 2006/01/03 23:18:26 acg
316//Changed copyright to include 2006.
317//
318//Revision 1.1.1.1 2005/12/19 23:16:43 acg
319//First check in of SystemC 2.1 into its own archive.
320//
321//Revision 1.9 2005/06/10 22:43:55 acg
322//Added CVS change log annotation.
323//
324
325#endif
326
327// Taf!
#define SC_API
Definition: sc_cmnhdr.h:148
sc_in_resolved(const char *name_, inout_port_type &parent_)
sc_in_resolved(const char *name_, in_port_type &parent_)
virtual const char * kind() const
base_type::in_port_type in_port_type
virtual void end_of_elaboration()
sc_in_resolved(const in_if_type &interface_)
base_type::inout_port_type inout_port_type
sc_in_resolved(const char *name_, this_type &parent_)
sc_in_resolved(in_port_type &parent_)
sc_in_resolved(inout_port_type &parent_)
sc_in_resolved(const char *name_, const in_if_type &interface_)
sc_in_resolved(this_type &parent_)
base_type::in_if_type in_if_type
sc_inout_resolved(inout_if_type &interface_)
virtual const char * kind() const
base_type::inout_port_type inout_port_type
sc_inout_resolved(inout_port_type &parent_)
base_type::inout_if_type inout_if_type
virtual void end_of_elaboration()
base_type::in_port_type in_port_type
sc_inout_resolved(const char *name_, inout_if_type &interface_)
sc_inout_resolved(const char *name_, inout_port_type &parent_)
sc_inout_resolved(const char *name_, this_type &parent_)
sc_out_resolved(const char *name_, inout_port_type &parent_)
sc_out_resolved(inout_port_type &parent_)
sc_out_resolved(const char *name_, this_type &parent_)
base_type::in_if_type in_if_type
virtual const char * kind() const
sc_out_resolved(const char *name_, inout_if_type &interface_)
base_type::in_port_type in_port_type
base_type::inout_port_type inout_port_type
base_type::inout_if_type inout_if_type
sc_out_resolved(inout_if_type &interface_)