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