SystemC  2.3.2
Accellera SystemC proof-of-concept library
sc_fixed.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_fixed.h -
23 
24  Original Author: Martin Janssen, Synopsys, Inc.
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 // $Log: sc_fixed.h,v $
39 // Revision 1.2 2011/01/19 18:57:40 acg
40 // Andy Goodrich: changes for IEEE_1666_2011.
41 //
42 // Revision 1.1.1.1 2006/12/15 20:20:04 acg
43 // SystemC 2.3
44 //
45 // Revision 1.3 2006/01/13 18:53:57 acg
46 // Andy Goodrich: added $Log command so that CVS comments are reproduced in
47 // the source.
48 //
49 
50 #ifndef SC_FIXED_H
51 #define SC_FIXED_H
52 
53 
55 
56 
57 namespace sc_dt
58 {
59 
60 // classes defined in this module
61 template <int W, int I, sc_q_mode Q, sc_o_mode O, int N> class sc_fixed;
62 template <int W, int I, sc_q_mode Q, sc_o_mode O, int N> class sc_fixed_fast;
63 
64 
71 template <int W, int I,
74 class sc_fixed : public sc_fix
75 {
76 
77 public:
78 
79  // constructors
80 
81  explicit sc_fixed( sc_fxnum_observer* = 0 );
82  explicit sc_fixed( const sc_fxcast_switch&, sc_fxnum_observer* = 0 );
83 
84 #define DECL_CTORS_T_A(tp) \
85  sc_fixed( tp, sc_fxnum_observer* = 0 ); \
86  sc_fixed( tp, const sc_fxcast_switch&, sc_fxnum_observer* = 0 );
87 
88 #define DECL_CTORS_T_B(tp) \
89  explicit sc_fixed( tp, sc_fxnum_observer* = 0 ); \
90  sc_fixed( tp, const sc_fxcast_switch&, sc_fxnum_observer* = 0 );
91 
92  DECL_CTORS_T_A(int)
93  DECL_CTORS_T_A(unsigned int)
94  DECL_CTORS_T_A(long)
95  DECL_CTORS_T_A(unsigned long)
96  DECL_CTORS_T_A(float)
97  DECL_CTORS_T_A(double)
98  DECL_CTORS_T_A(const char*)
99  DECL_CTORS_T_A(const sc_fxval&)
101  DECL_CTORS_T_A(const sc_fxnum&)
103 #ifndef SC_FX_EXCLUDE_OTHER
108  DECL_CTORS_T_B(const sc_signed&)
110 #endif
111 
112 #undef DECL_CTORS_T_A
113 #undef DECL_CTORS_T_B
114 
115  // copy constructor
116 
117  sc_fixed( const sc_fixed<W,I,Q,O,N>& );
118 
119 
120  // assignment operators
121 
123 
124 #define DECL_ASN_OP_T(op,tp) \
125  sc_fixed& operator op ( tp );
126 
127 #ifndef SC_FX_EXCLUDE_OTHER
128 #define DECL_ASN_OP_OTHER(op) \
129  DECL_ASN_OP_T(op,int64) \
130  DECL_ASN_OP_T(op,uint64) \
131  DECL_ASN_OP_T(op,const sc_int_base&) \
132  DECL_ASN_OP_T(op,const sc_uint_base&) \
133  DECL_ASN_OP_T(op,const sc_signed&) \
134  DECL_ASN_OP_T(op,const sc_unsigned&)
135 #else
136 #define DECL_ASN_OP_OTHER(op)
137 #endif
138 
139 #define DECL_ASN_OP(op) \
140  DECL_ASN_OP_T(op,int) \
141  DECL_ASN_OP_T(op,unsigned int) \
142  DECL_ASN_OP_T(op,long) \
143  DECL_ASN_OP_T(op,unsigned long) \
144  DECL_ASN_OP_T(op,float) \
145  DECL_ASN_OP_T(op,double) \
146  DECL_ASN_OP_T(op,const char*) \
147  DECL_ASN_OP_T(op,const sc_fxval&) \
148  DECL_ASN_OP_T(op,const sc_fxval_fast&) \
149  DECL_ASN_OP_T(op,const sc_fxnum&) \
150  DECL_ASN_OP_T(op,const sc_fxnum_fast&) \
151  DECL_ASN_OP_OTHER(op)
152 
153  DECL_ASN_OP(=)
154 
155  DECL_ASN_OP(*=)
156  DECL_ASN_OP(/=)
157  DECL_ASN_OP(+=)
158  DECL_ASN_OP(-=)
159 
160  DECL_ASN_OP_T(<<=,int)
161  DECL_ASN_OP_T(>>=,int)
162 
163  DECL_ASN_OP_T(&=,const sc_fix&)
164  DECL_ASN_OP_T(&=,const sc_fix_fast&)
165  DECL_ASN_OP_T(|=,const sc_fix&)
166  DECL_ASN_OP_T(|=,const sc_fix_fast&)
167  DECL_ASN_OP_T(^=,const sc_fix&)
168  DECL_ASN_OP_T(^=,const sc_fix_fast&)
169 
170 #undef DECL_ASN_OP_T
171 #undef DECL_ASN_OP_OTHER
172 #undef DECL_ASN_OP
173 
174 
175  // auto-increment and auto-decrement
176 
177  const sc_fxval operator ++ ( int );
178  const sc_fxval operator -- ( int );
179 
182 
183 };
184 
185 
192 template <int W, int I,
195 class sc_fixed_fast : public sc_fix_fast
196 {
197 
198 public:
199 
200  // constructors
201 
202  explicit sc_fixed_fast( sc_fxnum_fast_observer* = 0 );
203  explicit sc_fixed_fast( const sc_fxcast_switch&,
204  sc_fxnum_fast_observer* = 0 );
205 
206 #define DECL_CTORS_T_A(tp) \
207  sc_fixed_fast( tp, sc_fxnum_fast_observer* = 0 ); \
208  sc_fixed_fast( tp, const sc_fxcast_switch&, \
209  sc_fxnum_fast_observer* = 0 );
210 
211 #define DECL_CTORS_T_B(tp) \
212  explicit sc_fixed_fast( tp, sc_fxnum_fast_observer* = 0 ); \
213  sc_fixed_fast( tp, const sc_fxcast_switch&, \
214  sc_fxnum_fast_observer* = 0 );
215 
216  DECL_CTORS_T_A(int)
217  DECL_CTORS_T_A(unsigned int)
218  DECL_CTORS_T_A(long)
219  DECL_CTORS_T_A(unsigned long)
220  DECL_CTORS_T_A(float)
221  DECL_CTORS_T_A(double)
222  DECL_CTORS_T_A(const char*)
223  DECL_CTORS_T_A(const sc_fxval&)
224  DECL_CTORS_T_A(const sc_fxval_fast&)
225  DECL_CTORS_T_A(const sc_fxnum&)
226  DECL_CTORS_T_A(const sc_fxnum_fast&)
227 #ifndef SC_FX_EXCLUDE_OTHER
230  DECL_CTORS_T_B(const sc_int_base&)
231  DECL_CTORS_T_B(const sc_uint_base&)
232  DECL_CTORS_T_B(const sc_signed&)
233  DECL_CTORS_T_B(const sc_unsigned&)
234 #endif
235 
236 #undef DECL_CTORS_T_A
237 #undef DECL_CTORS_T_B
238 
239  // copy constructor
240 
241  sc_fixed_fast( const sc_fixed_fast<W,I,Q,O,N>& );
242 
243 
244  // assignment operators
245 
246  sc_fixed_fast& operator = ( const sc_fixed_fast<W,I,Q,O,N>& );
247 
248 #define DECL_ASN_OP_T(op,tp) \
249  sc_fixed_fast& operator op ( tp );
250 
251 #ifndef SC_FX_EXCLUDE_OTHER
252 #define DECL_ASN_OP_OTHER(op) \
253  DECL_ASN_OP_T(op,int64) \
254  DECL_ASN_OP_T(op,uint64) \
255  DECL_ASN_OP_T(op,const sc_int_base&) \
256  DECL_ASN_OP_T(op,const sc_uint_base&) \
257  DECL_ASN_OP_T(op,const sc_signed&) \
258  DECL_ASN_OP_T(op,const sc_unsigned&)
259 #else
260 #define DECL_ASN_OP_OTHER(op)
261 #endif
262 
263 #define DECL_ASN_OP(op) \
264  DECL_ASN_OP_T(op,int) \
265  DECL_ASN_OP_T(op,unsigned int) \
266  DECL_ASN_OP_T(op,long) \
267  DECL_ASN_OP_T(op,unsigned long) \
268  DECL_ASN_OP_T(op,float) \
269  DECL_ASN_OP_T(op,double) \
270  DECL_ASN_OP_T(op,const char*) \
271  DECL_ASN_OP_T(op,const sc_fxval&) \
272  DECL_ASN_OP_T(op,const sc_fxval_fast&) \
273  DECL_ASN_OP_T(op,const sc_fxnum&) \
274  DECL_ASN_OP_T(op,const sc_fxnum_fast&) \
275  DECL_ASN_OP_OTHER(op)
276 
277  DECL_ASN_OP(=)
278 
279  DECL_ASN_OP(*=)
280  DECL_ASN_OP(/=)
281  DECL_ASN_OP(+=)
282  DECL_ASN_OP(-=)
283 
284  DECL_ASN_OP_T(<<=,int)
285  DECL_ASN_OP_T(>>=,int)
286 
287  DECL_ASN_OP_T(&=,const sc_fix&)
288  DECL_ASN_OP_T(&=,const sc_fix_fast&)
289  DECL_ASN_OP_T(|=,const sc_fix&)
290  DECL_ASN_OP_T(|=,const sc_fix_fast&)
291  DECL_ASN_OP_T(^=,const sc_fix&)
292  DECL_ASN_OP_T(^=,const sc_fix_fast&)
293 
294 #undef DECL_ASN_OP_T
295 #undef DECL_ASN_OP_OTHER
296 #undef DECL_ASN_OP
297 
298 
299  // auto-increment and auto-decrement
300 
301  const sc_fxval_fast operator ++ ( int );
302  const sc_fxval_fast operator -- ( int );
303 
304  sc_fixed_fast& operator ++ ();
305  sc_fixed_fast& operator -- ();
306 
307 };
308 
309 
310 // IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
311 
318 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
319 inline
321 : sc_fix( W, I, Q, O, N, observer_ )
322 {}
323 
324 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
325 inline
327  sc_fxnum_observer* observer_ )
328 : sc_fix( W, I, Q, O, N, cast_sw, observer_ )
329 {}
330 
331 #define DEFN_CTORS_T(tp) \
332 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
333 inline \
334 sc_fixed<W,I,Q,O,N>::sc_fixed( tp a, \
335  sc_fxnum_observer* observer_ ) \
336 : sc_fix( a, W, I, Q, O, N, observer_ ) \
337 {} \
338  \
339 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
340 inline \
341 sc_fixed<W,I,Q,O,N>::sc_fixed( tp a, \
342  const sc_fxcast_switch& cast_sw, \
343  sc_fxnum_observer* observer_ ) \
344 : sc_fix( a, W, I, Q, O, N, cast_sw, observer_ ) \
345 {}
346 
347 DEFN_CTORS_T(int)
348 DEFN_CTORS_T(unsigned int)
349 DEFN_CTORS_T(long)
350 DEFN_CTORS_T(unsigned long)
351 DEFN_CTORS_T(float)
352 DEFN_CTORS_T(double)
353 DEFN_CTORS_T(const char*)
354 DEFN_CTORS_T(const sc_fxval&)
356 DEFN_CTORS_T(const sc_fxnum&)
358 #ifndef SC_FX_EXCLUDE_OTHER
363 DEFN_CTORS_T(const sc_signed&)
365 #endif
366 
367 #undef DEFN_CTORS_T
368 
369 // copy constructor
370 
371 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
372 inline
374 : sc_fix( a, W, I, Q, O, N )
375 {}
376 
377 
378 // assignment operators
379 
380 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
381 inline
384 {
385  sc_fix::operator = ( a );
386  return *this;
387 }
388 
389 #define DEFN_ASN_OP_T(op,tp) \
390 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
391 inline \
392 sc_fixed<W,I,Q,O,N>& \
393 sc_fixed<W,I,Q,O,N>::operator op ( tp a ) \
394 { \
395  sc_fix::operator op ( a ); \
396  return *this; \
397 }
398 
399 #ifndef SC_FX_EXCLUDE_OTHER
400 #define DEFN_ASN_OP_OTHER(op) \
401 DEFN_ASN_OP_T(op,int64) \
402 DEFN_ASN_OP_T(op,uint64) \
403 DEFN_ASN_OP_T(op,const sc_int_base&) \
404 DEFN_ASN_OP_T(op,const sc_uint_base&) \
405 DEFN_ASN_OP_T(op,const sc_signed&) \
406 DEFN_ASN_OP_T(op,const sc_unsigned&)
407 #else
408 #define DEFN_ASN_OP_OTHER(op)
409 #endif
410 
411 #define DEFN_ASN_OP(op) \
412 DEFN_ASN_OP_T(op,int) \
413 DEFN_ASN_OP_T(op,unsigned int) \
414 DEFN_ASN_OP_T(op,long) \
415 DEFN_ASN_OP_T(op,unsigned long) \
416 DEFN_ASN_OP_T(op,float) \
417 DEFN_ASN_OP_T(op,double) \
418 DEFN_ASN_OP_T(op,const char*) \
419 DEFN_ASN_OP_T(op,const sc_fxval&) \
420 DEFN_ASN_OP_T(op,const sc_fxval_fast&) \
421 DEFN_ASN_OP_T(op,const sc_fxnum&) \
422 DEFN_ASN_OP_T(op,const sc_fxnum_fast&) \
423 DEFN_ASN_OP_OTHER(op)
424 
425 DEFN_ASN_OP(=)
426 
427 DEFN_ASN_OP(*=)
428 DEFN_ASN_OP(/=)
429 DEFN_ASN_OP(+=)
430 DEFN_ASN_OP(-=)
431 
432 DEFN_ASN_OP_T(<<=,int)
433 DEFN_ASN_OP_T(>>=,int)
434 
435 DEFN_ASN_OP_T(&=,const sc_fix&)
436 DEFN_ASN_OP_T(&=,const sc_fix_fast&)
437 DEFN_ASN_OP_T(|=,const sc_fix&)
438 DEFN_ASN_OP_T(|=,const sc_fix_fast&)
439 DEFN_ASN_OP_T(^=,const sc_fix&)
440 DEFN_ASN_OP_T(^=,const sc_fix_fast&)
441 
442 #undef DEFN_ASN_OP_T
443 #undef DEFN_ASN_OP_OTHER
444 #undef DEFN_ASN_OP
445 
446 
447 // auto-increment and auto-decrement
448 
449 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
450 inline
451 const sc_fxval
453 {
454  return sc_fxval( sc_fix::operator ++ ( 0 ) );
455 }
456 
457 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
458 inline
459 const sc_fxval
461 {
462  return sc_fxval( sc_fix::operator -- ( 0 ) );
463 }
464 
465 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
466 inline
469 {
471  return *this;
472 }
473 
474 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
475 inline
478 {
480  return *this;
481 }
482 
483 
490 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
491 inline
493 : sc_fix_fast( W, I, Q, O, N, observer_ )
494 {}
495 
496 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
497 inline
499  sc_fxnum_fast_observer* observer_ )
500 : sc_fix_fast( W, I, Q, O, N, cast_sw, observer_ )
501 {}
502 
503 #define DEFN_CTORS_T(tp) \
504 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
505 inline \
506 sc_fixed_fast<W,I,Q,O,N>::sc_fixed_fast( tp a, \
507  sc_fxnum_fast_observer* observer_ ) \
508 : sc_fix_fast( a, W, I, Q, O, N, observer_ ) \
509 {} \
510  \
511 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
512 inline \
513 sc_fixed_fast<W,I,Q,O,N>::sc_fixed_fast( tp a, \
514  const sc_fxcast_switch& cast_sw, \
515  sc_fxnum_fast_observer* observer_ ) \
516 : sc_fix_fast( a, W, I, Q, O, N, cast_sw, observer_ ) \
517 {}
518 
519 DEFN_CTORS_T(int)
520 DEFN_CTORS_T(unsigned int)
521 DEFN_CTORS_T(long)
522 DEFN_CTORS_T(unsigned long)
523 DEFN_CTORS_T(float)
524 DEFN_CTORS_T(double)
525 DEFN_CTORS_T(const char*)
526 DEFN_CTORS_T(const sc_fxval&)
528 DEFN_CTORS_T(const sc_fxnum&)
529 DEFN_CTORS_T(const sc_fxnum_fast&)
530 #ifndef SC_FX_EXCLUDE_OTHER
533 DEFN_CTORS_T(const sc_int_base&)
534 DEFN_CTORS_T(const sc_uint_base&)
535 DEFN_CTORS_T(const sc_signed&)
536 DEFN_CTORS_T(const sc_unsigned&)
537 #endif
538 
539 #undef DEFN_CTORS_T
540 
541 // copy constructor
542 
543 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
544 inline
546 : sc_fix_fast( a, W, I, Q, O, N )
547 {}
548 
549 
550 // assignment operators
551 
552 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
553 inline
556 {
558  return *this;
559 }
560 
561 #define DEFN_ASN_OP_T(op,tp) \
562 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N> \
563 inline \
564 sc_fixed_fast<W,I,Q,O,N>& \
565 sc_fixed_fast<W,I,Q,O,N>::operator op ( tp a ) \
566 { \
567  sc_fix_fast::operator op ( a ); \
568  return *this; \
569 }
570 
571 #ifndef SC_FX_EXCLUDE_OTHER
572 #define DEFN_ASN_OP_OTHER(op) \
573 DEFN_ASN_OP_T(op,int64) \
574 DEFN_ASN_OP_T(op,uint64) \
575 DEFN_ASN_OP_T(op,const sc_int_base&) \
576 DEFN_ASN_OP_T(op,const sc_uint_base&) \
577 DEFN_ASN_OP_T(op,const sc_signed&) \
578 DEFN_ASN_OP_T(op,const sc_unsigned&)
579 #else
580 #define DEFN_ASN_OP_OTHER(op)
581 #endif
582 
583 #define DEFN_ASN_OP(op) \
584 DEFN_ASN_OP_T(op,int) \
585 DEFN_ASN_OP_T(op,unsigned int) \
586 DEFN_ASN_OP_T(op,long) \
587 DEFN_ASN_OP_T(op,unsigned long) \
588 DEFN_ASN_OP_T(op,float) \
589 DEFN_ASN_OP_T(op,double) \
590 DEFN_ASN_OP_T(op,const char*) \
591 DEFN_ASN_OP_T(op,const sc_fxval&) \
592 DEFN_ASN_OP_T(op,const sc_fxval_fast&) \
593 DEFN_ASN_OP_T(op,const sc_fxnum&) \
594 DEFN_ASN_OP_T(op,const sc_fxnum_fast&) \
595 DEFN_ASN_OP_OTHER(op)
596 
597 DEFN_ASN_OP(=)
598 
599 DEFN_ASN_OP(*=)
600 DEFN_ASN_OP(/=)
601 DEFN_ASN_OP(+=)
602 DEFN_ASN_OP(-=)
603 
604 DEFN_ASN_OP_T(<<=,int)
605 DEFN_ASN_OP_T(>>=,int)
606 
607 DEFN_ASN_OP_T(&=,const sc_fix&)
608 DEFN_ASN_OP_T(&=,const sc_fix_fast&)
609 DEFN_ASN_OP_T(|=,const sc_fix&)
610 DEFN_ASN_OP_T(|=,const sc_fix_fast&)
611 DEFN_ASN_OP_T(^=,const sc_fix&)
612 DEFN_ASN_OP_T(^=,const sc_fix_fast&)
613 
614 #undef DEFN_ASN_OP_T
615 #undef DEFN_ASN_OP_OTHER
616 #undef DEFN_ASN_OP
617 
618 
619 // auto-increment and auto-decrement
620 
621 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
622 inline
623 const sc_fxval_fast
625 {
626  return sc_fxval_fast( sc_fix_fast::operator ++ ( 0 ) );
627 }
628 
629 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
630 inline
631 const sc_fxval_fast
633 {
634  return sc_fxval_fast( sc_fix_fast::operator -- ( 0 ) );
635 }
636 
637 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
638 inline
641 {
643  return *this;
644 }
645 
646 template<int W, int I, sc_q_mode Q, sc_o_mode O, int N>
647 inline
650 {
652  return *this;
653 }
654 
655 } // namespace sc_dt
656 
657 
658 #endif
659 
660 // Taf!
Base class for the fixed-point types; limited precision.
Definition: sc_fxnum.h:991
sc_fixed_fast & operator++()
Definition: sc_fixed.h:640
const sc_o_mode SC_DEFAULT_O_MODE_
Definition: sc_fxdefs.h:204
"Constrained" signed fixed-point class; arbitrary precision.
Definition: sc_fixed.h:61
Fixed-point value types; limited precision.
Definition: sc_fxval.h:439
#define DECL_CTORS_T_A(tp)
Definition: sc_fixed.h:206
sc_fix_fast & operator++()
Definition: sc_fix.h:1919
int64_t int64
Definition: sc_nbdefs.h:188
const sc_q_mode SC_DEFAULT_Q_MODE_
Definition: sc_fxdefs.h:203
sc_fix & operator++()
Definition: sc_fix.h:1221
Base class for sc_uint.
Definition: sc_uint_base.h:534
Fixed-point cast switch class.
sc_fixed(sc_fxnum_observer *=0)
Definition: sc_fixed.h:320
sc_fix_fast & operator=(const sc_fix_fast &)
Definition: sc_fix.h:1820
const int SC_DEFAULT_N_BITS_
Definition: sc_fxdefs.h:205
"Unconstrained" signed fixed-point class; limited precision.
Definition: sc_fix.h:306
Arbitrary precision signed number.
Definition: sc_signed.h:1099
sc_fixed_fast & operator--()
Definition: sc_fixed.h:649
#define DEFN_ASN_OP(op)
Definition: sc_fixed.h:583
#define DEFN_CTORS_T(tp)
Definition: sc_fixed.h:503
Abstract base class for fixed-point types observers; limited precision.
uint64_t uint64
Definition: sc_nbdefs.h:189
Arbitrary precision unsigned number.
Definition: sc_unsigned.h:1001
Base class for the fixed-point types; arbitrary precision.
Definition: sc_fxnum.h:564
"Constrained" signed fixed-point class; limited precision.
Definition: sc_fixed.h:62
sc_fixed & operator--()
Definition: sc_fixed.h:477
Base class for sc_int.
Definition: sc_int_base.h:548
Fixed-point value type; arbitrary precision.
Definition: sc_fxval.h:95
Abstract base class for fixed-point types observers; arbitrary precision.
#define DECL_CTORS_T_B(tp)
Definition: sc_fixed.h:211
sc_fix_fast & operator--()
Definition: sc_fix.h:1927
friend class sc_fxval_fast
Definition: sc_fxnum.h:993
sc_fixed_fast & operator=(const sc_fixed_fast< W, I, Q, O, N > &)
Definition: sc_fixed.h:555
sc_fix & operator--()
Definition: sc_fix.h:1229
sc_fixed & operator++()
Definition: sc_fixed.h:468
#define DEFN_ASN_OP_T(op, tp)
Definition: sc_fixed.h:561
sc_fix_fast(sc_fxnum_fast_observer *=0)
Definition: sc_fix.h:1245
sc_q_mode
Enumeration of quantization modes.
Definition: sc_fxdefs.h:90
sc_fix & operator=(const sc_fix &)
Definition: sc_fix.h:1122
sc_fixed_fast(sc_fxnum_fast_observer *=0)
Definition: sc_fixed.h:492
friend class sc_fxval
Definition: sc_fxnum.h:566
sc_fixed & operator=(const sc_fixed< W, I, Q, O, N > &)
Definition: sc_fixed.h:383
#define DECL_ASN_OP(op)
Definition: sc_fixed.h:263
#define DECL_ASN_OP_T(op, tp)
Definition: sc_fixed.h:248
"Unconstrained" signed fixed-point class; arbitrary precision.
Definition: sc_fix.h:71
sc_fix(sc_fxnum_observer *=0)
Definition: sc_fix.h:537
sc_o_mode
Enumeration of overflow modes.
Definition: sc_fxdefs.h:119