gem5  v20.1.0.0
scx_signal_unsigned.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_unsigned.cpp -- The sc_signal<sc_unsigned<W> > implementations.
23 
24  Original Author: Andy Goodrich, Forte Design Systems, 2002-10-22
25 
26  *****************************************************************************/
27 
28 /*****************************************************************************
29 
30  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
31  changes you are making here.
32 
33  Name, Affiliation, Date:
34  Description of Modification:
35 
36  *****************************************************************************/
37 
38 /*
39 $Log: scx_signal_unsigned.h,v $
40 Revision 1.1 2011/08/15 17:31:11 acg
41  Andy Goodrich: moved specialized signals from examples to this tree.
42 
43 Revision 1.2 2011/08/15 16:43:24 acg
44  Torsten Maehne: changes to remove unused argument warnings.
45 
46 Revision 1.1.1.1 2006/12/15 20:20:03 acg
47 SystemC 2.3
48 
49 Revision 1.2 2005/12/26 20:11:14 acg
50 Fixed up copyright.
51 
52 Revision 1.1.1.1 2005/12/19 23:16:42 acg
53 First check in of SystemC 2.1 into its own archive.
54 
55 Revision 1.17 2005/09/15 23:01:52 acg
56 Added std:: prefix to appropriate methods and types to get around
57 issues with the Edison Front End.
58 
59 Revision 1.16 2005/05/03 19:52:26 acg
60 Get proper header locations on includes.
61 
62 Revision 1.15 2005/05/03 19:50:20 acg
63 Name space version.
64 
65 Revision 1.12 2005/04/11 19:05:36 acg
66 Change to sc_clock for Microsoft VCC 6.0. Changes for namespaces
67 
68 Revision 1.11 2005/04/03 22:52:52 acg
69 Namespace changes.
70 
71 Revision 1.10 2005/03/21 22:31:33 acg
72 Changes to sc_core namespace.
73 
74 Revision 1.9 2004/09/27 21:01:59 acg
75 Andy Goodrich - Forte Design Systems, Inc.
76  - This is specialized signal support that allows better use of signals
77  and ports whose target value is a SystemC native type.
78 
79 */
80 
81 
82 
83 #include <systemc>
84 #include <typeinfo>
85 
86 /*****************************************************************************
87 
88  sc_signal_unsigned.h -- The sc_signal<sc_dt::sc_biguint<W> > definitions.
89 
90  Original Author: Andy Goodrich, Forte Design Systems, 2002-10-22
91 
92  *****************************************************************************/
93 
94 /*****************************************************************************
95 
96  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
97  changes you are making here.
98 
99  Name, Affiliation, Date:
100  Description of Modification:
101 
102  *****************************************************************************/
103 
104 /*
105 $Log: scx_signal_unsigned.h,v $
106 Revision 1.1 2011/08/15 17:31:11 acg
107  Andy Goodrich: moved specialized signals from examples to this tree.
108 
109 Revision 1.3 2011/08/15 16:43:24 acg
110  Torsten Maehne: changes to remove unused argument warnings.
111 
112 Revision 1.2 2011/06/28 21:23:02 acg
113  Andy Goodrich: merging of SCV tree.
114 
115 Revision 1.1.1.1 2006/12/15 20:20:03 acg
116 SystemC 2.3
117 
118 Revision 1.4 2006/10/23 19:40:36 acg
119  Andy Goodrich: added an explicit dynamic cast to keep gcc 4.x happy.
120 
121 Revision 1.3 2006/03/21 01:31:49 acg
122  Andy Goodrich: changed over to sc_get_current_process_b() from
123  sc_get_current_process_base() since the function's name changed.
124 
125 Revision 1.2 2005/12/26 20:11:14 acg
126 Fixed up copyright.
127 
128 Revision 1.1.1.1 2005/12/19 23:16:42 acg
129 First check in of SystemC 2.1 into its own archive.
130 
131 Revision 1.28 2005/09/15 23:01:52 acg
132 Added std:: prefix to appropriate methods and types to get around
133 issues with the Edison Front End.
134 
135 Revision 1.27 2005/07/30 03:44:11 acg
136 Changes from 2.1.
137 
138 Revision 1.26 2005/05/09 17:17:12 acg
139 Changes from 2.1.
140 
141 Revision 1.25 2005/05/08 19:04:06 acg
142 Fix bug in concat_set(int64,off). Other changes from 2.1 examples usage.
143 
144 Revision 1.24 2005/05/03 19:50:20 acg
145 Name space version.
146 
147 Revision 1.22 2005/03/21 22:31:33 acg
148 Changes to sc_core namespace.
149 
150 Revision 1.21 2005/01/10 17:51:58 acg
151 Improvements.
152 
153 Revision 1.20 2004/11/09 00:11:27 acg
154 Added support for sc_generic_base<T> in place of sc_concatref. sc_concatref
155 now is derived from sc_generic_base<sc_concatref>.
156 
157 Revision 1.19 2004/09/27 21:01:59 acg
158 Andy Goodrich - Forte Design Systems, Inc.
159  - This is specialized signal support that allows better use of signals
160  and ports whose target value is a SystemC native type.
161 
162 */
163 
164 
165 #if !defined(SC_SIGNAL_UNSIGNED_H)
166 #define SC_SIGNAL_UNSIGNED_H
167 
168 #if ( !defined(_MSC_VER) || _MSC_VER > 1200 )
169 # define SC_TEMPLATE template<int W>
170 #else
171 # define SC_TEMPLATE template<> template<int W>
172 #endif
173 
174 
175 // FORWARD REFERENCES AND USINGS:
176 
177 using sc_dt::sc_signed;
178 using sc_dt::int64;
179 using sc_dt::uint64;
180 
181 namespace sc_core {
182 
183 class sc_unsigned_sigref;
184 
185 //==============================================================================
186 // CLASS sc_unsigned_part_if
187 //
188 // This class provides generic access to part selections for signals whose
189 // data type is sc_dt::sc_biguint<W>. This class serves as the base class for the
190 // sc_dt::sc_biguint<W> specialization of the sc_signal_in_if<T> class. The methods
191 // in this class may be over-ridden individually, those that are not overridden
192 // will produce an error message when called. The methods are used by the
193 // sc_unsigned_sigref class.
194 //
195 // Notes:
196 // (1) Descriptions of the methods and operators in this class appear with
197 // their implementations in sc_signal<sc_dt::sc_biguint<W> >.
198 //==============================================================================
199 class sc_unsigned_part_if : virtual public sc_interface {
200  protected:
201  // constructor:
203 
204  public:
205  // perform a part read.
207  virtual sc_dt::sc_unsigned read_part( int left, int right ) const;
208 
209  // perform a part write.
210  virtual sc_unsigned_sigref& select_part( int left, int right );
211  virtual void write_part( sc_dt::int64 v, int left, int right );
212  virtual void write_part( sc_dt::uint64 v, int left, int right );
213  virtual void write_part( const sc_dt::sc_signed& v, int left, int right );
214  virtual void write_part( const sc_dt::sc_unsigned& v, int left, int right );
215 
216 
217  private:
220 };
221 
222 
223 //==============================================================================
224 // CLASS sc_signal_in_if<sc_dt::sc_biguint<W> >
225 //
226 // This is the class specializations for the sc_signal_in_if<T> class to
227 // provide additional features for sc_signal instances whose template is
228 // sc_dt::sc_biguint<W>, including part access.
229 //
230 // Notes:
231 // (1) Descriptions of the methods and operators in this class appear with
232 // their implementations in sc_signal<sc_dt::sc_biguint<W> >.
233 //==============================================================================
234 template< int W >
235 class sc_signal_in_if<sc_dt::sc_biguint<W> > : public sc_unsigned_part_if {
236  friend class sc_unsigned_sigref;
237  public:
239 
240  // get the value changed event
241  virtual const sc_event& value_changed_event() const = 0;
242 
243 
244  // read the current value
245  virtual const sc_dt::sc_biguint<W>& read() const = 0;
246 
247  // get a reference to the current value (for tracing)
248  virtual const sc_dt::sc_biguint<W>& get_data_ref() const = 0;
249 
250 
251  // was there a value changed event?
252  virtual bool event() const = 0;
253 
254  protected:
255  // constructor
257  {}
258 
259  private: // disabled
260  sc_signal_in_if( const this_type& );
261  this_type& operator = ( const this_type& );
262 };
263 
264 //=============================================================================
265 // CLASS : sc_unsigned_sigref
266 //
267 // Proxy class for sc_signal_uint bit and part selection.
268 //=============================================================================
270 {
271  public:
273  virtual ~sc_unsigned_sigref() {}
274  virtual void concat_set(sc_dt::int64 src, int low_i);
275  virtual void concat_set(const sc_dt::sc_signed& src, int low_i);
276  virtual void concat_set(const sc_dt::sc_unsigned& src, int low_i);
277  virtual void concat_set(const sc_dt::sc_lv_base& src, int low_i);
278  virtual void concat_set(sc_dt::uint64 src, int low_i);
279 
280  public:
281  inline void initialize( sc_unsigned_part_if* if_p, int left_, int right_ );
282 
283  public:
284  inline void operator = ( sc_dt::uint64 v );
285  inline void operator = ( const char* v );
286  inline void operator = ( unsigned long v );
287  inline void operator = ( long v );
288  inline void operator = ( unsigned int v );
289  inline void operator = ( int v );
290  inline void operator = ( sc_dt::int64 v );
291  inline void operator = ( double v );
292  inline void operator = ( const sc_unsigned_sigref& v );
293  template<typename T>
294  inline void operator = ( const sc_dt::sc_generic_base<T>& v );
295  inline void operator = ( const sc_dt::sc_signed& v );
296  inline void operator = ( const sc_dt::sc_unsigned& v );
297  inline void operator = ( const sc_dt::sc_bv_base& v );
298  inline void operator = ( const sc_dt::sc_lv_base& v );
299 
300  public:
301  static sc_vpool<sc_unsigned_sigref> m_pool; // Pool of objects to use.
302 
303  protected:
304  sc_unsigned_part_if* m_if_p; // Target for selection.
305 
306  private:
307 
308  // disabled
310 };
311 
312 
313 //==============================================================================
314 // CLASS sc_signal<sc_dt::sc_biguint<W> >
315 //
316 // This class implements a signal whose value acts like an sc_dt::sc_biguint<W> data
317 // value. This class is a specialization of the generic sc_signal class to
318 // implement tailored support for the sc_dt::sc_biguint<W> class.
319 //
320 // Notes:
321 // (1) Descriptions of the methods and operators in this class appear with
322 // their implementations.
323 //==============================================================================
325 class sc_signal<sc_dt::sc_biguint<W> > :
326  public sc_dt::sc_biguint<W>,
327  public sc_prim_channel,
328  public sc_signal_inout_if<sc_dt::sc_biguint<W> >
329 {
330  public: // typedefs
332 
333  public: // constructors and destructor:
334  inline sc_signal();
335  explicit inline sc_signal(const char* name_);
336  virtual inline ~sc_signal();
337 
338  public: // base methods:
339  inline bool base_event() const;
340  inline const sc_dt::sc_biguint<W>& base_read() const;
341  inline const sc_event& base_value_changed_event() const;
342  inline void base_write( sc_dt::int64 value );
343  inline void base_write( sc_dt::uint64 value );
344  inline void base_write( const sc_dt::sc_signed& value );
345  inline void base_write( const sc_dt::sc_unsigned& value );
346 
347  public: // sc_prim_channel virtual methods:
348  virtual inline const char* kind() const;
349  virtual inline void update();
350 
351  public: // sc_interface virtual methods:
352  virtual inline const sc_event& default_event() const;
353  virtual inline void register_port(
354  sc_port_base& port_, const char* if_typename_ );
355 
356  public: // sc_unsigned_channel virtual methods:
357  virtual inline sc_dt::sc_unsigned* part_read_target();
358  virtual inline sc_dt::sc_unsigned read_part(int left, int right) const;
359  virtual sc_unsigned_sigref& select_part( int left, int right );
360  virtual inline void write_part( sc_dt::int64 v, int left, int right );
361  virtual inline void write_part( sc_dt::uint64 v, int left, int right );
362  virtual inline void write_part( const sc_dt::sc_signed& v, int left, int right );
363  virtual inline void write_part(const sc_dt::sc_unsigned& v, int left, int right);
364 
365  public: // interface virtual methods:
366  virtual inline bool event() const;
367  virtual inline const sc_dt::sc_biguint<W>& get_data_ref() const;
368  virtual inline sc_signal<sc_dt::sc_biguint<W> >& get_signal();
369  virtual inline const sc_dt::sc_biguint<W>& read() const;
370  virtual inline const sc_event& value_changed_event() const;
371  virtual inline void write( const sc_in<sc_dt::sc_biguint<W> >& value );
372  virtual inline void write( const sc_inout<sc_dt::sc_biguint<W> >& value );
373  virtual inline void write( const sc_dt::sc_biguint<W>& value );
374 
375  public: // part selections:
376  inline sc_unsigned_sigref& operator () ( int left, int right );
377  // #### Need to add range() and bit()!
378  inline sc_unsigned_sigref& operator [] ( int bit );
379 
380  public: // operators:
381  inline void operator = ( const this_type& new_val );
382  inline void operator = ( const char* new_val );
383  inline void operator = ( sc_dt::uint64 new_val );
384  inline void operator = ( sc_dt::int64 new_val );
385  inline void operator = ( int new_val );
386  inline void operator = ( long new_val );
387  inline void operator = ( short new_val );
388  inline void operator = ( unsigned int new_val );
389  inline void operator = ( unsigned long new_val );
390  inline void operator = ( unsigned short new_val );
391  template<typename T>
392  inline void operator = ( const sc_dt::sc_generic_base<T>& new_val );
393  inline void operator = ( const sc_dt::sc_signed& new_val );
394  inline void operator = ( const sc_dt::sc_unsigned& new_val );
395  inline void operator = ( const sc_dt::sc_bv_base& new_val );
396  inline void operator = ( const sc_dt::sc_lv_base& new_val );
397 
398  // concatenation methods (we inherit length and gets from sc_dt::sc_biguint<W>):
399 
400  virtual inline void concat_set(sc_dt::int64 src, int low_i);
401  virtual inline void concat_set(const sc_dt::sc_lv_base& src, int low_i);
402  virtual inline void concat_set(const sc_dt::sc_signed& src, int low_i);
403  virtual inline void concat_set(const sc_dt::sc_unsigned& src, int low_i);
404  virtual inline void concat_set(sc_dt::uint64 src, int low_i);
405 
406  protected: // debugging methods:
407  // #### void check_port();
408  void check_writer();
409 
410  private: // Disabled operations that sc_dt::sc_biguint<W> supports:
411  sc_dt::sc_unsigned& operator ++ (); // prefix
412  const sc_dt::sc_unsigned& operator ++ (int); // postfix
413  sc_dt::sc_unsigned& operator -- (); // prefix
414  const sc_dt::sc_unsigned& operator -- (int); // postfix
415  sc_dt::sc_unsigned& operator += (const sc_dt::sc_signed& );
416  sc_dt::sc_unsigned& operator += (const sc_dt::sc_unsigned& );
417  sc_dt::sc_unsigned& operator += (sc_dt::int64 );
418  sc_dt::sc_unsigned& operator += (sc_dt::uint64 );
419  sc_dt::sc_unsigned& operator += (long );
420  sc_dt::sc_unsigned& operator += (unsigned long );
421  sc_dt::sc_unsigned& operator += (int );
422  sc_dt::sc_unsigned& operator += (unsigned int );
423  sc_dt::sc_unsigned& operator -= (const sc_dt::sc_signed& );
424  sc_dt::sc_unsigned& operator -= (const sc_dt::sc_unsigned& );
425  sc_dt::sc_unsigned& operator -= (sc_dt::int64 );
426  sc_dt::sc_unsigned& operator -= (sc_dt::uint64 );
427  sc_dt::sc_unsigned& operator -= (long );
428  sc_dt::sc_unsigned& operator -= (unsigned long );
429  sc_dt::sc_unsigned& operator -= (int );
430  sc_dt::sc_unsigned& operator -= (unsigned int );
431  sc_dt::sc_unsigned& operator *= (const sc_dt::sc_signed& );
432  sc_dt::sc_unsigned& operator *= (const sc_dt::sc_unsigned& );
433  sc_dt::sc_unsigned& operator *= (sc_dt::int64 );
434  sc_dt::sc_unsigned& operator *= (sc_dt::uint64 );
435  sc_dt::sc_unsigned& operator *= (long );
436  sc_dt::sc_unsigned& operator *= (unsigned long );
437  sc_dt::sc_unsigned& operator *= (int );
438  sc_dt::sc_unsigned& operator *= (unsigned int );
439  sc_dt::sc_unsigned& operator /= (const sc_dt::sc_signed& );
440  sc_dt::sc_unsigned& operator /= (const sc_dt::sc_unsigned& );
441  sc_dt::sc_unsigned& operator /= (sc_dt::int64 );
442  sc_dt::sc_unsigned& operator /= (sc_dt::uint64 );
443  sc_dt::sc_unsigned& operator /= (long );
444  sc_dt::sc_unsigned& operator /= (unsigned long );
445  sc_dt::sc_unsigned& operator /= (int );
446  sc_dt::sc_unsigned& operator /= (unsigned int );
447  sc_dt::sc_unsigned& operator %= (const sc_dt::sc_signed& );
448  sc_dt::sc_unsigned& operator %= (const sc_dt::sc_unsigned& );
449  sc_dt::sc_unsigned& operator %= (sc_dt::int64 );
450  sc_dt::sc_unsigned& operator %= (sc_dt::uint64 );
451  sc_dt::sc_unsigned& operator %= (long );
452  sc_dt::sc_unsigned& operator %= (unsigned long );
453  sc_dt::sc_unsigned& operator %= (int );
454  sc_dt::sc_unsigned& operator %= (unsigned int );
460  sc_dt::sc_unsigned& operator &= (unsigned long );
462  sc_dt::sc_unsigned& operator &= (unsigned int );
468  sc_dt::sc_unsigned& operator |= (unsigned long );
470  sc_dt::sc_unsigned& operator |= (unsigned int );
476  sc_dt::sc_unsigned& operator ^= (unsigned long );
478  sc_dt::sc_unsigned& operator ^= (unsigned int );
479 
480  protected:
481  mutable sc_event* m_changed_event_p; // Value changed event this object.
482  sc_dt::uint64 m_event_delta; // Delta cycle of last event.
483  sc_dt::sc_unsigned m_new_val; // New value for this object instance.
484  sc_port_base* m_output_p; // Single write port verify field.
485  sc_process_b* m_writer_p; // Single writer verify field.
486 };
487 
488 
489 SC_TEMPLATE // Return true if a changed event happened in the last delta cycle.
490 inline bool sc_signal<sc_dt::sc_biguint<W> >::base_event() const
491 {
492  return simcontext()->delta_count() == m_event_delta + 1;
493 }
494 
495 
496 SC_TEMPLATE // Return this object's sc_dt::sc_biguint<W> object instance.
497 inline const sc_dt::sc_biguint<W>& sc_signal<sc_dt::sc_biguint<W> >::base_read() const
498 {
499  return *this;
500 }
501 
502 
503 SC_TEMPLATE // Return the value changed event, allocating it if necessary.
504 inline const sc_event& sc_signal<sc_dt::sc_biguint<W> >::base_value_changed_event() const
505 {
506  if ( !m_changed_event_p ) m_changed_event_p = new sc_event;
507  return *m_changed_event_p;
508 }
509 
510 
511 SC_TEMPLATE // Write a const sc_dt::sc_signed& value to this object instance.
512 inline void sc_signal<sc_dt::sc_biguint<W> >::base_write( const sc_dt::sc_signed& value )
513 {
514 # if defined(DEBUG_SYSTEMC)
515  check_writer();
516 # endif
517  m_new_val = value;
518  request_update();
519 }
520 
521 SC_TEMPLATE // Write a const sc_dt::sc_unsigned& value to this object instance.
522 inline void sc_signal<sc_dt::sc_biguint<W> >::base_write( const sc_dt::sc_unsigned& value )
523 {
524 # if defined(DEBUG_SYSTEMC)
525  check_writer();
526 # endif
527  m_new_val = value;
528  request_update();
529 }
530 
531 SC_TEMPLATE // Write a sc_dt::int64 value to this object instance.
532 inline void sc_signal<sc_dt::sc_biguint<W> >::base_write( sc_dt::int64 value )
533 {
534 # if defined(DEBUG_SYSTEMC)
535  check_writer();
536 # endif
537  m_new_val = value;
538  request_update();
539 }
540 
541 
542 SC_TEMPLATE // Write a sc_dt::uint64 value to this object instance.
543 inline void sc_signal<sc_dt::sc_biguint<W> >::base_write( sc_dt::uint64 value )
544 {
545 # if defined(DEBUG_SYSTEMC)
546  check_writer();
547 # endif
548  m_new_val = value;
549  request_update();
550 }
551 
552 
553 //------------------------------------------------------------------------------
554 //"sc_signal<sc_dt::sc_biguint<W> >::check_writer"
555 //
556 // This method checks to see if there is more than one writer for this
557 // object instance by keeping track of the process performing the write.
558 //------------------------------------------------------------------------------
560 inline void sc_signal<sc_dt::sc_biguint<W> >::check_writer()
561 {
563  if( m_writer_p == 0 )
564  {
565  m_writer_p = writer_p;
566  }
567  else if( m_writer_p != writer_p )
568  {
569  sc_signal_invalid_writer( name(), kind(),
570  m_writer_p->name(), writer_p->name() );
571  }
572 }
573 
574 
575 //------------------------------------------------------------------------------
576 //"sc_signal<sc_dt::sc_biguint<W> >::concat_set"
577 //
578 // These virtual methods allow value assignments to this object instance
579 // from various sources. The position within the supplied source of the
580 // low order bit for this object instance's value is low_i.
581 // src = source value.
582 // low_i = bit within src to serve as low order bit of this object
583 // instance's value.
584 //------------------------------------------------------------------------------
586 inline void sc_signal<sc_dt::sc_biguint<W> >::concat_set(sc_dt::int64 src, int low_i)
587 {
588  if ( low_i < 64 )
589  {
590  base_write(src >> low_i);
591  }
592  else
593  {
594  base_write( (sc_dt::int64)((src < 0 ) ? -1 : 0 ));
595  }
596 }
597 
599 inline void sc_signal<sc_dt::sc_biguint<W> >::concat_set(
600  const sc_dt::sc_lv_base& src, int low_i)
601 {
602  sc_dt::sc_unsigned tmp(src.length());
603  tmp = src >> low_i;
604  base_write( tmp );
605 }
606 
608 inline void sc_signal<sc_dt::sc_biguint<W> >::concat_set(
609  const sc_dt::sc_signed& src, int low_i)
610 {
611  base_write( (src >> low_i) );
612 }
613 
615 inline void sc_signal<sc_dt::sc_biguint<W> >::concat_set(
616  const sc_dt::sc_unsigned& src, int low_i)
617 {
618  base_write( (src >> low_i) );
619 }
620 
622 inline void sc_signal<sc_dt::sc_biguint<W> >::concat_set(sc_dt::uint64 src, int low_i)
623 {
624  base_write( (sc_dt::uint64)(( low_i < 64 ) ? src >> low_i : 0));
625 }
626 
627 
628 
629 SC_TEMPLATE // Return the default event for this object instance.
630 inline const sc_event& sc_signal<sc_dt::sc_biguint<W> >::default_event() const
631  { return base_value_changed_event(); }
632 
633 
634 SC_TEMPLATE // Return true if a changed event happened in the last delta cycle.
636  { return base_event(); }
637 
638 
639 SC_TEMPLATE // Return a reference to the value of this object instance.
640 inline const sc_dt::sc_biguint<W>& sc_signal<sc_dt::sc_biguint<W> >::get_data_ref() const
641  { return *this; }
642 
643 
644 SC_TEMPLATE // Return a pointer to this object instance.
646  { return *this; }
647 
648 
649 SC_TEMPLATE // Return a kind value of "sc_signal".
650 inline const char* sc_signal<sc_dt::sc_biguint<W> >::kind() const
651 {
652  return "sc_signal";
653 }
654 
655 
656 //------------------------------------------------------------------------------
657 //"sc_signal_uint::operator ()
658 //
659 // This operator returns a part selection of this object instance.
660 // left = left-hand bit of the selection.
661 // right = right-hand bit of the selection.
662 //------------------------------------------------------------------------------
664 inline sc_unsigned_sigref& sc_signal<sc_dt::sc_biguint<W> >::operator () (int left, int right)
665 {
666  sc_unsigned_sigref* result_p; // Value to return.
667 
668  result_p = sc_unsigned_sigref::m_pool.allocate();
669  result_p->initialize(this, left, right);
670  return *result_p;
671 }
672 
673 
674 //------------------------------------------------------------------------------
675 //"sc_signal_uint::operator []"
676 //
677 // This operator returns a bit selection of this object instance.
678 // i = bit to be selected.
679 //------------------------------------------------------------------------------
681 inline sc_unsigned_sigref& sc_signal<sc_dt::sc_biguint<W> >::operator [] ( int bit )
682 {
683  return operator () (bit,bit);
684 }
685 
686 
688 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( const this_type& new_val )
689  { base_write( new_val ); }
690 
692 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( const char* new_val )
693  { sc_dt::sc_biguint<W> tmp = new_val; m_new_val = tmp; request_update(); }
694 
695 
697 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( const sc_dt::sc_unsigned& new_val )
698  { base_write(new_val); }
699 
700 
702 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( sc_dt::uint64 new_val )
703  { base_write(new_val); }
704 
705 
707 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( sc_dt::int64 new_val )
708  { base_write(new_val); }
709 
710 
712 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( int new_val )
713  { base_write((sc_dt::int64)new_val); }
714 
715 
717 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( long new_val )
718  { base_write((sc_dt::int64)new_val); }
719 
720 
722 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( short new_val )
723  { base_write((sc_dt::int64)new_val); }
724 
725 
727 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( unsigned int new_val )
728  { base_write((sc_dt::int64)new_val); }
729 
730 
732 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( unsigned long new_val )
733  { base_write((sc_dt::int64)new_val); }
734 
735 
737 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( unsigned short new_val )
738  { base_write((sc_dt::int64)new_val); }
739 
740 
742 template<typename T>
743 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = (
744  const sc_dt::sc_generic_base<T>& new_val )
745 {
746  sc_dt::sc_unsigned temp(W);
747  new_val->to_sc_unsigned(temp);
748  base_write(temp);
749 }
750 
751 
753 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( const sc_dt::sc_signed& new_val )
754  { base_write(new_val); }
755 
757 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( const sc_dt::sc_bv_base& new_val )
758  { base_write( (sc_dt::sc_biguint<W>)new_val ); }
759 
761 inline void sc_signal<sc_dt::sc_biguint<W> >::operator = ( const sc_dt::sc_lv_base& new_val )
762  { base_write( (sc_dt::sc_biguint<W>)new_val ); }
763 
764 
767  { return this; }
768 
769 
772  { return *this; }
773 
774 
775 SC_TEMPLATE // Read a portion of a value.
777  int left, int right ) const
778 {
779  sc_dt::sc_unsigned tmp(left-right+1);
780  tmp = (*(const sc_dt::sc_biguint<W>*)this)(left,right);
781  return tmp;
782 }
783 
785 inline void sc_signal<sc_dt::sc_biguint<W> >::register_port(
786  sc_port_base& port_, const char* if_typename_ )
787 {
788 # ifdef DEBUG_SYSTEMC
789  std::string nm( if_typename_ );
790  if( nm == typeid( sc_signal_inout_if<sc_dt::sc_biguint<W> > ).name() )
791  {
792  if( m_output_p != 0 )
793  {
794  sc_signal_invalid_writer( name(), kind(),
795  m_output_p->name(), port_.name() );
796  }
797  m_output_p = &port_;
798  }
799 # else
800  if ( &port_ && if_typename_ ) {} // Silence unused args warning.
801 # endif
802 }
803 
804 
805 SC_TEMPLATE // Autogenerated name object instance constructor.
807  sc_prim_channel(sc_gen_unique_name( "signal" )),
808  m_changed_event_p(0),
809  m_new_val(W),
810  m_output_p(0),
811  m_writer_p(0)
812 { }
813 
814 
815 SC_TEMPLATE // Explicitly named object instance constructor.
816 inline sc_signal<sc_dt::sc_biguint<W> >::sc_signal(const char* name_) :
817  sc_prim_channel(name_),
818  m_changed_event_p(0),
819  m_new_val(W),
820  m_output_p(0),
821  m_writer_p(0)
822 { }
823 
824 
825 SC_TEMPLATE // Object instance destructor.
826 inline sc_signal<sc_dt::sc_biguint<W> >::~sc_signal()
827 {
828  if ( m_changed_event_p ) delete m_changed_event_p;
829 }
830 
831 
832 SC_TEMPLATE // Update the current value from new value.
833 inline void sc_signal<sc_dt::sc_biguint<W> >::update()
834 {
835  if ( m_changed_event_p )
836  {
837  if ( m_new_val != *this )
838  {
839  m_changed_event_p->notify_delayed();
840  m_event_delta = simcontext()->delta_count();
841  }
842  }
844 }
845 
846 
847 SC_TEMPLATE // Return the value changed event.
848 inline const sc_event& sc_signal<sc_dt::sc_biguint<W> >::value_changed_event() const
849  { return base_value_changed_event(); }
850 
851 
852 SC_TEMPLATE // Write a sc_in<sc_dt::sc_biguint<W> > value to this object instance.
853 inline void sc_signal<sc_dt::sc_biguint<W> >::write(
854  const sc_in<sc_dt::sc_biguint<W> >& value )
855  { base_write( value ); }
856 
857 
858 SC_TEMPLATE // Write a sc_inout<sc_dt::sc_biguint<W> > value to this object instance.
859 inline void sc_signal<sc_dt::sc_biguint<W> >::write(
860  const sc_inout<sc_dt::sc_biguint<W> >& value )
861 { base_write( value ); }
862 
863 
864 SC_TEMPLATE // Write a sc_dt::sc_biguint<W> value to this object instance.
865 inline void sc_signal<sc_dt::sc_biguint<W> >::write( const sc_dt::sc_biguint<W>& value )
866  { base_write( value); }
867 
868 
869 SC_TEMPLATE // Write a portion of a value. If this is the first write in
870  // a delta cycle we copy the existing value before setting the bits.
871 inline void sc_signal<sc_dt::sc_biguint<W> >::write_part(sc_dt::int64 v, int left, int right)
872 {
873  m_new_val(left, right) = v;
874  request_update();
875 }
876 
877 
878 SC_TEMPLATE // Select a portion of a value.
880  int left, int right)
881 {
882  sc_unsigned_sigref* result_p = sc_unsigned_sigref::m_pool.allocate();
883  result_p->initialize(dynamic_cast<sc_unsigned_part_if*>(this), left, right);
884  return *result_p;
885 }
886 
887 
888 SC_TEMPLATE // Write a portion of a value. If this is the first write in
889  // a delta cycle we copy the existing value before setting the bits.
890 inline void sc_signal<sc_dt::sc_biguint<W> >::write_part(sc_dt::uint64 v, int left, int right)
891 {
892  m_new_val(left, right) = v;
893  request_update();
894 }
895 
896 
897 SC_TEMPLATE // Write a portion of a value. If this is the first write in
898  // a delta cycle we copy the existing value before setting the bits.
899 inline void sc_signal<sc_dt::sc_biguint<W> >::write_part(
900  const sc_dt::sc_signed& v, int left, int right )
901 {
902  m_new_val(left, right) = v;
903  request_update();
904 }
905 
906 
907 SC_TEMPLATE // Write a portion of a value. If this is the first write in
908  // a delta cycle we copy the existing value before setting the bits.
909 inline void sc_signal<sc_dt::sc_biguint<W> >::write_part(
910  const sc_dt::sc_unsigned& v, int left, int right )
911 {
912  m_new_val(left, right) = v;
913  request_update();
914 }
915 
916 
917 //==============================================================================
918 // CLASS sc_in<sc_dt::sc_biguint<W> >
919 //
920 // This class implements an input port whose target acts like an sc_dt::sc_biguint<W> data
921 // value. This class is a specialization of the generic sc_in class to
922 // implement tailored support for the sc_dt::sc_biguint<W> class.
923 //==============================================================================
925 class sc_in<sc_dt::sc_biguint<W> > :
926  public sc_port<sc_signal_in_if<sc_dt::sc_biguint<W> >, 1,
927  SC_ONE_OR_MORE_BOUND>,
928  public sc_dt::sc_value_base
929 {
930  public:
931 
932  // typedefs
933 
938 
943 
944  public:
945 
946  // bind methods and operators:
947 
948  void bind( const in_if_type& interface_ )
949  { sc_port_base::bind( const_cast<in_if_type&>( interface_) );}
950  void operator () ( const in_if_type& interface_ )
951  { sc_port_base::bind( const_cast<in_if_type&>( interface_) );}
952  void bind( in_port_type& parent_ )
953  { sc_port_base::bind(parent_);}
954  void operator () ( in_port_type& parent_ )
955  { sc_port_base::bind(parent_);}
956  void bind( inout_port_type& parent_ )
957  { sc_port_base::bind(parent_);}
958  void operator () ( inout_port_type& parent_ )
959  { sc_port_base::bind(parent_);}
960 
961  protected:
962  // called by pbind (for internal use only)
963  virtual inline int vbind( sc_interface& interface_ )
964  {
965  return sc_port_b<if_type>::vbind( interface_ );
966  }
967  virtual inline int vbind( sc_port_base& parent_ )
968  {
969  in_port_type* in_parent = dynamic_cast<in_port_type*>( &parent_ );
970  if( in_parent != 0 ) {
971  sc_port_base::bind( *in_parent );
972  return 0;
973  }
974  inout_port_type* inout_parent = dynamic_cast<inout_port_type*>( &parent_ );
975  if( inout_parent != 0 ) {
976  sc_port_base::bind( *inout_parent );
977  return 0;
978  }
979  // type mismatch
980  return 2;
981  }
982 
983 
984  // constructors
985 
986  public:
988  : base_type(), m_traces( 0 )
989  {}
990 
991  explicit sc_in( const char* name_ )
992  : base_type( name_ ), m_traces( 0 )
993  {}
994 
995  explicit sc_in( const in_if_type& interface_ )
996  : base_type( const_cast<in_if_type&>( interface_ ) ), m_traces( 0 )
997  {}
998 
999  sc_in( const char* name_, const in_if_type& interface_ )
1000  : base_type( name_, const_cast<in_if_type&>( interface_ ) ), m_traces( 0 )
1001  {}
1002 
1003  explicit sc_in( in_port_type& parent_ )
1004  : base_type( parent_ ), m_traces( 0 )
1005  {}
1006 
1007  sc_in( const char* name_, in_port_type& parent_ )
1008  : base_type( name_, parent_ ), m_traces( 0 )
1009  {}
1010 
1011  explicit sc_in( inout_port_type& parent_ )
1012  : base_type(), m_traces( 0 )
1013  { sc_port_base::bind( parent_ ); }
1014 
1015  sc_in( const char* name_, inout_port_type& parent_ )
1016  : base_type( name_ ), m_traces( 0 )
1017  { sc_port_base::bind( parent_ ); }
1018 
1019  sc_in( this_type& parent_ )
1020  : base_type( parent_ ), m_traces( 0 )
1021  {}
1022 
1023  sc_in( const char* name_, this_type& parent_ )
1024  : base_type( name_, parent_ ), m_traces( 0 )
1025  {}
1026 
1027 
1028  // destructor
1029 
1030  virtual inline ~sc_in()
1031  {
1032  remove_traces();
1033  }
1034 
1035  // bit and part selection
1036 
1037  sc_dt::sc_unsigned_bitref_r operator [] ( int i ) const
1038  { return (*this)->read()[i]; }
1040  { return (*this)->read()[i]; }
1041  sc_dt::sc_unsigned_subref_r operator () ( int left, int right ) const
1042  { return (*this)->read()(left,right); }
1043  sc_dt::sc_unsigned_subref_r range( int left, int right ) const
1044  { return (*this)->read()(left,right); }
1045 
1046 
1047  // interface access shortcut methods
1048 
1049  // get the default event
1050 
1051  const sc_event& default_event() const
1052  { return (*this)->value_changed_event(); }
1053 
1054 
1055  // get the value changed event
1056 
1058  { return (*this)->value_changed_event(); }
1059 
1060 
1061  // read the current value
1062 
1064  { return (*this)->read(); }
1065 
1066  operator const sc_dt::sc_biguint<W>& () const
1067  { return (*this)->read(); }
1068 
1069  // was there a value changed event?
1070 
1071  bool event() const
1072  { return (*this)->event(); }
1073 
1074 
1075  // (other) event finder method(s)
1076 
1078  {
1079  return *new sc_event_finder_t<in_if_type>(
1080  *this, &in_if_type::value_changed_event );
1081  }
1082 
1083 
1084 
1085  // reduction methods:
1086 
1087  inline bool and_reduce() const
1088  { return (*this)->read().and_reduce(); }
1089  inline bool nand_reduce() const
1090  { return (*this)->read().nand_reduce(); }
1091  inline bool nor_reduce() const
1092  { return (*this)->read().nor_reduce(); }
1093  inline bool or_reduce() const
1094  { return (*this)->read().or_reduce(); }
1095  inline bool xnor_reduce() const
1096  { return (*this)->read().xnor_reduce(); }
1097  inline bool xor_reduce() const
1098  { return (*this)->read().xor_reduce(); }
1099 
1100 
1101  // called when elaboration is done
1102  /* WHEN DEFINING THIS METHOD IN A DERIVED CLASS, */
1103  /* MAKE SURE THAT THIS METHOD IS CALLED AS WELL. */
1104 
1105  virtual inline void end_of_elaboration()
1106  {
1107  if( m_traces != 0 ) {
1108  for( unsigned int i = 0; i < m_traces->size(); ++ i ) {
1109  sc_trace_params* p = (*m_traces)[i];
1110  sc_trace( p->tf, read(), p->name );
1111  }
1112  remove_traces();
1113  }
1114  }
1115 
1116  virtual inline const char* kind() const
1117  { return "sc_in"; }
1118 
1119 
1120  // called by sc_trace
1121  void add_trace( sc_trace_file* tf_, const std::string& name_ ) const
1122  {
1123  if( tf_ != 0 ) {
1124  if( m_traces == 0 ) {
1125  m_traces = new sc_trace_params_vec;
1126  }
1127  m_traces->push_back( new sc_trace_params( tf_, name_ ) );
1128  }
1129  }
1130 
1131 
1132  // concatenation methods
1133 
1134  virtual inline int concat_length(bool* xz_present_p) const
1135  { return (*this)->read().concat_length( xz_present_p ); }
1136  virtual inline sc_dt::uint64 concat_get_uint64() const
1137  { return (*this)->read().concat_get_uint64(); }
1138  virtual inline bool concat_get_ctrl( sc_dt::sc_digit* dst_p, int low_i ) const
1139  { return (*this)->read().concat_get_ctrl(dst_p, low_i); }
1140  virtual inline bool concat_get_data( sc_dt::sc_digit* dst_p, int low_i ) const
1141  { return (*this)->read().concat_get_data(dst_p, low_i); }
1142 
1143  protected:
1144  void remove_traces() const
1145  {
1146  if( m_traces != 0 ) {
1147  for( int i = m_traces->size() - 1; i >= 0; -- i ) {
1148  delete (*m_traces)[i];
1149  }
1150  delete m_traces;
1151  m_traces = 0;
1152  }
1153  }
1154 
1156 
1157 
1158  private:
1159 
1160  // disabled
1161  sc_in( const sc_in<sc_dt::sc_biguint<W> >& );
1163 
1164 #ifdef __GNUC__
1165  // Needed to circumvent a problem in the g++-2.95.2 compiler:
1166  // This unused variable forces the compiler to instantiate
1167  // an object of T template so an implicit conversion from
1168  // read() to a C++ intrinsic data type will work.
1169  static data_type dummy;
1170 #endif
1171 
1172 };
1173 
1174 
1175 
1177 inline std::ostream& operator << (
1178  std::ostream& os, const sc_in<sc_dt::sc_biguint<W> >& a )
1179 {
1180  a.read().print( os );
1181  return os;
1182 }
1183 
1184 
1185 //==============================================================================
1186 // CLASS sc_inout<sc_dt::sc_biguint<W> >
1187 //
1188 // This class implements an input/output port whose target acts like an
1189 // sc_dt::sc_biguint<W> data value. It is derived from the sc_unsigned_in. This class is a
1190 // specialization of the generic sc_inout class to implement tailored support
1191 // for the sc_dt::sc_biguint<W> class.
1192 //==============================================================================
1194 class sc_inout<sc_dt::sc_biguint<W> > :
1195  public sc_port<sc_signal_inout_if<sc_dt::sc_biguint<W> >, 1,
1196  SC_ONE_OR_MORE_BOUND>,
1197  public sc_dt::sc_value_base
1198 {
1199  public:
1200 
1201  // typedefs
1202 
1207 
1210 
1211  public:
1212 
1213  // bind methods and operators:
1214 
1215  void bind( const inout_if_type& interface_ )
1216  { sc_port_base::bind( const_cast<inout_if_type&>( interface_) ); }
1217  void operator () ( const inout_if_type& interface_ )
1218  { sc_port_base::bind( const_cast<inout_if_type&>( interface_) ); }
1219  void bind( inout_port_type& parent_ )
1220  { sc_port_base::bind(parent_); }
1222  { sc_port_base::bind(parent_); }
1223 
1224  protected:
1225  // called by pbind (for internal use only)
1226  virtual inline int vbind( sc_interface& interface_ )
1227  {
1228  return sc_port_b<if_type>::vbind( interface_ );
1229  }
1230  virtual inline int vbind( sc_port_base& parent_ )
1231  {
1232  inout_port_type* inout_parent = dynamic_cast<inout_port_type*>( &parent_ );
1233  if( inout_parent != 0 ) {
1234  sc_port_base::bind( *inout_parent );
1235  return 0;
1236  }
1237  // type mismatch
1238  return 2;
1239  }
1240 
1241 
1242  // constructors
1243 
1244  public:
1246  : base_type(), m_init_val_p(0), m_traces( 0 )
1247  {}
1248 
1249  explicit sc_inout( const char* name_ )
1250  : base_type( name_ ), m_init_val_p(0), m_traces( 0 )
1251  {}
1252 
1253  explicit sc_inout( inout_if_type& interface_ )
1254  : base_type( interface_ ), m_init_val_p(0), m_traces( 0 )
1255  {}
1256 
1257  sc_inout( const char* name_, inout_if_type& interface_ )
1258  : base_type( name_, interface_ ), m_init_val_p(0), m_traces( 0 )
1259  {}
1260 
1261  explicit sc_inout( inout_port_type& parent_ )
1262  : base_type( parent_ ), m_init_val_p(0), m_traces( 0 )
1263  {}
1264 
1265  sc_inout( const char* name_, inout_port_type& parent_ )
1266  : base_type( name_, parent_ ), m_init_val_p(0), m_traces( 0 )
1267  {}
1268 
1269  sc_inout( this_type& parent_ )
1270  : base_type( parent_ ), m_init_val_p(0), m_traces( 0 )
1271  {}
1272 
1273  sc_inout( const char* name_, this_type& parent_ )
1274  : base_type( name_, parent_ ), m_init_val_p(0), m_traces( 0 )
1275  {}
1276 
1277 
1278  // destructor
1279 
1280  virtual inline ~sc_inout()
1281  {
1282  remove_traces();
1283  }
1284 
1285  // bit and part selection
1286 
1288  { return (*this)->read()[i]; }
1290  { return (*this)->read()[i]; }
1292  { return (*this)->select_part(i,i); }
1294  { return (*this)->select_part(i,i); }
1295  sc_dt::sc_unsigned_subref_r operator () ( int left, int right ) const
1296  { return (*this)->read()(left,right); }
1297  sc_dt::sc_unsigned_subref_r range( int left, int right ) const
1298  { return (*this)->read()(left,right); }
1299  sc_unsigned_sigref& operator () ( int left, int right )
1300  { return (*this)->select_part(left,right); }
1301  sc_unsigned_sigref& range( int left, int right )
1302  { return (*this)->select_part(left,right); }
1303 
1304 
1305  // interface access shortcut methods
1306 
1307  // get the default event
1308 
1309  const sc_event& default_event() const
1310  { return (*this)->value_changed_event(); }
1311 
1312 
1313  // get the value changed event
1314 
1316  { return (*this)->value_changed_event(); }
1317 
1318 
1319  // read the current value
1320 
1322  { return (*this)->read(); }
1323 
1324  operator const sc_dt::sc_biguint<W>& () const
1325  { return (*this)->read(); }
1326 
1327  // was there a value changed event?
1328 
1329  bool event() const
1330  { return (*this)->event(); }
1331 
1332 
1333  // (other) event finder method(s)
1334 
1336  {
1338  *this, &inout_if_type::value_changed_event );
1339  }
1340 
1341 
1342 
1343  // reduction methods:
1344 
1345  inline bool and_reduce() const
1346  { return (*this)->read().and_reduce(); }
1347  inline bool nand_reduce() const
1348  { return (*this)->read().nand_reduce(); }
1349  inline bool nor_reduce() const
1350  { return (*this)->read().nor_reduce(); }
1351  inline bool or_reduce() const
1352  { return (*this)->read().or_reduce(); }
1353  inline bool xnor_reduce() const
1354  { return (*this)->read().xnor_reduce(); }
1355  inline bool xor_reduce() const
1356  { return (*this)->read().xor_reduce(); }
1357 
1358 
1359  // called when elaboration is done
1360  /* WHEN DEFINING THIS METHOD IN A DERIVED CLASS, */
1361  /* MAKE SURE THAT THIS METHOD IS CALLED AS WELL. */
1362 
1363  virtual inline void end_of_elaboration()
1364  {
1365  if( m_init_val_p != 0 ) {
1366  (*this)->write( *m_init_val_p );
1367  delete m_init_val_p;
1368  m_init_val_p = 0;
1369  }
1370  if( m_traces != 0 ) {
1371  for( unsigned int i = 0; i < m_traces->size(); ++ i ) {
1372  sc_trace_params* p = (*m_traces)[i];
1373  sc_trace( p->tf, read(), p->name );
1374  }
1375  remove_traces();
1376  }
1377  }
1378 
1379  virtual inline const char* kind() const
1380  { return "sc_inout"; }
1381 
1382  // value initialization
1383 
1384  inline void initialize( const sc_dt::sc_biguint<W>& value_ )
1385  {
1386  inout_if_type* iface = dynamic_cast<inout_if_type*>( this->get_interface() );
1387  if( iface != 0 ) {
1388  iface->write( value_ );
1389  } else {
1390  if( m_init_val_p == 0 ) {
1391  m_init_val_p = new sc_dt::sc_biguint<W>;
1392  }
1393  *m_init_val_p = value_;
1394  }
1395  }
1396 
1397 
1398  // called by sc_trace
1399  void add_trace( sc_trace_file* tf_, const std::string& name_ ) const
1400  {
1401  if( tf_ != 0 ) {
1402  if( m_traces == 0 ) {
1403  m_traces = new sc_trace_params_vec;
1404  }
1405  m_traces->push_back( new sc_trace_params( tf_, name_ ) );
1406  }
1407  }
1408 
1409 
1410  // concatenation methods
1411 
1412  virtual inline int concat_length(bool* xz_present_p) const
1413  { return (*this)->read().concat_length( xz_present_p ); }
1414  virtual inline sc_dt::uint64 concat_get_uint64() const
1415  { return (*this)->read().concat_get_uint64(); }
1416  virtual inline bool concat_get_ctrl( sc_dt::sc_digit* dst_p, int low_i ) const
1417  { return (*this)->read().concat_get_ctrl(dst_p, low_i); }
1418  virtual inline bool concat_get_data( sc_dt::sc_digit* dst_p, int low_i ) const
1419  { return (*this)->read().concat_get_data(dst_p, low_i); }
1420  virtual inline void concat_set(sc_dt::int64 src, int low_i)
1421  { *this = (src >> ((low_i < 64) ? low_i : 63)); }
1422 #if 0 // ####
1423  virtual inline void concat_set(const sc_dt::sc_lv_base& src, int low_i)
1424  { *this = src >> low_i; }
1425 #endif // 0 ####
1426  virtual inline void concat_set(const sc_dt::sc_signed& src, int low_i)
1427  { *this = (src >> low_i); }
1428  virtual inline void concat_set(const sc_dt::sc_unsigned& src, int low_i)
1429  { *this = (src >> low_i); }
1430  virtual inline void concat_set(sc_dt::uint64 src, int low_i)
1431  { *this = (low_i < 64 ) ? src >> low_i : (sc_dt::uint64)0; }
1432 
1433  // assignment operators:
1434 
1435  public:
1436  inline void operator = ( const this_type& new_val )
1437  { (*this)->write( (const sc_dt::sc_unsigned&)new_val ); }
1438  inline void operator = ( const char* new_val )
1439  { sc_dt::sc_unsigned aa(W); aa = new_val; (*this)->write( aa ); }
1440  inline void operator = ( sc_dt::uint64 new_val )
1441  { (*this)->write(new_val); }
1442  inline void operator = ( sc_dt::int64 new_val )
1443  { (*this)->write((sc_dt::int64)new_val); }
1444  inline void operator = ( int new_val )
1445  { (*this)->write((sc_dt::int64)new_val); }
1446  inline void operator = ( long new_val )
1447  { (*this)->write((sc_dt::int64)new_val); }
1448  inline void operator = ( short new_val )
1449  { (*this)->write((sc_dt::uint64)new_val); }
1450  inline void operator = ( unsigned int new_val )
1451  { (*this)->write((sc_dt::uint64)new_val); }
1452  inline void operator = ( unsigned long new_val )
1453  { (*this)->write((sc_dt::uint64)new_val); }
1454  inline void operator = ( unsigned short new_val )
1455  { (*this)->write((sc_dt::uint64)new_val); }
1456  template<typename T>
1457  inline void operator = ( const sc_dt::sc_generic_base<T>& new_val )
1458  {
1459  sc_dt::sc_unsigned temp(W);
1460  new_val->to_sc_unsigned(temp);
1461  (*this)->write(temp);
1462  }
1463  inline void operator = ( const sc_dt::sc_signed& new_val )
1464  { (*this)->write(new_val); }
1465  inline void operator = ( const sc_dt::sc_unsigned& new_val )
1466  { (*this)->write(new_val); }
1467  inline void operator = ( const sc_dt::sc_bv_base& new_val )
1468  { (*this)->write((sc_dt::sc_biguint<W>)new_val); }
1469  inline void operator = ( const sc_dt::sc_lv_base& new_val )
1470  { (*this)->write((sc_dt::sc_biguint<W>)new_val); }
1471 
1472  inline void write( const sc_in<sc_dt::sc_biguint<W> >& new_val )
1473  { (*this)->write( new_val.read() ); }
1474  inline void write( const sc_inout<sc_dt::sc_biguint<W> >& new_val )
1475  { (*this)->write( new_val.read() ); }
1476  inline void write( const sc_dt::sc_biguint<W>& new_val )
1477  { (*this)->write( new_val ); }
1478 
1479  protected:
1480  void remove_traces() const
1481  {
1482  if( m_traces != 0 ) {
1483  for( int i = m_traces->size() - 1; i >= 0; -- i ) {
1484  delete (*m_traces)[i];
1485  }
1486  delete m_traces;
1487  m_traces = 0;
1488  }
1489  }
1490 
1493 
1494 
1495  private:
1496 
1497  // disabled
1499 
1500 #ifdef __GNUC__
1501  // Needed to circumvent a problem in the g++-2.95.2 compiler:
1502  // This unused variable forces the compiler to instantiate
1503  // an object of T template so an implicit conversion from
1504  // read() to a C++ intrinsic data type will work.
1505  static data_type dummy;
1506 #endif
1507 
1508 };
1509 
1510 
1511 
1513 inline std::ostream& operator << (
1514  std::ostream& os, const sc_inout<sc_dt::sc_biguint<W> >& a )
1515 {
1516  a.read().print( os );
1517  return os;
1518 }
1519 
1520 
1521 //==============================================================================
1522 // CLASS sc_out<sc_dt::sc_biguint<W> >
1523 //
1524 // This class implements an output port whose target acts like an
1525 // sc_dt::sc_biguint<W> data value. This class is a derivation of sc_inout, since
1526 // output ports are really no different from input/output ports.
1527 //==============================================================================
1529 class sc_out<sc_dt::sc_biguint<W> > : public sc_inout<sc_dt::sc_biguint<W> >
1530 {
1531  public:
1532 
1533  // typedefs
1534 
1536 
1539 
1540  typedef typename base_type::inout_if_type inout_if_type;
1541  typedef typename base_type::inout_port_type inout_port_type;
1542 
1543  // constructors
1544 
1546  : base_type()
1547  {}
1548 
1549  explicit sc_out( const char* name_ )
1550  : base_type( name_ )
1551  {}
1552 
1553  explicit sc_out( inout_if_type& interface_ )
1554  : base_type( interface_ )
1555  {}
1556 
1557  sc_out( const char* name_, inout_if_type& interface_ )
1558  : base_type( name_, interface_ )
1559  {}
1560 
1561  explicit sc_out( inout_port_type& parent_ )
1562  : base_type( parent_ )
1563  {}
1564 
1565  sc_out( const char* name_, inout_port_type& parent_ )
1566  : base_type( name_, parent_ )
1567  {}
1568 
1569  sc_out( this_type& parent_ )
1570  : base_type( parent_ )
1571  {}
1572 
1573  sc_out( const char* name_, this_type& parent_ )
1574  : base_type( name_, parent_ )
1575  {}
1576 
1577 
1578  // destructor (does nothing)
1579 
1580  virtual inline ~sc_out()
1581  {}
1582 
1583 
1584  // assignment operators:
1585 
1586  public:
1587  inline void operator = ( const this_type& new_val )
1588  { (*this)->write( (const sc_dt::sc_unsigned&)new_val ); }
1589  inline void operator = ( const char* new_val )
1590  { sc_dt::sc_unsigned aa(W); aa = new_val; (*this)->write( aa ); }
1591  inline void operator = ( sc_dt::uint64 new_val )
1592  { (*this)->write(new_val); }
1593  inline void operator = ( sc_dt::int64 new_val )
1594  { (*this)->write((sc_dt::uint64)new_val); }
1595  inline void operator = ( int new_val )
1596  { (*this)->write((sc_dt::uint64)new_val); }
1597  inline void operator = ( long new_val )
1598  { (*this)->write((sc_dt::uint64)new_val); }
1599  inline void operator = ( short new_val )
1600  { (*this)->write((sc_dt::uint64)new_val); }
1601  inline void operator = ( unsigned int new_val )
1602  { (*this)->write((sc_dt::uint64)new_val); }
1603  inline void operator = ( unsigned long new_val )
1604  { (*this)->write((sc_dt::uint64)new_val); }
1605  inline void operator = ( unsigned short new_val )
1606  { (*this)->write((sc_dt::uint64)new_val); }
1607  template<typename T>
1608  inline void operator = ( const sc_dt::sc_generic_base<T>& new_val )
1609  {
1610  sc_dt::sc_unsigned temp(W);
1611  new_val->to_sc_unsigned(temp);
1612  (*this)->write(temp);
1613  }
1614  inline void operator = ( const sc_dt::sc_signed& new_val )
1615  { (*this)->write(new_val); }
1616  inline void operator = ( const sc_dt::sc_unsigned& new_val )
1617  { (*this)->write(new_val); }
1618  inline void operator = ( const sc_dt::sc_bv_base& new_val )
1619  { (*this)->write((sc_dt::sc_biguint<W>)new_val); }
1620  inline void operator = ( const sc_dt::sc_lv_base& new_val )
1621  { (*this)->write((sc_dt::sc_biguint<W>)new_val); }
1622 
1623  private:
1624 
1625  // disabled
1626  sc_out( const this_type& );
1627 };
1628 
1629 
1630 
1631 //------------------------------------------------------------------------------
1632 //"sc_unsigned_sigref::initialize"
1633 //
1634 // This method initializes an object instance from the supplied arguments.
1635 // if_p -> target of this selection.
1636 // left_ = left-most bit in selection.
1637 // right_ = right-most bit in selection.
1638 //------------------------------------------------------------------------------
1640  sc_unsigned_part_if* if_p, int left_, int right_ )
1641 {
1642  m_if_p = if_p;
1643  m_left = left_;
1644  m_right = right_;
1645  m_obj_p = if_p->part_read_target();
1646 }
1647 
1648 
1649 //------------------------------------------------------------------------------
1650 //"sc_unsigned_sigref::operator ="
1651 //
1652 // These operators assign a value to the bits associated with this object
1653 // instance within this object instance's target signal.
1654 //------------------------------------------------------------------------------
1656 {
1658 }
1659 
1660 inline void sc_unsigned_sigref::operator = ( const char* v )
1661 {
1662  sc_dt::sc_unsigned tmp(length());
1663  tmp = v;
1664  *this = tmp;
1665 }
1666 
1668 {
1669  *this = (sc_dt::uint64)v;
1670 }
1671 
1673 {
1674  *this = (sc_dt::uint64)v;
1675 }
1676 
1678 {
1679  *this = (sc_dt::uint64)v;
1680 }
1681 
1682 inline void sc_unsigned_sigref:: operator = ( unsigned int v )
1683 {
1684  *this = (sc_dt::uint64)v;
1685 }
1686 
1687 inline void sc_unsigned_sigref:: operator = ( unsigned long v )
1688 {
1689  *this = (sc_dt::uint64)v;
1690 }
1691 
1693 {
1694  *this = (sc_dt::sc_unsigned)v;
1695 }
1696 
1697 
1699 {
1701 }
1702 
1704 {
1706 }
1707 
1708 template<typename T>
1710  const sc_dt::sc_generic_base<T>& v )
1711 {
1713  v->to_sc_unsigned(temp);
1714  m_if_p->write_part( temp, m_left, m_right );
1715 }
1716 
1717 #undef SC_TEMPLATE
1718 } // namespace sc_core
1719 #endif // !defined(SC_SIGNAL_UNSIGNED_H)
1720 
1721 namespace sc_core {
1722 
1723 extern
1724 void
1725 sc_signal_invalid_writer( const char* name,
1726  const char* kind,
1727  const char* first_writer,
1728  const char* second_writer );
1729 
1730 //------------------------------------------------------------------------------
1731 // POOL OF TEMPORARY INSTANCES OF sc_unsigned_sigref
1732 //
1733 // This allows use to pass const references for part and bit selections
1734 // on sc_signal_signed object instances.
1735 //------------------------------------------------------------------------------
1736 sc_vpool<sc_unsigned_sigref> sc_unsigned_sigref::m_pool(8);
1737 
1738 
1739 //------------------------------------------------------------------------------
1740 //"sc_unsigned_part_if::default methods"
1741 //
1742 // These versions just produce errors if they are not overloaded but used.
1743 //------------------------------------------------------------------------------
1745 {
1747  return 0;
1748 }
1749 sc_dt::sc_unsigned sc_unsigned_part_if::read_part( int /*left*/, int /*right*/ ) const
1750 {
1752  return sc_dt::sc_unsigned(1);
1753 }
1755 {
1757  return *(sc_unsigned_sigref*)0;
1758 }
1759 void sc_unsigned_part_if::write_part( sc_dt::int64 v, int /*left*/, int /*right*/ )
1760 {
1762 }
1763 void sc_unsigned_part_if::write_part( sc_dt::uint64 v, int /*left*/, int /*right*/ )
1764 {
1766 }
1768  const sc_dt::sc_signed& v, int /*left*/, int /*right*/ )
1769 {
1771 }
1773  const sc_dt::sc_unsigned& v, int /*left*/, int /*right*/ )
1774 {
1776 }
1777 
1778 
1779 
1780 //------------------------------------------------------------------------------
1781 //"sc_unsigned_sigref::concate_set"
1782 //
1783 // These methods assign this object instance's value from the supplied
1784 // value starting at the supplied bit within that value.
1785 // src = value to use to set this object instance's value.
1786 // low_i = bit in src that is to be the low order bit of the value to set.
1787 // #### OPTIMIZE
1788 //------------------------------------------------------------------------------
1790 {
1791  sc_dt::int64 tmp;
1792  if ( low_i < 63 )
1793  tmp = src >> low_i;
1794  else
1795  tmp = (src < 0) ? -1 : 0;
1796  m_if_p->write_part( tmp, m_left, m_right );
1797 }
1798 
1799 
1801 {
1802  m_if_p->write_part( src >> low_i, m_left, m_right );
1803 }
1804 
1805 
1807 {
1808  sc_dt::sc_unsigned tmp(src.length());
1809  tmp = src;
1810  m_if_p->write_part( tmp >> low_i, m_left, m_right );
1811 }
1812 
1813 
1815 {
1816  m_if_p->write_part( src >> low_i, m_left, m_right );
1817 }
1818 
1819 
1821 {
1822  sc_dt::uint64 tmp = (low_i < 63) ? (src >> low_i) : 0;
1823  m_if_p->write_part( tmp, m_left, m_right );
1824 }
1825 
1826 
1827 } // namespace sc_core
sc_core::sc_in< sc_dt::sc_biguint< W > >::sc_in
sc_in(inout_port_type &parent_)
Definition: scx_signal_unsigned.h:1011
sc_core::sc_in< sc_dt::sc_biguint< W > >::concat_get_uint64
virtual sc_dt::uint64 concat_get_uint64() const
Definition: scx_signal_unsigned.h:1136
sc_core::sc_inout< sc_dt::sc_biguint< W > >::sc_inout
sc_inout(const char *name_, inout_port_type &parent_)
Definition: scx_signal_unsigned.h:1265
sc_core::sc_port_base
Definition: sc_port.hh:74
sc_core::sc_unsigned_sigref::sc_unsigned_sigref
sc_unsigned_sigref()
Definition: scx_signal_unsigned.h:272
sc_core::sc_in< sc_dt::sc_biguint< W > >::concat_length
virtual int concat_length(bool *xz_present_p) const
Definition: scx_signal_unsigned.h:1134
sc_core::sc_unsigned_sigref::concat_set
virtual void concat_set(sc_dt::int64 src, int low_i)
Definition: scx_signal_unsigned.h:1789
sc_core::sc_in< sc_dt::sc_biguint< W > >::remove_traces
void remove_traces() const
Definition: scx_signal_unsigned.h:1144
sc_core::sc_inout< sc_dt::sc_biguint< W > >::remove_traces
void remove_traces() const
Definition: scx_signal_unsigned.h:1480
sc_core::sc_inout< sc_dt::sc_biguint< W > >::bit
sc_dt::sc_unsigned_bitref_r bit(int i) const
Definition: scx_signal_unsigned.h:1289
sc_dt::sc_unsigned_subref_r::m_right
int m_right
Definition: sc_unsigned.hh:805
sc_gem5::ScSignalBase::kind
virtual const char * kind() const
Definition: sc_signal.hh:57
sc_core::sc_signal_in_if< sc_dt::sc_biguint< W > >::sc_signal_in_if
sc_signal_in_if()
Definition: scx_signal_unsigned.h:256
sc_core::sc_signal_write_if::write
virtual void write(const T &)=0
sc_gem5::ScSignalBaseT< T, SC_ONE_WRITER >::event
virtual bool event() const
Definition: sc_signal.hh:223
X86ISA::os
Bitfield< 17 > os
Definition: misc.hh:803
sc_core::sc_signal< sc_dt::sc_biguint< W > >::m_changed_event_p
sc_event * m_changed_event_p
Definition: scx_signal_unsigned.h:481
sc_core::sc_port_b::vbind
int vbind(sc_interface &i) override
Definition: sc_port.hh:196
sc_core::sc_out< sc_dt::sc_biguint< W > >::sc_out
sc_out(const char *name_, inout_port_type &parent_)
Definition: scx_signal_unsigned.h:1565
sc_core::sc_out< sc_dt::sc_biguint< W > >::sc_out
sc_out(const char *name_, this_type &parent_)
Definition: scx_signal_unsigned.h:1573
sc_core::sc_in< sc_dt::sc_biguint< W > >::sc_in
sc_in(in_port_type &parent_)
Definition: scx_signal_unsigned.h:1003
sc_dt::operator|=
X & operator|=(sc_proxy< X > &px, const sc_proxy< Y > &py)
Definition: sc_lv_base.hh:450
sc_core::sc_signal_inout_if
Definition: sc_signal_inout_if.hh:68
sc_core::sc_in< sc_dt::sc_biguint< W > >::sc_in
sc_in(const char *name_, in_port_type &parent_)
Definition: scx_signal_unsigned.h:1007
sc_core::sc_inout< sc_dt::sc_biguint< W > >
Definition: scx_signal_unsigned.h:1194
sc_core::sc_in::operator()
void operator()(const sc_signal_in_if< T > &i)
Definition: sc_in.hh:91
sc_core::sc_in< sc_dt::sc_biguint< W > >::bit
sc_dt::sc_unsigned_bitref_r bit(int i) const
Definition: scx_signal_unsigned.h:1039
sc_core::sc_out< sc_dt::sc_biguint< W > >::~sc_out
virtual ~sc_out()
Definition: scx_signal_unsigned.h:1580
sc_core::sc_in< sc_dt::sc_biguint< W > >::add_trace
void add_trace(sc_trace_file *tf_, const std::string &name_) const
Definition: scx_signal_unsigned.h:1121
sc_core::sc_inout< sc_dt::sc_biguint< W > >::nand_reduce
bool nand_reduce() const
Definition: scx_signal_unsigned.h:1347
sc_dt
Definition: sc_bit.cc:67
sc_core::sc_port
Definition: sc_port.hh:249
ArmISA::i
Bitfield< 7 > i
Definition: miscregs_types.hh:63
sc_core::sc_inout< sc_dt::sc_biguint< W > >::m_init_val_p
sc_dt::sc_biguint< W > * m_init_val_p
Definition: scx_signal_unsigned.h:1491
sc_dt::sc_lv_base::length
int length() const
Definition: sc_lv_base.hh:263
sc_core::sc_in< sc_dt::sc_biguint< W > >::sc_in
sc_in()
Definition: scx_signal_unsigned.h:987
sc_core::sc_trace_params_vec
std::vector< sc_trace_params * > sc_trace_params_vec
Definition: sc_port.hh:65
sc_core::sc_inout< sc_dt::sc_biguint< W > >::~sc_inout
virtual ~sc_inout()
Definition: scx_signal_unsigned.h:1280
sc_core::sc_signal_in_if< sc_dt::sc_biguint< W > >::this_type
sc_signal_in_if< sc_dt::sc_biguint< W > > this_type
Definition: scx_signal_unsigned.h:238
sc_core
Definition: messages.cc:31
sc_core::sc_in< sc_dt::sc_biguint< W > >::inout_port_type
sc_inout< sc_dt::sc_biguint< W > > inout_port_type
Definition: scx_signal_unsigned.h:942
sc_core::sc_in::read
const T & read() const
Definition: sc_in.hh:124
sc_core::sc_out< sc_dt::sc_biguint< W > >::sc_out
sc_out()
Definition: scx_signal_unsigned.h:1545
sc_core::sc_inout< sc_dt::sc_biguint< W > >::concat_set
virtual void concat_set(sc_dt::int64 src, int low_i)
Definition: scx_signal_unsigned.h:1420
sc_dt::sc_digit
unsigned int sc_digit
Definition: sc_nbdefs.hh:197
sc_dt::sc_value_base
Definition: sc_value_base.hh:107
sc_core::sc_in< sc_dt::sc_biguint< W > >::~sc_in
virtual ~sc_in()
Definition: scx_signal_unsigned.h:1030
sc_core::sc_in< sc_dt::sc_biguint< W > >::data_type
sc_dt::sc_biguint< W > data_type
Definition: scx_signal_unsigned.h:934
sc_core::sc_unsigned_sigref::operator=
void operator=(sc_dt::uint64 v)
Definition: scx_signal_unsigned.h:1655
sc_core::sc_trace_params
Definition: sc_port.hh:56
sc_dt::sc_unsigned_subref_r::length
int length() const
Definition: sc_unsigned.hh:752
sc_core::sc_interface
Definition: sc_interface.hh:37
sc_core::sc_unsigned_part_if::write_part
virtual void write_part(sc_dt::int64 v, int left, int right)
Definition: scx_signal_unsigned.h:1759
sc_core::sc_out::operator=
sc_out< T > & operator=(const T &t)
Definition: sc_out.hh:62
sc_core::sc_inout< sc_dt::sc_biguint< W > >::data_type
sc_dt::sc_biguint< W > data_type
Definition: scx_signal_unsigned.h:1203
sc_dt::sc_bv_base
Definition: sc_bv_base.hh:105
sc_core::sc_in< sc_dt::sc_biguint< W > >::default_event
const sc_event & default_event() const
Definition: scx_signal_unsigned.h:1051
sc_core::sc_get_current_process_b
static sc_process_b * sc_get_current_process_b()
Definition: sc_process_handle.hh:135
sc_core::sc_unsigned_part_if
Definition: scx_signal_unsigned.h:199
sc_core::sc_trace_file
Definition: sc_trace_file.hh:61
sc_core::sc_in< sc_dt::sc_biguint< W > >::end_of_elaboration
virtual void end_of_elaboration()
Definition: scx_signal_unsigned.h:1105
sc_core::sc_in< sc_dt::sc_biguint< W > >::kind
virtual const char * kind() const
Definition: scx_signal_unsigned.h:1116
sc_gem5::ScSignalBaseT< T, SC_ONE_WRITER >::read
virtual const T & read() const
Definition: sc_signal.hh:185
sc_core::sc_in< sc_dt::sc_biguint< W > >::if_type
sc_signal_in_if< sc_dt::sc_biguint< W > > if_type
Definition: scx_signal_unsigned.h:935
sc_core::sc_in< sc_dt::sc_biguint< W > >::xor_reduce
bool xor_reduce() const
Definition: scx_signal_unsigned.h:1097
PowerISA::aa
Bitfield< 1 > aa
Definition: types.hh:59
sc_dt::operator&=
X & operator&=(sc_proxy< X > &px, const sc_proxy< Y > &py)
Definition: sc_lv_base.hh:359
std::vector< sc_trace_params * >
sc_core::sc_out< sc_dt::sc_biguint< W > >::base_type
sc_inout< data_type > base_type
Definition: scx_signal_unsigned.h:1538
sc_core::sc_out< sc_dt::sc_biguint< W > >::inout_port_type
base_type::inout_port_type inout_port_type
Definition: scx_signal_unsigned.h:1541
sc_core::sc_vpool
Definition: sc_temporary.hh:182
sc_core::sc_signal
Definition: sc_signal.hh:272
sc_core::sc_in< sc_dt::sc_biguint< W > >::bind
void bind(inout_port_type &parent_)
Definition: scx_signal_unsigned.h:956
sc_dt::sc_signed
Definition: sc_signed.hh:984
sc_core::sc_in< sc_dt::sc_biguint< W > >::base_type
sc_port< if_type, 1, SC_ONE_OR_MORE_BOUND > base_type
Definition: scx_signal_unsigned.h:936
sc_core::sc_inout< sc_dt::sc_biguint< W > >::end_of_elaboration
virtual void end_of_elaboration()
Definition: scx_signal_unsigned.h:1363
sc_core::sc_inout< sc_dt::sc_biguint< W > >::concat_set
virtual void concat_set(sc_dt::uint64 src, int low_i)
Definition: scx_signal_unsigned.h:1430
sc_core::sc_port_base::bind
void bind(sc_interface &)
Definition: sc_port.cc:109
sc_core::sc_in< sc_dt::sc_biguint< W > >::this_type
sc_in< sc_dt::sc_biguint< W > > this_type
Definition: scx_signal_unsigned.h:937
sc_core::sc_signal< sc_dt::sc_biguint< W > >::this_type
sc_signal< sc_dt::sc_biguint< W > > this_type
Definition: scx_signal_unsigned.h:331
sc_core::sc_inout< sc_dt::sc_biguint< W > >::write
void write(const sc_inout< sc_dt::sc_biguint< W > > &new_val)
Definition: scx_signal_unsigned.h:1474
sc_core::sc_out< sc_dt::sc_biguint< W > >::sc_out
sc_out(inout_port_type &parent_)
Definition: scx_signal_unsigned.h:1561
sc_core::sc_inout< sc_dt::sc_biguint< W > >::read
const sc_dt::sc_biguint< W > & read() const
Definition: scx_signal_unsigned.h:1321
sc_core::sc_signal_in_if::sc_signal_in_if
sc_signal_in_if()
Definition: sc_signal_in_if.hh:61
sc_core::sc_out< sc_dt::sc_biguint< W > >::sc_out
sc_out(const char *name_, inout_if_type &interface_)
Definition: scx_signal_unsigned.h:1557
sc_core::sc_out< sc_dt::sc_biguint< W > >::sc_out
sc_out(const char *name_)
Definition: scx_signal_unsigned.h:1549
sc_core::sc_inout< sc_dt::sc_biguint< W > >::bit
sc_unsigned_sigref & bit(int i)
Definition: scx_signal_unsigned.h:1293
sc_core::sc_in< sc_dt::sc_biguint< W > >::nor_reduce
bool nor_reduce() const
Definition: scx_signal_unsigned.h:1091
sc_core::sc_signal_in_if::read
virtual const T & read() const =0
sc_core::sc_unsigned_part_if::operator=
sc_unsigned_part_if & operator=(const sc_unsigned_part_if &)
sc_dt::sc_unsigned_subref_r
Definition: sc_unsigned.hh:721
sc_core::sc_inout< sc_dt::sc_biguint< W > >::value_changed_event
const sc_event & value_changed_event() const
Definition: scx_signal_unsigned.h:1315
sc_core::sc_out< sc_dt::sc_biguint< W > >::this_type
sc_out< data_type > this_type
Definition: scx_signal_unsigned.h:1537
sc_core::sc_in< sc_dt::sc_biguint< W > >::xnor_reduce
bool xnor_reduce() const
Definition: scx_signal_unsigned.h:1095
sc_core::sc_in< sc_dt::sc_biguint< W > >::concat_get_ctrl
virtual bool concat_get_ctrl(sc_dt::sc_digit *dst_p, int low_i) const
Definition: scx_signal_unsigned.h:1138
sc_core::SC_ID_OPERATION_ON_NON_SPECIALIZED_SIGNAL_
const char SC_ID_OPERATION_ON_NON_SPECIALIZED_SIGNAL_[]
Definition: messages.cc:73
sc_core::sc_signal< sc_dt::sc_biguint< W > >::m_new_val
sc_dt::sc_unsigned m_new_val
Definition: scx_signal_unsigned.h:483
sc_core::sc_inout< sc_dt::sc_biguint< W > >::and_reduce
bool and_reduce() const
Definition: scx_signal_unsigned.h:1345
sc_core::sc_in< sc_dt::sc_biguint< W > >
Definition: scx_signal_unsigned.h:925
ArmISA::a
Bitfield< 8 > a
Definition: miscregs_types.hh:62
sc_core::sc_in< sc_dt::sc_biguint< W > >::inout_if_type
sc_signal_inout_if< sc_dt::sc_biguint< W > > inout_if_type
Definition: scx_signal_unsigned.h:941
SC_REPORT_ERROR
#define SC_REPORT_ERROR(msg_type, msg)
Definition: sc_report_handler.hh:127
sc_core::sc_process_b
Definition: sc_process_handle.hh:118
sc_gem5::ScSignalBaseT< T, SC_ONE_WRITER >::value_changed_event
virtual const sc_core::sc_event & value_changed_event() const
Definition: sc_signal.hh:209
sc_dt::uint64
uint64_t uint64
Definition: sc_nbdefs.hh:206
sc_core::sc_signal_in_if::event
virtual bool event() const =0
sc_core::sc_inout< sc_dt::sc_biguint< W > >::vbind
virtual int vbind(sc_port_base &parent_)
Definition: scx_signal_unsigned.h:1230
sc_core::sc_out< sc_dt::sc_biguint< W > >::data_type
sc_dt::sc_biguint< W > data_type
Definition: scx_signal_unsigned.h:1535
sc_core::sc_event
Definition: sc_event.hh:169
sc_core::sc_signal_in_if< sc_dt::sc_biguint< W > >
Definition: scx_signal_unsigned.h:235
sc_core::sc_inout< sc_dt::sc_biguint< W > >::concat_set
virtual void concat_set(const sc_dt::sc_signed &src, int low_i)
Definition: scx_signal_unsigned.h:1426
MipsISA::event
Bitfield< 10, 5 > event
Definition: pra_constants.hh:297
sc_core::sc_inout< sc_dt::sc_biguint< W > >::inout_port_type
base_type inout_port_type
Definition: scx_signal_unsigned.h:1209
sc_core::sc_in< sc_dt::sc_biguint< W > >::and_reduce
bool and_reduce() const
Definition: scx_signal_unsigned.h:1087
sc_core::sc_in< sc_dt::sc_biguint< W > >::vbind
virtual int vbind(sc_interface &interface_)
Definition: scx_signal_unsigned.h:963
sc_core::sc_in< sc_dt::sc_biguint< W > >::bind
void bind(in_port_type &parent_)
Definition: scx_signal_unsigned.h:952
sc_dt::sc_biguint
Definition: sc_biguint.hh:100
sc_core::operator<<
std::ostream & operator<<(std::ostream &os, sc_status s)
Definition: sc_main.cc:179
sc_core::sc_inout< sc_dt::sc_biguint< W > >::bind
void bind(inout_port_type &parent_)
Definition: scx_signal_unsigned.h:1219
sc_core::sc_inout< sc_dt::sc_biguint< W > >::default_event
const sc_event & default_event() const
Definition: scx_signal_unsigned.h:1309
sc_core::sc_inout< sc_dt::sc_biguint< W > >::sc_inout
sc_inout(const char *name_)
Definition: scx_signal_unsigned.h:1249
sc_core::sc_in< sc_dt::sc_biguint< W > >::range
sc_dt::sc_unsigned_subref_r range(int left, int right) const
Definition: scx_signal_unsigned.h:1043
sc_core::sc_inout< sc_dt::sc_biguint< W > >::sc_inout
sc_inout(const char *name_, inout_if_type &interface_)
Definition: scx_signal_unsigned.h:1257
sc_core::sc_signal_in_if
Definition: sc_signal_in_if.hh:53
sc_core::sc_out< sc_dt::sc_biguint< W > >::sc_out
sc_out(this_type &parent_)
Definition: scx_signal_unsigned.h:1569
sc_core::sc_unsigned_sigref
Definition: scx_signal_unsigned.h:269
sc_core::sc_in< sc_dt::sc_biguint< W > >::nand_reduce
bool nand_reduce() const
Definition: scx_signal_unsigned.h:1089
sc_core::sc_signal_in_if::operator=
sc_signal_in_if< T > & operator=(const sc_signal_in_if< T > &)
Definition: sc_signal_in_if.hh:67
sc_core::sc_inout< sc_dt::sc_biguint< W > >::sc_inout
sc_inout(this_type &parent_)
Definition: scx_signal_unsigned.h:1269
sc_core::sc_inout< sc_dt::sc_biguint< W > >::bind
void bind(const inout_if_type &interface_)
Definition: scx_signal_unsigned.h:1215
sc_core::sc_unsigned_part_if::part_read_target
virtual sc_dt::sc_unsigned * part_read_target()
Definition: scx_signal_unsigned.h:1744
sc_core::sc_signal< sc_dt::sc_biguint< W > >::m_output_p
sc_port_base * m_output_p
Definition: scx_signal_unsigned.h:484
sc_dt::int64
int64_t int64
Definition: sc_nbdefs.hh:205
sc_core::sc_inout< sc_dt::sc_biguint< W > >::xnor_reduce
bool xnor_reduce() const
Definition: scx_signal_unsigned.h:1353
sc_core::sc_gen_unique_name
const char * sc_gen_unique_name(const char *seed)
Definition: sc_module.cc:820
sc_core::sc_in< sc_dt::sc_biguint< W > >::sc_in
sc_in(this_type &parent_)
Definition: scx_signal_unsigned.h:1019
sc_core::sc_trace
void sc_trace(sc_trace_file *tf, const sc_in< T > &i, const std::string &name)
Definition: sc_in.hh:156
sc_core::sc_inout< sc_dt::sc_biguint< W > >::kind
virtual const char * kind() const
Definition: scx_signal_unsigned.h:1379
sc_core::sc_inout< sc_dt::sc_biguint< W > >::concat_get_data
virtual bool concat_get_data(sc_dt::sc_digit *dst_p, int low_i) const
Definition: scx_signal_unsigned.h:1418
sc_core::sc_inout::sc_inout
sc_inout()
Definition: sc_inout.hh:57
sc_core::sc_signal_invalid_writer
void sc_signal_invalid_writer(const char *name, const char *kind, const char *first_writer, const char *second_writer)
sc_core::sc_in< sc_dt::sc_biguint< W > >::concat_get_data
virtual bool concat_get_data(sc_dt::sc_digit *dst_p, int low_i) const
Definition: scx_signal_unsigned.h:1140
sc_core::sc_event_finder_t
Definition: sc_event.hh:224
sc_core::sc_in< sc_dt::sc_biguint< W > >::sc_in
sc_in(const char *name_)
Definition: scx_signal_unsigned.h:991
sc_dt::sc_generic_base
Definition: sc_value_base.hh:145
sc_core::sc_unsigned_sigref::m_if_p
sc_unsigned_part_if * m_if_p
Definition: scx_signal_unsigned.h:304
sc_core::sc_inout< sc_dt::sc_biguint< W > >::sc_inout
sc_inout(const char *name_, this_type &parent_)
Definition: scx_signal_unsigned.h:1273
sc_core::sc_out< sc_dt::sc_biguint< W > >::sc_out
sc_out(inout_if_type &interface_)
Definition: scx_signal_unsigned.h:1553
sc_core::sc_signal_in_if::value_changed_event
virtual const sc_event & value_changed_event() const =0
sc_core::sc_unsigned_part_if::sc_unsigned_part_if
sc_unsigned_part_if()
Definition: scx_signal_unsigned.h:202
sc_core::sc_in< sc_dt::sc_biguint< W > >::vbind
virtual int vbind(sc_port_base &parent_)
Definition: scx_signal_unsigned.h:967
name
const std::string & name()
Definition: trace.cc:50
sc_core::sc_inout
Definition: sc_inout.hh:54
sc_core::sc_inout< sc_dt::sc_biguint< W > >::xor_reduce
bool xor_reduce() const
Definition: scx_signal_unsigned.h:1355
sc_core::sc_unsigned_part_if::read_part
virtual sc_dt::sc_unsigned read_part(int left, int right) const
Definition: scx_signal_unsigned.h:1749
sc_gem5::ScSignalBaseT< T, SC_ONE_WRITER >::default_event
virtual const sc_core::sc_event & default_event() const
Definition: sc_signal.hh:203
sc_dt::sc_unsigned_subref_r::m_left
int m_left
Definition: sc_unsigned.hh:803
sc_core::sc_inout< sc_dt::sc_biguint< W > >::nor_reduce
bool nor_reduce() const
Definition: scx_signal_unsigned.h:1349
sc_core::sc_inout< sc_dt::sc_biguint< W > >::initialize
void initialize(const sc_dt::sc_biguint< W > &value_)
Definition: scx_signal_unsigned.h:1384
sc_core::sc_out::sc_out
sc_out()
Definition: sc_out.hh:41
sc_core::sc_in< sc_dt::sc_biguint< W > >::sc_in
sc_in(const char *name_, this_type &parent_)
Definition: scx_signal_unsigned.h:1023
sc_dt::sc_lv_base
Definition: sc_lv_base.hh:118
sc_core::sc_in
Definition: sc_clock.hh:45
sc_core::sc_inout< sc_dt::sc_biguint< W > >::or_reduce
bool or_reduce() const
Definition: scx_signal_unsigned.h:1351
sc_core::sc_unsigned_part_if::select_part
virtual sc_unsigned_sigref & select_part(int left, int right)
Definition: scx_signal_unsigned.h:1754
sc_core::sc_inout< sc_dt::sc_biguint< W > >::range
sc_dt::sc_unsigned_subref_r range(int left, int right) const
Definition: scx_signal_unsigned.h:1297
sc_core::sc_inout< sc_dt::sc_biguint< W > >::value_changed
sc_event_finder & value_changed() const
Definition: scx_signal_unsigned.h:1335
sc_core::sc_inout< sc_dt::sc_biguint< W > >::if_type
sc_signal_inout_if< sc_dt::sc_biguint< W > > if_type
Definition: scx_signal_unsigned.h:1204
sc_core::sc_inout< sc_dt::sc_biguint< W > >::concat_length
virtual int concat_length(bool *xz_present_p) const
Definition: scx_signal_unsigned.h:1412
sc_core::sc_inout< sc_dt::sc_biguint< W > >::add_trace
void add_trace(sc_trace_file *tf_, const std::string &name_) const
Definition: scx_signal_unsigned.h:1399
sc_core::sc_inout< sc_dt::sc_biguint< W > >::m_traces
sc_trace_params_vec * m_traces
Definition: scx_signal_unsigned.h:1492
sc_core::sc_signal< sc_dt::sc_biguint< W > >::m_writer_p
sc_process_b * m_writer_p
Definition: scx_signal_unsigned.h:485
sc_core::sc_inout< sc_dt::sc_biguint< W > >::sc_inout
sc_inout(inout_port_type &parent_)
Definition: scx_signal_unsigned.h:1261
sc_core::sc_signal::update
virtual void update()
Definition: sc_signal.hh:301
sc_core::sc_prim_channel
Definition: sc_prim.hh:50
sc_core::sc_inout< sc_dt::sc_biguint< W > >::write
void write(const sc_dt::sc_biguint< W > &new_val)
Definition: scx_signal_unsigned.h:1476
sc_core::sc_out< sc_dt::sc_biguint< W > >::inout_if_type
base_type::inout_if_type inout_if_type
Definition: scx_signal_unsigned.h:1540
sc_gem5::ScSignalBaseT< T, SC_ONE_WRITER >::write
virtual void write(const T &t)
Definition: sc_signal.hh:189
sc_dt::operator^=
X & operator^=(sc_proxy< X > &px, const sc_proxy< Y > &py)
Definition: sc_lv_base.hh:541
sc_core::sc_in< sc_dt::sc_biguint< W > >::sc_in
sc_in(const in_if_type &interface_)
Definition: scx_signal_unsigned.h:995
sc_core::sc_unsigned_sigref::initialize
void initialize(sc_unsigned_part_if *if_p, int left_, int right_)
Definition: scx_signal_unsigned.h:1639
sc_core::sc_object::name
const char * name() const
Definition: sc_object.cc:44
sc_core::sc_inout< sc_dt::sc_biguint< W > >::concat_get_uint64
virtual sc_dt::uint64 concat_get_uint64() const
Definition: scx_signal_unsigned.h:1414
sc_dt::sc_unsigned
Definition: sc_unsigned.hh:890
sc_core::sc_in< sc_dt::sc_biguint< W > >::read
const sc_dt::sc_biguint< W > & read() const
Definition: scx_signal_unsigned.h:1063
sc_dt::sc_unsigned::operator=
const sc_unsigned & operator=(const sc_unsigned &v)
sc_core::sc_in< sc_dt::sc_biguint< W > >::sc_in
sc_in(const char *name_, inout_port_type &parent_)
Definition: scx_signal_unsigned.h:1015
sc_core::sc_inout< sc_dt::sc_biguint< W > >::base_type
sc_port< if_type, 1, SC_ONE_OR_MORE_BOUND > base_type
Definition: scx_signal_unsigned.h:1205
sc_core::sc_inout< sc_dt::sc_biguint< W > >::sc_inout
sc_inout()
Definition: scx_signal_unsigned.h:1245
sc_core::sc_out
Definition: sc_out.hh:38
sc_core::sc_inout< sc_dt::sc_biguint< W > >::concat_get_ctrl
virtual bool concat_get_ctrl(sc_dt::sc_digit *dst_p, int low_i) const
Definition: scx_signal_unsigned.h:1416
sc_core::sc_inout::read
const T & read() const
Definition: sc_inout.hh:120
sc_core::sc_unsigned_sigref::m_pool
static sc_vpool< sc_unsigned_sigref > m_pool
Definition: scx_signal_unsigned.h:301
sc_core::sc_in< sc_dt::sc_biguint< W > >::sc_in
sc_in(const char *name_, const in_if_type &interface_)
Definition: scx_signal_unsigned.h:999
sc_core::sc_in< sc_dt::sc_biguint< W > >::or_reduce
bool or_reduce() const
Definition: scx_signal_unsigned.h:1093
sc_gem5::ScSignalBaseT< T, SC_ONE_WRITER >::register_port
virtual void register_port(sc_core::sc_port_base &port, const char *iface_type_name)
Definition: sc_signal.hh:175
sc_core::sc_inout< sc_dt::sc_biguint< W > >::event
bool event() const
Definition: scx_signal_unsigned.h:1329
sc_core::sc_in< sc_dt::sc_biguint< W > >::m_traces
sc_trace_params_vec * m_traces
Definition: scx_signal_unsigned.h:1155
sc_core::sc_in< sc_dt::sc_biguint< W > >::in_if_type
if_type in_if_type
Definition: scx_signal_unsigned.h:939
sc_core::sc_signal::operator=
sc_signal< T, WRITER_POLICY > & operator=(const T &t)
Definition: sc_signal.hh:287
sc_core::sc_event_finder
Definition: sc_event.hh:212
sc_core::sc_inout< sc_dt::sc_biguint< W > >::concat_set
virtual void concat_set(const sc_dt::sc_unsigned &src, int low_i)
Definition: scx_signal_unsigned.h:1428
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
sc_core::sc_port_b< sc_signal_inout_if< T > >::operator[]
sc_signal_inout_if< T > * operator[](int n)
Definition: sc_port.hh:147
sc_core::sc_inout< sc_dt::sc_biguint< W > >::vbind
virtual int vbind(sc_interface &interface_)
Definition: scx_signal_unsigned.h:1226
SC_TEMPLATE
#define SC_TEMPLATE
Definition: scx_signal_unsigned.h:169
sc_core::sc_inout< sc_dt::sc_biguint< W > >::inout_if_type
if_type inout_if_type
Definition: scx_signal_unsigned.h:1208
sc_core::sc_in< sc_dt::sc_biguint< W > >::event
bool event() const
Definition: scx_signal_unsigned.h:1071
sc_dt::sc_unsigned_subref_r::sc_unsigned_subref_r
sc_unsigned_subref_r()
Definition: sc_unsigned.hh:729
sc_core::sc_inout::operator=
sc_inout< T > & operator=(const T &t)
Definition: sc_inout.hh:125
sc_core::sc_signal::~sc_signal
virtual ~sc_signal()
Definition: sc_signal.hh:284
sc_dt::sc_unsigned_subref_r::m_obj_p
sc_unsigned * m_obj_p
Definition: sc_unsigned.hh:804
sc_core::sc_inout< sc_dt::sc_biguint< W > >::write
void write(const sc_in< sc_dt::sc_biguint< W > > &new_val)
Definition: scx_signal_unsigned.h:1472
ArmISA::v
Bitfield< 28 > v
Definition: miscregs_types.hh:51
sc_core::sc_in< sc_dt::sc_biguint< W > >::value_changed
sc_event_finder & value_changed() const
Definition: scx_signal_unsigned.h:1077
sc_core::sc_inout< sc_dt::sc_biguint< W > >::this_type
sc_inout< sc_dt::sc_biguint< W > > this_type
Definition: scx_signal_unsigned.h:1206
sc_core::sc_inout< sc_dt::sc_biguint< W > >::range
sc_unsigned_sigref & range(int left, int right)
Definition: scx_signal_unsigned.h:1301
sc_core::sc_signal::sc_signal
sc_signal()
Definition: sc_signal.hh:275
sc_core::sc_inout< sc_dt::sc_biguint< W > >::sc_inout
sc_inout(inout_if_type &interface_)
Definition: scx_signal_unsigned.h:1253
sc_core::sc_in::operator=
sc_in< T > & operator=(const sc_in< T > &)
sc_core::sc_port_b< sc_signal_inout_if< T > >::get_interface
sc_interface * get_interface()
Definition: sc_port.hh:166
sc_core::sc_port_b< sc_signal_inout_if< T > >::operator()
void operator()(sc_signal_inout_if< T > &i)
Definition: sc_port.hh:121
sc_core::sc_unsigned_sigref::~sc_unsigned_sigref
virtual ~sc_unsigned_sigref()
Definition: scx_signal_unsigned.h:273
sc_core::sc_in< sc_dt::sc_biguint< W > >::in_port_type
base_type in_port_type
Definition: scx_signal_unsigned.h:940
sc_dt::sc_unsigned_bitref_r
Definition: sc_unsigned.hh:581
sc_core::sc_signal< sc_dt::sc_biguint< W > >::m_event_delta
sc_dt::uint64 m_event_delta
Definition: scx_signal_unsigned.h:482
sc_core::sc_in< sc_dt::sc_biguint< W > >::value_changed_event
const sc_event & value_changed_event() const
Definition: scx_signal_unsigned.h:1057
sc_core::sc_in::sc_in
sc_in()
Definition: sc_in.hh:50
sc_core::sc_in< sc_dt::sc_biguint< W > >::bind
void bind(const in_if_type &interface_)
Definition: scx_signal_unsigned.h:948

Generated on Wed Sep 30 2020 14:02:17 for gem5 by doxygen 1.8.17