1 | /*------------------------------------------------------------\ |
---|
2 | | | |
---|
3 | | Tool : systemcass | |
---|
4 | | | |
---|
5 | | File : sc_bv.h | |
---|
6 | | | |
---|
7 | | Author : Buchmann Richard | |
---|
8 | | | |
---|
9 | | Date : 14_04_2005 | |
---|
10 | | | |
---|
11 | \------------------------------------------------------------*/ |
---|
12 | #ifndef __SC_BV_H__ |
---|
13 | #define __SC_BV_H__ |
---|
14 | |
---|
15 | // ---------------------------------------------------------------------------- |
---|
16 | // CLASS : sc_bv |
---|
17 | // |
---|
18 | // ---------------------------------------------------------------------------- |
---|
19 | |
---|
20 | #include "sc_nbdefs.h" |
---|
21 | #include "sc_logic.h" |
---|
22 | #include "sc_unsigned.h" |
---|
23 | #include "sc_signed.h" |
---|
24 | #include "sc_uint.h" |
---|
25 | #include "sc_int.h" |
---|
26 | |
---|
27 | namespace sc_dt { |
---|
28 | |
---|
29 | class sc_bv_base { |
---|
30 | public: |
---|
31 | // constructors |
---|
32 | sc_bv_base (const char * a); |
---|
33 | sc_bv_base (const char * a, int length_); |
---|
34 | template < class X > sc_bv_base (const sc_bv_base & a); |
---|
35 | virtual ~ sc_bv_base (); |
---|
36 | // assignment operators |
---|
37 | template < class X > sc_bv_base & operator = (const sc_bv_base & a); |
---|
38 | sc_bv_base & operator = (const char *a); |
---|
39 | sc_bv_base & operator = (const bool * a); |
---|
40 | sc_bv_base & operator = (const sc_logic * a); |
---|
41 | sc_bv_base & operator = (const sc_unsigned & a); |
---|
42 | sc_bv_base & operator = (const sc_signed & a); |
---|
43 | sc_bv_base & operator = (unsigned long a); |
---|
44 | sc_bv_base & operator = (long a); |
---|
45 | sc_bv_base & operator = (unsigned int a); |
---|
46 | sc_bv_base & operator = (int a); |
---|
47 | sc_bv_base & operator = (uint64 a); |
---|
48 | sc_bv_base & operator = (int64 a); |
---|
49 | |
---|
50 | // methods |
---|
51 | int length () const; |
---|
52 | bool is_01 () const; |
---|
53 | }; |
---|
54 | |
---|
55 | |
---|
56 | template < int W > |
---|
57 | class sc_bv : public sc_bv_base { |
---|
58 | public: |
---|
59 | // constructors |
---|
60 | sc_bv (); |
---|
61 | explicit sc_bv (bool init_value); |
---|
62 | explicit sc_bv (char init_value); |
---|
63 | sc_bv (const char *a); |
---|
64 | sc_bv (const bool * a); |
---|
65 | sc_bv (const sc_logic * a); |
---|
66 | sc_bv (const sc_unsigned & a); |
---|
67 | sc_bv (const sc_signed & a); |
---|
68 | sc_bv (unsigned long a); |
---|
69 | sc_bv (long a); |
---|
70 | sc_bv (unsigned int a); |
---|
71 | sc_bv (int a); |
---|
72 | sc_bv (uint64 a); |
---|
73 | sc_bv (int64 a); |
---|
74 | sc_bv (const sc_bv_base & a); |
---|
75 | sc_bv (const sc_bv < W > & a); |
---|
76 | // assignment operators |
---|
77 | template < class X > sc_bv < W > & operator = (const sc_bv_base & a); |
---|
78 | sc_bv < W > & operator = (const sc_bv < W > &a); |
---|
79 | sc_bv < W > & operator = (const char *a); |
---|
80 | sc_bv < W > & operator = (const bool * a); |
---|
81 | sc_bv < W > & operator = (const sc_logic * a); |
---|
82 | sc_bv < W > & operator = (const sc_unsigned & a); |
---|
83 | sc_bv < W > & operator = (const sc_signed & a); |
---|
84 | sc_bv < W > & operator = (unsigned long a); |
---|
85 | sc_bv < W > & operator = (long a); |
---|
86 | sc_bv < W > & operator = (unsigned int a); |
---|
87 | sc_bv < W > & operator = (int a); |
---|
88 | sc_bv < W > & operator = (uint64 a); |
---|
89 | sc_bv < W > & operator = (int64 a); |
---|
90 | }; |
---|
91 | |
---|
92 | } /* end of sc_dt namespace */ |
---|
93 | |
---|
94 | #endif /* __SC_BV_H__ */ |
---|
95 | |
---|
96 | /* |
---|
97 | # Local Variables: |
---|
98 | # tab-width: 4; |
---|
99 | # c-basic-offset: 4; |
---|
100 | # c-file-offsets:((innamespace . 0)(inline-open . 0)); |
---|
101 | # indent-tabs-mode: nil; |
---|
102 | # End: |
---|
103 | # |
---|
104 | # vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
105 | */ |
---|
106 | |
---|