sc_inout.hh (12841:22aa7ba47bf9) sc_inout.hh (12868:23162a436538)
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in the
10 * documentation and/or other materials provided with the distribution;
11 * neither the name of the copyright holders nor the names of its
12 * contributors may be used to endorse or promote products derived from
13 * this software without specific prior written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#ifndef __SYSTEMC_EXT_CHANNEL_SC_INOUT_HH__
31#define __SYSTEMC_EXT_CHANNEL_SC_INOUT_HH__
32
33#include <string>
34
35#include "../core/sc_port.hh"
36#include "sc_signal_inout_if.hh"
37#include "warn_unimpl.hh"
38
39namespace sc_dt
40{
41
42class sc_logic;
43
44} // namespace sc_dt
45
46namespace sc_core
47{
48
49class sc_event;
50class sc_event_finder;
51class sc_trace_file;
52
53template <class T>
54class sc_inout : public sc_port<sc_signal_inout_if<T>, 1>
55{
56 public:
57 sc_inout() : sc_port<sc_signal_inout_if<T>, 1>() {}
58 explicit sc_inout(const char *name) :
59 sc_port<sc_signal_inout_if<T>, 1>(name)
60 {}
61 virtual ~sc_inout() {}
62
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in the
10 * documentation and/or other materials provided with the distribution;
11 * neither the name of the copyright holders nor the names of its
12 * contributors may be used to endorse or promote products derived from
13 * this software without specific prior written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#ifndef __SYSTEMC_EXT_CHANNEL_SC_INOUT_HH__
31#define __SYSTEMC_EXT_CHANNEL_SC_INOUT_HH__
32
33#include <string>
34
35#include "../core/sc_port.hh"
36#include "sc_signal_inout_if.hh"
37#include "warn_unimpl.hh"
38
39namespace sc_dt
40{
41
42class sc_logic;
43
44} // namespace sc_dt
45
46namespace sc_core
47{
48
49class sc_event;
50class sc_event_finder;
51class sc_trace_file;
52
53template <class T>
54class sc_inout : public sc_port<sc_signal_inout_if<T>, 1>
55{
56 public:
57 sc_inout() : sc_port<sc_signal_inout_if<T>, 1>() {}
58 explicit sc_inout(const char *name) :
59 sc_port<sc_signal_inout_if<T>, 1>(name)
60 {}
61 virtual ~sc_inout() {}
62
63 // Deprecated binding constructors.
64 explicit sc_inout(const sc_signal_inout_if<T> &interface) :
65 sc_port<sc_signal_inout_if<T>, 1>(interface)
66 {}
67 sc_inout(const char *name, const sc_signal_inout_if<T> &interface) :
68 sc_port<sc_signal_inout_if<T>, 1>(name, interface)
69 {}
70 explicit sc_inout(sc_port_b<sc_signal_inout_if<T> > &parent) :
71 sc_port<sc_signal_inout_if<T>, 1>(parent)
72 {}
73 sc_inout(const char *name, sc_port_b<sc_signal_inout_if<T> > &parent) :
74 sc_port<sc_signal_inout_if<T>, 1>(name, parent)
75 {}
76 explicit sc_inout(sc_port<sc_signal_inout_if<T>, 1> &parent) :
77 sc_port<sc_signal_inout_if<T>, 1>(parent)
78 {}
79 sc_inout(const char *name, sc_port<sc_signal_inout_if<T>, 1> &parent) :
80 sc_port<sc_signal_inout_if<T>, 1>(name, parent)
81 {}
82
63 void
64 initialize(const T &)
65 {
66 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
67 }
68 void
69 initialize(const sc_signal_in_if<T> &)
70 {
71 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
72 }
73
74 virtual void end_of_elaboration() {}
75
76 const T &
77 read() const
78 {
79 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
80 return *(const T *)nullptr;
81 }
82 operator const T& () const
83 {
84 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
85 return *(const T *)nullptr;
86 }
87
88 void
89 write(const T &)
90 {
91 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
92 }
93 sc_inout<T> &
94 operator = (const T &)
95 {
96 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
97 return *(sc_inout<T> *)nullptr;
98 }
99 sc_inout<T> &
100 operator = (const sc_signal_in_if<T> &)
101 {
102 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
103 return *(sc_inout<T> *)nullptr;
104 }
105 sc_inout<T> &
106 operator = (const sc_port<sc_signal_in_if<T>, 1> &)
107 {
108 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
109 return *(sc_inout<T> *)nullptr;
110 }
111 sc_inout<T> &
112 operator = (const sc_port<sc_signal_inout_if<T>, 1> &)
113 {
114 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
115 return *(sc_inout<T> *)nullptr;
116 }
117 sc_inout<T> &
118 operator = (const sc_inout<T> &)
119 {
120 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
121 return *(sc_inout<T> *)nullptr;
122 }
123
124 const sc_event &
125 default_event() const
126 {
127 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
128 return *(sc_event *)nullptr;
129 }
130 const sc_event &
131 value_changed_event() const
132 {
133 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
134 return *(sc_event *)nullptr;
135 }
136 bool
137 event() const
138 {
139 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
140 return false;
141 }
142 sc_event_finder &
143 value_changed() const
144 {
145 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
146 return *(sc_event_finder *)nullptr;
147 }
148
149 virtual const char *kind() const { return "sc_inout"; }
150
151 private:
152 // Disabled
153 sc_inout(const sc_inout<T> &) : sc_port<sc_signal_inout_if<T>, 1>() {}
154};
155
156template <class T>
157inline void
158sc_trace(sc_trace_file *, const sc_inout<T> &, const std::string &)
159{
160 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
161}
162
163template <>
164class sc_inout<bool> : public sc_port<sc_signal_inout_if<bool>, 1>
165{
166 public:
167 sc_inout() : sc_port<sc_signal_inout_if<bool>, 1>() {}
168 explicit sc_inout(const char *name) :
169 sc_port<sc_signal_inout_if<bool>, 1>(name)
170 {}
171 virtual ~sc_inout() {}
172
83 void
84 initialize(const T &)
85 {
86 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
87 }
88 void
89 initialize(const sc_signal_in_if<T> &)
90 {
91 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
92 }
93
94 virtual void end_of_elaboration() {}
95
96 const T &
97 read() const
98 {
99 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
100 return *(const T *)nullptr;
101 }
102 operator const T& () const
103 {
104 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
105 return *(const T *)nullptr;
106 }
107
108 void
109 write(const T &)
110 {
111 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
112 }
113 sc_inout<T> &
114 operator = (const T &)
115 {
116 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
117 return *(sc_inout<T> *)nullptr;
118 }
119 sc_inout<T> &
120 operator = (const sc_signal_in_if<T> &)
121 {
122 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
123 return *(sc_inout<T> *)nullptr;
124 }
125 sc_inout<T> &
126 operator = (const sc_port<sc_signal_in_if<T>, 1> &)
127 {
128 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
129 return *(sc_inout<T> *)nullptr;
130 }
131 sc_inout<T> &
132 operator = (const sc_port<sc_signal_inout_if<T>, 1> &)
133 {
134 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
135 return *(sc_inout<T> *)nullptr;
136 }
137 sc_inout<T> &
138 operator = (const sc_inout<T> &)
139 {
140 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
141 return *(sc_inout<T> *)nullptr;
142 }
143
144 const sc_event &
145 default_event() const
146 {
147 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
148 return *(sc_event *)nullptr;
149 }
150 const sc_event &
151 value_changed_event() const
152 {
153 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
154 return *(sc_event *)nullptr;
155 }
156 bool
157 event() const
158 {
159 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
160 return false;
161 }
162 sc_event_finder &
163 value_changed() const
164 {
165 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
166 return *(sc_event_finder *)nullptr;
167 }
168
169 virtual const char *kind() const { return "sc_inout"; }
170
171 private:
172 // Disabled
173 sc_inout(const sc_inout<T> &) : sc_port<sc_signal_inout_if<T>, 1>() {}
174};
175
176template <class T>
177inline void
178sc_trace(sc_trace_file *, const sc_inout<T> &, const std::string &)
179{
180 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
181}
182
183template <>
184class sc_inout<bool> : public sc_port<sc_signal_inout_if<bool>, 1>
185{
186 public:
187 sc_inout() : sc_port<sc_signal_inout_if<bool>, 1>() {}
188 explicit sc_inout(const char *name) :
189 sc_port<sc_signal_inout_if<bool>, 1>(name)
190 {}
191 virtual ~sc_inout() {}
192
193 // Deprecated binding constructors.
194 explicit sc_inout(const sc_signal_inout_if<bool> &interface) :
195 sc_port<sc_signal_inout_if<bool>, 1>(interface)
196 {}
197 sc_inout(const char *name, const sc_signal_inout_if<bool> &interface) :
198 sc_port<sc_signal_inout_if<bool>, 1>(name, interface)
199 {}
200 explicit sc_inout(sc_port_b<sc_signal_inout_if<bool> > &parent) :
201 sc_port<sc_signal_inout_if<bool>, 1>(parent)
202 {}
203 sc_inout(const char *name, sc_port_b<sc_signal_inout_if<bool> > &parent) :
204 sc_port<sc_signal_inout_if<bool>, 1>(name, parent)
205 {}
206 explicit sc_inout(sc_port<sc_signal_inout_if<bool>, 1> &parent) :
207 sc_port<sc_signal_inout_if<bool>, 1>(parent)
208 {}
209 sc_inout(const char *name, sc_port<sc_signal_inout_if<bool>, 1> &parent) :
210 sc_port<sc_signal_inout_if<bool>, 1>(name, parent)
211 {}
212
173 void
174 initialize(const bool &)
175 {
176 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
177 }
178 void
179 initialize(const sc_signal_in_if<bool> &)
180 {
181 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
182 }
183
184 virtual void end_of_elaboration() {}
185
186 const bool &
187 read() const
188 {
189 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
190 return *(bool *)nullptr;
191 }
192 operator const bool& () const
193 {
194 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
195 return *(bool *)nullptr;
196 }
197
198 void
199 write(const bool &)
200 {
201 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
202 }
203 sc_inout<bool> &
204 operator = (const bool &)
205 {
206 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
207 return *(sc_inout<bool> *)nullptr;
208 }
209 sc_inout<bool> &
210 operator = (const sc_signal_in_if<bool> &)
211 {
212 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
213 return *(sc_inout<bool> *)nullptr;
214 }
215 sc_inout<bool> &
216 operator = (const sc_port<sc_signal_in_if<bool>, 1> &)
217 {
218 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
219 return *(sc_inout<bool> *)nullptr;
220 }
221 sc_inout<bool> &
222 operator = (const sc_port<sc_signal_inout_if<bool>, 1> &)
223 {
224 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
225 return *(sc_inout<bool> *)nullptr;
226 }
227 sc_inout<bool> &
228 operator = (const sc_inout<bool> &)
229 {
230 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
231 return *(sc_inout<bool> *)nullptr;
232 }
233
234 const sc_event &
235 default_event() const
236 {
237 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
238 return *(sc_event *)nullptr;
239 }
240 const sc_event &
241 value_changed_event() const
242 {
243 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
244 return *(sc_event *)nullptr;
245 }
246 const sc_event &
247 posedge_event() const
248 {
249 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
250 return *(sc_event *)nullptr;
251 }
252 const sc_event &
253 negedge_event() const
254 {
255 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
256 return *(sc_event *)nullptr;
257 }
258
259 bool
260 event() const
261 {
262 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
263 return false;
264 }
265 bool
266 posedge() const
267 {
268 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
269 return false;
270 }
271 bool
272 negedge() const
273 {
274 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
275 return false;
276 }
277
278 sc_event_finder &
279 value_changed() const
280 {
281 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
282 return *(sc_event_finder *)nullptr;
283 }
284 sc_event_finder &
285 pos() const
286 {
287 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
288 return *(sc_event_finder *)nullptr;
289 }
290 sc_event_finder &
291 neg() const
292 {
293 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
294 return *(sc_event_finder *)nullptr;
295 }
296
297 virtual const char *kind() const { return "sc_inout"; }
298
299 private:
300 // Disabled
301 sc_inout(const sc_inout<bool> &) :
302 sc_port<sc_signal_inout_if<bool>, 1>() {}
303};
304
305template <>
306inline void sc_trace<bool>(
307 sc_trace_file *, const sc_inout<bool> &, const std::string &)
308{
309 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
310}
311
312template <>
313class sc_inout<sc_dt::sc_logic> :
314 public sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>
315{
316 public:
317 sc_inout() : sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>() {}
318 explicit sc_inout(const char *name) :
319 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>(name)
320 {}
321 virtual ~sc_inout() {}
322
213 void
214 initialize(const bool &)
215 {
216 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
217 }
218 void
219 initialize(const sc_signal_in_if<bool> &)
220 {
221 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
222 }
223
224 virtual void end_of_elaboration() {}
225
226 const bool &
227 read() const
228 {
229 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
230 return *(bool *)nullptr;
231 }
232 operator const bool& () const
233 {
234 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
235 return *(bool *)nullptr;
236 }
237
238 void
239 write(const bool &)
240 {
241 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
242 }
243 sc_inout<bool> &
244 operator = (const bool &)
245 {
246 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
247 return *(sc_inout<bool> *)nullptr;
248 }
249 sc_inout<bool> &
250 operator = (const sc_signal_in_if<bool> &)
251 {
252 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
253 return *(sc_inout<bool> *)nullptr;
254 }
255 sc_inout<bool> &
256 operator = (const sc_port<sc_signal_in_if<bool>, 1> &)
257 {
258 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
259 return *(sc_inout<bool> *)nullptr;
260 }
261 sc_inout<bool> &
262 operator = (const sc_port<sc_signal_inout_if<bool>, 1> &)
263 {
264 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
265 return *(sc_inout<bool> *)nullptr;
266 }
267 sc_inout<bool> &
268 operator = (const sc_inout<bool> &)
269 {
270 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
271 return *(sc_inout<bool> *)nullptr;
272 }
273
274 const sc_event &
275 default_event() const
276 {
277 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
278 return *(sc_event *)nullptr;
279 }
280 const sc_event &
281 value_changed_event() const
282 {
283 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
284 return *(sc_event *)nullptr;
285 }
286 const sc_event &
287 posedge_event() const
288 {
289 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
290 return *(sc_event *)nullptr;
291 }
292 const sc_event &
293 negedge_event() const
294 {
295 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
296 return *(sc_event *)nullptr;
297 }
298
299 bool
300 event() const
301 {
302 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
303 return false;
304 }
305 bool
306 posedge() const
307 {
308 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
309 return false;
310 }
311 bool
312 negedge() const
313 {
314 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
315 return false;
316 }
317
318 sc_event_finder &
319 value_changed() const
320 {
321 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
322 return *(sc_event_finder *)nullptr;
323 }
324 sc_event_finder &
325 pos() const
326 {
327 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
328 return *(sc_event_finder *)nullptr;
329 }
330 sc_event_finder &
331 neg() const
332 {
333 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
334 return *(sc_event_finder *)nullptr;
335 }
336
337 virtual const char *kind() const { return "sc_inout"; }
338
339 private:
340 // Disabled
341 sc_inout(const sc_inout<bool> &) :
342 sc_port<sc_signal_inout_if<bool>, 1>() {}
343};
344
345template <>
346inline void sc_trace<bool>(
347 sc_trace_file *, const sc_inout<bool> &, const std::string &)
348{
349 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
350}
351
352template <>
353class sc_inout<sc_dt::sc_logic> :
354 public sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>
355{
356 public:
357 sc_inout() : sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>() {}
358 explicit sc_inout(const char *name) :
359 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>(name)
360 {}
361 virtual ~sc_inout() {}
362
363 // Deprecated binding constructors.
364 explicit sc_inout(const sc_signal_inout_if<sc_dt::sc_logic> &interface) :
365 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>(interface)
366 {}
367 sc_inout(const char *name,
368 const sc_signal_inout_if<sc_dt::sc_logic> &interface) :
369 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>(name, interface)
370 {}
371 explicit sc_inout(
372 sc_port_b<sc_signal_inout_if<sc_dt::sc_logic> > &parent) :
373 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>(parent)
374 {}
375 sc_inout(const char *name,
376 sc_port_b<sc_signal_inout_if<sc_dt::sc_logic> > &parent) :
377 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>(name, parent)
378 {}
379 explicit sc_inout(
380 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1> &parent) :
381 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>(parent)
382 {}
383 sc_inout(const char *name,
384 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1> &parent) :
385 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>(name, parent)
386 {}
387
323 void
324 initialize(const sc_dt::sc_logic &)
325 {
326 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
327 }
328 void
329 initialize(const sc_signal_in_if<sc_dt::sc_logic> &)
330 {
331 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
332 }
333
334 virtual void end_of_elaboration() {}
335
336 const sc_dt::sc_logic &
337 read() const
338 {
339 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
340 return *(const sc_dt::sc_logic *)nullptr;
341 }
342 operator const sc_dt::sc_logic& () const
343 {
344 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
345 return *(const sc_dt::sc_logic *)nullptr;
346 }
347
348 void
349 write(const sc_dt::sc_logic &)
350 {
351 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
352 }
353 sc_inout<sc_dt::sc_logic> &
354 operator = (const sc_dt::sc_logic &)
355 {
356 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
357 return *(sc_inout<sc_dt::sc_logic> *)nullptr;
358 }
359 sc_inout<sc_dt::sc_logic> &
360 operator = (const sc_signal_in_if<sc_dt::sc_logic> &)
361 {
362 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
363 return *(sc_inout<sc_dt::sc_logic> *)nullptr;
364 }
365 sc_inout<sc_dt::sc_logic> &
366 operator = (const sc_port<sc_signal_in_if<sc_dt::sc_logic>, 1> &)
367 {
368 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
369 return *(sc_inout<sc_dt::sc_logic> *)nullptr;
370 }
371 sc_inout<sc_dt::sc_logic> &
372 operator = (const sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1> &)
373 {
374 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
375 return *(sc_inout<sc_dt::sc_logic> *)nullptr;
376 }
377 sc_inout<sc_dt::sc_logic> &
378 operator = (const sc_inout<sc_dt::sc_logic> &)
379 {
380 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
381 return *(sc_inout<sc_dt::sc_logic> *)nullptr;
382 }
383
384 const sc_event &
385 default_event() const
386 {
387 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
388 return *(sc_event *)nullptr;
389 }
390 const sc_event &
391 value_changed_event() const
392 {
393 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
394 return *(sc_event *)nullptr;
395 }
396 const sc_event &
397 posedge_event() const
398 {
399 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
400 return *(sc_event *)nullptr;
401 }
402 const sc_event &
403 negedge_event() const
404 {
405 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
406 return *(sc_event *)nullptr;
407 }
408
409 bool
410 event() const
411 {
412 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
413 return false;
414 }
415 bool
416 posedge() const
417 {
418 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
419 return false;
420 }
421 bool
422 negedge() const
423 {
424 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
425 return false;
426 }
427
428 sc_event_finder &
429 value_changed() const
430 {
431 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
432 return *(sc_event_finder *)nullptr;
433 }
434 sc_event_finder &
435 pos() const
436 {
437 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
438 return *(sc_event_finder *)nullptr;
439 }
440 sc_event_finder &
441 neg() const
442 {
443 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
444 return *(sc_event_finder *)nullptr;
445 }
446
447 virtual const char *kind() const { return "sc_inout"; }
448
449 private:
450 // Disabled
451 sc_inout(const sc_inout<sc_dt::sc_logic> &) :
452 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>()
453 {}
454};
455
456template <>
457inline void
458sc_trace<sc_dt::sc_logic>(sc_trace_file *, const sc_inout<sc_dt::sc_logic> &,
459 const std::string &)
460{
461 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
462}
463
464} // namespace sc_core
465
466#endif //__SYSTEMC_EXT_CHANNEL_SC_INOUT_HH__
388 void
389 initialize(const sc_dt::sc_logic &)
390 {
391 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
392 }
393 void
394 initialize(const sc_signal_in_if<sc_dt::sc_logic> &)
395 {
396 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
397 }
398
399 virtual void end_of_elaboration() {}
400
401 const sc_dt::sc_logic &
402 read() const
403 {
404 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
405 return *(const sc_dt::sc_logic *)nullptr;
406 }
407 operator const sc_dt::sc_logic& () const
408 {
409 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
410 return *(const sc_dt::sc_logic *)nullptr;
411 }
412
413 void
414 write(const sc_dt::sc_logic &)
415 {
416 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
417 }
418 sc_inout<sc_dt::sc_logic> &
419 operator = (const sc_dt::sc_logic &)
420 {
421 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
422 return *(sc_inout<sc_dt::sc_logic> *)nullptr;
423 }
424 sc_inout<sc_dt::sc_logic> &
425 operator = (const sc_signal_in_if<sc_dt::sc_logic> &)
426 {
427 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
428 return *(sc_inout<sc_dt::sc_logic> *)nullptr;
429 }
430 sc_inout<sc_dt::sc_logic> &
431 operator = (const sc_port<sc_signal_in_if<sc_dt::sc_logic>, 1> &)
432 {
433 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
434 return *(sc_inout<sc_dt::sc_logic> *)nullptr;
435 }
436 sc_inout<sc_dt::sc_logic> &
437 operator = (const sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1> &)
438 {
439 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
440 return *(sc_inout<sc_dt::sc_logic> *)nullptr;
441 }
442 sc_inout<sc_dt::sc_logic> &
443 operator = (const sc_inout<sc_dt::sc_logic> &)
444 {
445 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
446 return *(sc_inout<sc_dt::sc_logic> *)nullptr;
447 }
448
449 const sc_event &
450 default_event() const
451 {
452 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
453 return *(sc_event *)nullptr;
454 }
455 const sc_event &
456 value_changed_event() const
457 {
458 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
459 return *(sc_event *)nullptr;
460 }
461 const sc_event &
462 posedge_event() const
463 {
464 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
465 return *(sc_event *)nullptr;
466 }
467 const sc_event &
468 negedge_event() const
469 {
470 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
471 return *(sc_event *)nullptr;
472 }
473
474 bool
475 event() const
476 {
477 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
478 return false;
479 }
480 bool
481 posedge() const
482 {
483 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
484 return false;
485 }
486 bool
487 negedge() const
488 {
489 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
490 return false;
491 }
492
493 sc_event_finder &
494 value_changed() const
495 {
496 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
497 return *(sc_event_finder *)nullptr;
498 }
499 sc_event_finder &
500 pos() const
501 {
502 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
503 return *(sc_event_finder *)nullptr;
504 }
505 sc_event_finder &
506 neg() const
507 {
508 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
509 return *(sc_event_finder *)nullptr;
510 }
511
512 virtual const char *kind() const { return "sc_inout"; }
513
514 private:
515 // Disabled
516 sc_inout(const sc_inout<sc_dt::sc_logic> &) :
517 sc_port<sc_signal_inout_if<sc_dt::sc_logic>, 1>()
518 {}
519};
520
521template <>
522inline void
523sc_trace<sc_dt::sc_logic>(sc_trace_file *, const sc_inout<sc_dt::sc_logic> &,
524 const std::string &)
525{
526 sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
527}
528
529} // namespace sc_core
530
531#endif //__SYSTEMC_EXT_CHANNEL_SC_INOUT_HH__