SystemC  2.3.2
Accellera SystemC proof-of-concept library
sc_signal.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.h -- The sc_signal<T> primitive channel class.
23 */
33 #ifndef SC_SIGNAL_H
34 #define SC_SIGNAL_H
35 
40 #include "sysc/kernel/sc_event.h"
41 #include "sysc/kernel/sc_process.h"
44 #include "sysc/tracing/sc_trace.h"
45 #include <typeinfo>
46 
47 namespace sc_core {
48 
49 inline
50 bool
51 sc_writer_policy_check_write::check_write( sc_object* target, bool /*value_changed*/ )
52 {
54  if( SC_UNLIKELY_( !m_writer_p.valid() ) ) {
55  // always store first writer
56  sc_process_handle( writer_p ).swap( m_writer_p );
57  } else if( SC_UNLIKELY_(m_writer_p != writer_p && writer_p != 0) ) {
58  // Alternative option: only flag error, if either
59  // - we enforce conflicts across multiple evaluation phases, or
60  // - the new value is different from the previous write
61  //if( !m_delta_only || value_changed )
62  {
63  sc_signal_invalid_writer( target, m_writer_p, writer_p, m_delta_only );
64  // error has been suppressed, accept check as well,
65  // but update current writer to the last "successful" one
66  sc_process_handle( writer_p ).swap( m_writer_p );
67  }
68  }
69  return true;
70 }
71 
72 
73 inline void
75 {
76  if( m_delta_only ) // reset, if we're only checking for delta conflicts
78 }
79 
80 
81 // ----------------------------------------------------------------------------
82 // CLASS : sc_signal_channel
83 //
84 // The sc_signal type-agnostic primitive channel base class.
85 // ----------------------------------------------------------------------------
86 
88  : public sc_prim_channel
89 {
90 protected:
91 
92  sc_signal_channel( const char* name_ )
93  : sc_prim_channel( name_ )
94  , m_change_event_p( 0 )
95  , m_change_stamp( ~sc_dt::UINT64_ONE )
96  {}
97 
98 public:
99 
100  virtual ~sc_signal_channel();
101 
102  // interface methods
103 
104  virtual const char* kind() const
105  { return "sc_signal_channel"; }
106 
107  // get the default event
108  const sc_event& default_event() const
109  { return value_changed_event(); }
110 
111  // get the value changed event
112  const sc_event& value_changed_event() const;
113 
114  // was there an event?
115  bool event() const
116  { return simcontext()->event_occurred(m_change_stamp); }
117 
118 protected:
119  void do_update();
120 
121  // reporting to avoid code bloat in sc_signal_t
122 
123  void deprecated_get_data_ref() const;
124  void deprecated_get_new_value() const;
125  void deprecated_trace() const;
126 
127  sc_event* lazy_kernel_event( sc_event**, const char* ) const;
128  void notify_next_delta( sc_event* ev ) const
129  { if( ev ) ev->notify_next_delta(); }
130 
131 protected:
132  mutable sc_event* m_change_event_p; // value change event if present.
133  sc_dt::uint64 m_change_stamp; // delta of last event
134 
135 private:
136  // disabled
137  sc_signal_channel( const sc_signal_channel& ) /* = delete */;
138  sc_signal_channel& operator=( const sc_signal_channel& ) /* = delete */;
139 };
140 
141 
142 inline
143 ::std::ostream&
144 operator << ( ::std::ostream& os, const sc_signal_channel& a )
145 {
146  a.print( os );
147  return os;
148 }
149 
150 
151 // ----------------------------------------------------------------------------
152 // CLASS : sc_signal_t<T, POL> (implementation-defined)
153 //
154 // The generic sc_signal<T,POL> primitive channel base class
155 // (to reduce complexity of specialisations for bool and sc_logic)
156 // ----------------------------------------------------------------------------
157 
158 template< class T, sc_writer_policy POL >
160  : public sc_signal_inout_if<T>
161  , public sc_signal_channel
162  , protected sc_writer_policy_check<POL>
163 {
164 protected:
169 
170 protected:
171 
172  // constructor and destructor
173 
174  sc_signal_t( const char* name_, const T& initial_value_ )
175  : base_type( name_ )
176  , m_cur_val( initial_value_ )
177  , m_new_val( initial_value_ )
178  {}
179 
180  virtual ~sc_signal_t() {} /* = default; */
181 
182 public:
183 
184  // interface methods
185 
186  virtual const char* kind() const
187  { return "sc_signal"; }
188 
189  virtual void register_port( sc_port_base&, const char* );
190 
192  { return POL; }
193 
194  // get the default event
195  virtual const sc_event& default_event() const
196  { return value_changed_event(); }
197 
198  // get the value changed event
199  virtual const sc_event& value_changed_event() const
200  { return base_type::value_changed_event(); }
201 
202  // read the current value
203  virtual const T& read() const
204  { return m_cur_val; }
205 
206  // get a reference to the current value (for tracing)
207  virtual const T& get_data_ref() const
208  {
209  deprecated_get_data_ref();
210  return m_cur_val;
211  }
212 
213  // was there an event?
214  virtual bool event() const
215  { return base_type::event(); }
216 
217  // write the new value
218  virtual void write( const T& );
219 
220 
221  // other methods
222 
223  operator const T& () const
224  { return read(); }
225 
226 
227  // assignment
228  this_type& operator = ( const T& a )
229  { write( a ); return *this; }
230 
231  this_type& operator = ( const sc_signal_in_if<T>& a )
232  { write( a.read() ); return *this; }
233 
234  this_type& operator = ( const this_type& a )
235  { write( a.read() ); return *this; }
236 
237 
238  const T& get_new_value() const
239  {
240  deprecated_get_new_value();
241  return m_new_val;
242  }
243 
244 
245  void trace( sc_trace_file* tf ) const
246  {
247  deprecated_trace();
248 # ifdef DEBUG_SYSTEMC
249  sc_trace( tf, read(), name() );
250 # else
251  if ( tf ) {}
252 # endif
253  }
254 
255 
256  virtual void print( ::std::ostream& = ::std::cout ) const;
257  virtual void dump( ::std::ostream& = ::std::cout ) const;
258 
259 
260 protected:
261 
262  virtual void update();
263  void do_update();
264 
265 protected:
266  T m_cur_val; // current value of object.
267  T m_new_val; // next value of object.
268 
269 private:
270  // disabled
271  sc_signal_t( const sc_signal_t& ) /* = delete */;
272 };
273 
274 // ----------------------------------------------------------------------------
275 
276 template< class T, sc_writer_policy POL >
277 inline
278 void
280  , const char* if_typename_ )
281 {
282  bool is_output = std::string( if_typename_ ) == typeid(if_type).name();
283  if( !policy_type::check_port( this, &port_, is_output ) )
284  ((void)0); // fallback? error has been suppressed ...
285 }
286 
287 
288 // write the new value
289 
290 template< class T, sc_writer_policy POL >
291 inline
292 void
293 sc_signal_t<T,POL>::write( const T& value_ )
294 {
295  // first write per eval phase: m_new_val == m_cur_val
296  bool value_changed = !( m_new_val == value_ );
297  if ( !policy_type::check_write(this, value_changed) )
298  return;
299 
300  m_new_val = value_;
301  if( value_changed || policy_type::needs_update() ) {
302  request_update();
303  }
304 }
305 
306 
307 template< class T, sc_writer_policy POL >
308 inline
309 void
310 sc_signal_t<T,POL>::print( ::std::ostream& os ) const
311 {
312  os << m_cur_val;
313 }
314 
315 template< class T, sc_writer_policy POL >
316 void
317 sc_signal_t<T,POL>::dump( ::std::ostream& os ) const
318 {
319  os << " name = " << name() << ::std::endl;
320  os << " value = " << m_cur_val << ::std::endl;
321  os << "new value = " << m_new_val << ::std::endl;
322 }
323 
324 
325 template< class T, sc_writer_policy POL >
326 void
328 {
329  policy_type::update();
330  if( !( m_new_val == m_cur_val ) ) {
331  do_update();
332  }
333 }
334 
335 template< class T, sc_writer_policy POL >
336 inline void
338 {
339  base_type::do_update();
340  m_cur_val = m_new_val;
341 }
342 
343 // ----------------------------------------------------------------------------
344 // CLASS : sc_signal<T, POL>
345 //
346 // The sc_signal<T,POL> primitive channel class
347 // ----------------------------------------------------------------------------
348 
349 template< class T, sc_writer_policy POL /* = SC_DEFAULT_WRITER_POLICY */ >
351  : public sc_signal_t<T,POL>
352 {
353 public:
357  typedef T value_type;
359 
360  // constructors and destructor
361 
363  : base_type( sc_gen_unique_name( "signal" ), value_type() )
364  {}
365 
366  explicit
367  sc_signal( const char* name_ )
368  : base_type( name_, value_type() )
369  {}
370 
371  sc_signal( const char* name_, const value_type& initial_value_ )
372  : base_type( name_, initial_value_ )
373  {}
374 
375  virtual ~sc_signal() {} /* = default; */
376 
377  // assignment
378  this_type& operator = ( const value_type& a )
379  { base_type::operator=(a); return *this; }
380 
381  this_type& operator = ( const sc_signal_in_if<value_type>& a )
382  { base_type::operator=(a); return *this; }
383 
384  this_type& operator = ( const this_type& a )
385  { base_type::operator=(a); return *this; }
386 
387 private:
388  // disabled
389  sc_signal( const sc_signal& ) /* = delete */;
390 };
391 
392 
393 // ----------------------------------------------------------------------------
394 // CLASS : sc_signal<bool>
395 //
396 // Specialization of sc_signal<T> for type bool.
397 // ----------------------------------------------------------------------------
398 
400 
404 
405 template< sc_writer_policy POL >
406 class SC_API sc_signal<bool,POL>
407  : public sc_signal_t<bool,POL>
408 {
409 protected:
412  typedef bool value_type;
414 
415 public:
416 
417  // constructors and destructor
418 
420  : base_type( sc_gen_unique_name( "signal" ), value_type() )
421  , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 ) , m_reset_p( 0 )
422  {}
423 
424  explicit
425  sc_signal( const char* name_ )
426  : base_type( name_, value_type() )
427  , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 ) , m_reset_p( 0 )
428  {}
429 
430  sc_signal( const char* name_, const value_type& initial_value_ )
431  : base_type( name_, initial_value_ )
432  , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 ) , m_reset_p( 0 )
433  {}
434 
435  virtual ~sc_signal();
436 
437  // get the positive edge event
438  virtual const sc_event& posedge_event() const;
439 
440  // get the negative edge event
441  virtual const sc_event& negedge_event() const;
442 
443  // was there a positive edge event?
444  virtual bool posedge() const
445  { return ( this->event() && this->m_cur_val ); }
446 
447  // was there a negative edge event?
448  virtual bool negedge() const
449  { return ( this->event() && ! this->m_cur_val ); }
450 
451 
452  // assignment
453  this_type& operator = ( const value_type& a )
454  { base_type::operator=(a); return *this; }
455 
456  this_type& operator = ( const sc_signal_in_if<value_type>& a )
457  { base_type::operator=(a); return *this; }
458 
459  this_type& operator = ( const this_type& a )
460  { base_type::operator=(a); return *this; }
461 
462 protected:
463 
464  virtual void update();
465  void do_update();
466 
467  virtual bool is_clock() const { return false; }
468 
469 protected:
470  mutable sc_event* m_negedge_event_p; // negative edge event if present.
471  mutable sc_event* m_posedge_event_p; // positive edge event if present.
472  mutable sc_reset* m_reset_p; // reset mechanism if present.
473 
474 private:
475  // reset creation
476  virtual sc_reset* is_reset() const;
477 
478  // disabled
479  sc_signal( const this_type& ) /* = delete */;
480 };
481 
482 
492 
493 template< sc_writer_policy POL >
495  : public sc_signal_t<sc_dt::sc_logic,POL>
496 {
497 protected:
502 
503 public:
504 
506  : base_type( sc_gen_unique_name( "signal" ), value_type() )
507  , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 )
508  {}
509 
510  explicit
511  sc_signal( const char* name_ )
512  : base_type( name_, value_type() )
513  , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 )
514  {}
515 
516  sc_signal( const char* name_, const value_type& initial_value_ )
517  : base_type( name_, initial_value_ )
518  , m_negedge_event_p( 0 ) , m_posedge_event_p( 0 )
519  {}
520 
521  virtual ~sc_signal();
522 
523  // get the positive edge event
524  virtual const sc_event& posedge_event() const;
525 
526  // get the negative edge event
527  virtual const sc_event& negedge_event() const;
528 
529 
530  // was there a positive edge event?
531  virtual bool posedge() const
532  { return ( this->event() && this->m_cur_val == sc_dt::SC_LOGIC_1 ); }
533 
534  // was there a negative edge event?
535  virtual bool negedge() const
536  { return ( this->event() && this->m_cur_val == sc_dt::SC_LOGIC_0 ); }
537 
538 
539  // assignment
540  this_type& operator = ( const value_type& a )
541  { base_type::operator=(a); return *this; }
542 
543  this_type& operator = ( const sc_signal_in_if<value_type>& a )
544  { base_type::operator=(a); return *this; }
545 
546  this_type& operator = ( const this_type& a )
547  { base_type::operator=(a); return *this; }
548 
549 protected:
550 
551  virtual void update();
552  void do_update();
553 
554 protected:
555  mutable sc_event* m_negedge_event_p; // negative edge event if present.
556  mutable sc_event* m_posedge_event_p; // positive edge event if present.
557 
558 private:
559  // disabled
560  sc_signal( const this_type& ) /* = delete */;
561 };
562 
563 } // namespace sc_core
564 
565 /*****************************************************************************
566 
567  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
568  changes you are making here.
569 
570  Name, Affiliation, Date:
571  Description of Modification:
572 
573  *****************************************************************************/
574 //$Log: sc_signal.h,v $
575 //Revision 1.16 2011/08/26 20:45:42 acg
576 // Andy Goodrich: moved the modification log to the end of the file to
577 // eliminate source line number skew when check-ins are done.
578 //
579 //Revision 1.15 2011/08/15 16:43:24 acg
580 // Torsten Maehne: changes to remove unused argument warnings.
581 //
582 //Revision 1.14 2011/06/25 17:08:38 acg
583 // Andy Goodrich: Jerome Cornet's changes to use libtool to build the
584 // library.
585 //
586 //Revision 1.13 2011/04/13 02:59:09 acg
587 // Andy Goodrich: made events internal to signals into kernel events.
588 //
589 //Revision 1.12 2011/04/08 18:22:46 acg
590 // Philipp A. Hartmann: use the context of the primitive channel to get
591 // the change stamp value.
592 //
593 //Revision 1.11 2011/04/05 20:48:09 acg
594 // Andy Goodrich: changes to make sure that event(), posedge() and negedge()
595 // only return true if the clock has not moved.
596 //
597 //Revision 1.10 2011/04/05 07:10:55 acg
598 // Andy Goodrich: added line that I dropped in sc_signal<sc_dt::sc_logic>.
599 //
600 //Revision 1.9 2011/04/05 06:15:18 acg
601 // Philipp A. Hartmann: sc_writer_policy: ignore no-ops in delta check.
602 //
603 //Revision 1.8 2011/03/23 16:17:22 acg
604 // Andy Goodrich: hide the sc_events that are kernel related.
605 //
606 //Revision 1.7 2011/03/06 15:55:08 acg
607 // Andy Goodrich: Changes for named events.
608 //
609 //Revision 1.6 2011/02/18 20:23:45 acg
610 // Andy Goodrich: Copyright update.
611 //
612 //Revision 1.5 2011/02/07 19:16:50 acg
613 // Andy Goodrich: changes for handling multiple writers.
614 //
615 //Revision 1.4 2011/01/25 20:50:37 acg
616 // Andy Goodrich: changes for IEEE 1666 2011.
617 //
618 //Revision 1.3 2010/12/07 19:50:37 acg
619 // Andy Goodrich: addition of writer policies, courtesy of Philipp Hartmann.
620 //
621 //Revision 1.1.1.1 2006/12/15 20:20:04 acg
622 //SystemC 2.3
623 //
624 //Revision 1.14 2006/05/08 17:52:47 acg
625 // Andy Goodrich:
626 // (1) added David Long's forward declarations for friend functions,
627 // methods, and operators to keep the Microsoft compiler happy.
628 // (2) Added delta_count() method to sc_prim_channel for use by
629 // sc_signal so that the friend declaration in sc_simcontext.h
630 // can be for a non-templated class (i.e., sc_prim_channel.)
631 //
632 //Revision 1.12 2006/04/11 23:11:57 acg
633 // Andy Goodrich: Changes for reset support that only includes
634 // sc_cthread_process instances.
635 //
636 //Revision 1.11 2006/03/13 20:19:44 acg
637 // Andy Goodrich: changed sc_event instances into pointers to sc_event instances
638 // that are allocated as needed. This saves considerable storage for large
639 // numbers of signals, etc.
640 //
641 //Revision 1.10 2006/01/26 21:00:50 acg
642 // Andy Goodrich: conversion to use sc_event::notify(SC_ZERO_TIME) instead of
643 // sc_event::notify_delayed()
644 //
645 //Revision 1.9 2006/01/24 20:45:41 acg
646 //Andy Goodrich: converted notify_delayed() calls into notify_next_delta() calls
647 //to eliminate deprecation warnings. notify_next_delta() is an implemenation-
648 //dependent method of sc_event. It is simpler than notify_delayed(), and should
649 //speed up simulation speeds.
650 //
651 //Revision 1.8 2006/01/19 19:18:25 acg
652 //Andy Goodrich: eliminated check_writer in favor of inline code within the
653 //write() method since we always execute the check_writer code even when
654 //check writing is turned off.
655 //
656 //Revision 1.7 2006/01/19 00:30:57 acg
657 //Andy Goodrich: Yet another implementation for disabling write checks on
658 //signals. This version uses an environment variable, SC_SIGNAL_WRITE_CHECK,
659 //that when set to DISABLE will turn off write checking.
660 //
661 //Revision 1.6 2006/01/18 21:42:26 acg
662 //Andy Goodrich: Changes for check writer support, and tightening up sc_clock
663 //port usage.
664 //
665 //Revision 1.5 2006/01/13 20:41:59 acg
666 //Andy Goodrich: Changes to add port registration to the things that are
667 //checked when SC_NO_WRITE_CHECK is not defined.
668 //
669 //Revision 1.4 2006/01/13 18:47:20 acg
670 //Reversed sense of multiwriter signal check. It now defaults to ON unless the
671 //user defines SC_NO_WRITE_CHEK before inclusion of the file.
672 //
673 //Revision 1.3 2006/01/03 23:18:26 acg
674 //Changed copyright to include 2006.
675 //
676 //Revision 1.2 2005/12/20 21:58:18 acg
677 //Removed Makefile.in, changed the event() methods to use sc_simcontext::event_occurred.
678 //
679 //Revision 1.1.1.1 2005/12/19 23:16:43 acg
680 //First check in of SystemC 2.1 into its own archive.
681 //
682 //Revision 1.19 2005/09/15 23:01:51 acg
683 //Added std:: prefix to appropriate methods and types to get around
684 //issues with the Edison Front End.
685 //
686 //Revision 1.18 2005/06/10 22:43:55 acg
687 //Added CVS change log annotation.
688 //
689 
690 #endif
691 
692 // Taf!
virtual void register_port(sc_port_base &, const char *)
Definition: sc_signal.h:279
sc_signal_channel base_type
Definition: sc_signal.h:166
sc_signal_t< T, POL > this_type
Definition: sc_signal.h:167
The sc_signal<T> input interface class.
Definition: sc_signal_ifs.h:49
inline ::std::ostream & operator<<(::std::ostream &os, const sc_fifo< T > &a)
Definition: sc_fifo.h:431
virtual void print(::std::ostream &os=::std::cout) const
sc_signal(const char *name_, const value_type &initial_value_)
Definition: sc_signal.h:371
Process base class support.
virtual ~sc_signal_t()
Definition: sc_signal.h:180
void sc_trace(sc_trace_file *tf, const sc_in< T > &port, const std::string &name)
sc_writer_policy_check< POL > policy_type
Definition: sc_signal.h:413
sc_signal_t< sc_dt::sc_logic, POL > base_type
Definition: sc_signal.h:498
sc_signal_inout_if< T > if_type
Definition: sc_signal.h:354
Abstract base class of all SystemC `simulation&#39; objects.
Definition: sc_object.h:61
virtual void dump(::std::ostream &=::std::cout) const
Definition: sc_signal.h:317
virtual sc_writer_policy get_writer_policy() const
Definition: sc_signal.h:191
Base classes of all port classes.
sc_dt::uint64 m_change_stamp
Definition: sc_signal.h:133
virtual const T & read() const
Definition: sc_signal.h:203
The sc_signal<T> interface classes.
Abstract base class of all primitive channel classes.
sc_signal_channel(const char *name_)
Definition: sc_signal.h:92
Abstract base class for class sc_port_b.
Definition: sc_port.h:81
sc_writer_policy_check< POL > policy_type
Definition: sc_signal.h:168
The event class.
Definition: sc_event.h:256
const T & get_new_value() const
Definition: sc_signal.h:238
SC_API const sc_logic SC_LOGIC_0
virtual bool is_clock() const
Definition: sc_signal.h:467
virtual const sc_event & default_event() const
Definition: sc_signal.h:195
uint64_t uint64
Definition: sc_nbdefs.h:189
The sc_signal<T> input/output interface class.
virtual const sc_event & value_changed_event() const
Definition: sc_signal.h:199
Four-valued logic type.
Definition: sc_logic.h:104
virtual bool event() const
Definition: sc_signal.h:214
virtual bool posedge() const
Definition: sc_signal.h:444
sc_signal_t< T, POL > base_type
Definition: sc_signal.h:355
sc_signal< bool, POL > this_type
Definition: sc_signal.h:411
virtual ~sc_signal()
Definition: sc_signal.h:375
const sc_event & default_event() const
Definition: sc_signal.h:108
void notify_next_delta(sc_event *ev) const
Definition: sc_signal.h:128
sc_signal< sc_dt::sc_logic, POL > this_type
Definition: sc_signal.h:499
SC_API const sc_logic SC_LOGIC_1
#define SC_UNLIKELY_(x)
Definition: sc_cmnhdr.h:85
bool check_write(sc_object *target, bool value_changed)
Definition: sc_signal.h:51
void swap(sc_process_handle &other)
virtual void write(const T &)
Definition: sc_signal.h:293
sc_signal(const char *name_, const value_type &initial_value_)
Definition: sc_signal.h:516
SC_API const char * sc_gen_unique_name(const char *, bool preserve_first)
sc_signal_t< bool, POL > base_type
Definition: sc_signal.h:410
sc_signal< T, POL > this_type
Definition: sc_signal.h:356
Definition of the simulation context class.
sc_signal(const char *name_)
Definition: sc_signal.h:367
C++ implementation of logic type. Behaves.
virtual const char * kind() const
Definition: sc_signal.h:186
sc_writer_policy_check< POL > policy_type
Definition: sc_signal.h:358
virtual const char * kind() const
Definition: sc_signal.h:104
sc_simcontext * sc_get_curr_simcontext()
sc_writer_policy_check< POL > policy_type
Definition: sc_signal.h:501
#define SC_API_TEMPLATE_DECL_
Definition: sc_cmnhdr.h:177
virtual const T & get_data_ref() const
Definition: sc_signal.h:207
virtual bool negedge() const
Definition: sc_signal.h:448
void trace(sc_trace_file *tf) const
Definition: sc_signal.h:245
class SC_API sc_logic
Definition: sc_signal_ifs.h:43
The sc_signal<T> writer policy definition.
sc_process_b * get_current_writer() const
sc_signal_t(const char *name_, const T &initial_value_)
Definition: sc_signal.h:174
Abstract base class of all primitive channel classes.
SC_API void sc_signal_invalid_writer(sc_object *target, sc_object *first_writer, sc_object *second_writer, bool check_delta)
#define SC_API
Definition: sc_cmnhdr.h:168
Original Author: Martin Janssen, Synopsys, Inc., 2001-05-21.
sc_signal_inout_if< T > if_type
Definition: sc_signal.h:165
sc_signal(const char *name_, const value_type &initial_value_)
Definition: sc_signal.h:430
virtual void print(::std::ostream &=::std::cout) const
Definition: sc_signal.h:310
static const uint64 UINT64_ONE
Definition: sc_nbdefs.h:198
virtual void update()
Definition: sc_signal.h:327
sc_signal(const char *name_)
Definition: sc_signal.h:425