SystemC
Recoding Infrastructure for SystemC v0.6.0 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
Main Page
Namespaces
Classes
Files
File List
File Members
sysc
datatypes
bit
sc_bv.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
The following code is derived, directly or indirectly, from the SystemC
4
source code Copyright (c) 1996-2014 by all Contributors.
5
All Rights reserved.
6
7
The contents of this file are subject to the restrictions and limitations
8
set forth in the SystemC Open Source License (the "License");
9
You may not use this file except in compliance with such restrictions and
10
limitations. You may obtain instructions on how to receive a copy of the
11
License at http://www.accellera.org/. Software distributed by Contributors
12
under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
13
ANY KIND, either express or implied. See the License for the specific
14
language governing rights and limitations under the License.
15
16
*****************************************************************************/
17
18
/*****************************************************************************
19
20
sc_bv.h -- Arbitrary size bit vector class.
21
22
Original Author: Gene Bushuyev, Synopsys, Inc.
23
24
*****************************************************************************/
25
26
/*****************************************************************************
27
28
MODIFICATION LOG - modifiers, enter your name, affiliation, date and
29
changes you are making here.
30
31
Name, Affiliation, Date:
32
Description of Modification:
33
34
*****************************************************************************/
35
36
// $Log: sc_bv.h,v $
37
// Revision 1.1.1.1 2006/12/15 20:20:04 acg
38
// SystemC 2.3
39
//
40
// Revision 1.3 2006/01/13 18:53:53 acg
41
// Andy Goodrich: added $Log command so that CVS comments are reproduced in
42
// the source.
43
//
44
45
#ifndef SC_BV_H
46
#define SC_BV_H
47
48
49
#include "
sysc/datatypes/bit/sc_bv_base.h
"
50
51
52
namespace
sc_dt
53
{
54
55
// classes defined in this module
56
template
<
int
W>
class
sc_bv
;
57
58
59
// ----------------------------------------------------------------------------
60
// CLASS TEMPLATE : sc_bv<W>
61
//
62
// Arbitrary size bit vector class.
63
// ----------------------------------------------------------------------------
64
65
template
<
int
W>
66
class
sc_bv
67
:
public
sc_bv_base
68
{
69
public
:
70
71
// constructors
72
73
sc_bv
()
74
:
sc_bv_base
( W )
75
{}
76
77
explicit
sc_bv
(
bool
init_value )
78
:
sc_bv_base
( init_value, W )
79
{}
80
81
explicit
sc_bv
(
char
init_value )
82
:
sc_bv_base
( (init_value !=
'0'
), W )
83
{}
84
85
sc_bv
(
const
char
* a )
86
:
sc_bv_base
( W )
87
{
sc_bv_base::operator =
( a ); }
88
89
sc_bv
(
const
bool
* a )
90
:
sc_bv_base
( W )
91
{
sc_bv_base::operator =
( a ); }
92
93
sc_bv
(
const
sc_logic
* a )
94
:
sc_bv_base
( W )
95
{
sc_bv_base::operator =
( a ); }
96
97
sc_bv
(
const
sc_unsigned
& a )
98
:
sc_bv_base
( W )
99
{
sc_bv_base::operator =
( a ); }
100
101
sc_bv
(
const
sc_signed
& a )
102
:
sc_bv_base
( W )
103
{
sc_bv_base::operator =
( a ); }
104
105
sc_bv
(
const
sc_uint_base
& a )
106
:
sc_bv_base
( W )
107
{
sc_bv_base::operator =
( a ); }
108
109
sc_bv
(
const
sc_int_base
& a )
110
:
sc_bv_base
( W )
111
{
sc_bv_base::operator =
( a ); }
112
113
sc_bv
(
unsigned
long
a )
114
:
sc_bv_base
( W )
115
{
sc_bv_base::operator =
( a ); }
116
117
sc_bv
(
long
a )
118
:
sc_bv_base
( W )
119
{
sc_bv_base::operator =
( a ); }
120
121
sc_bv
(
unsigned
int
a )
122
:
sc_bv_base
( W )
123
{
sc_bv_base::operator =
( a ); }
124
125
sc_bv
(
int
a )
126
:
sc_bv_base
( W )
127
{
sc_bv_base::operator =
( a ); }
128
129
sc_bv
(
uint64
a )
130
:
sc_bv_base
( W )
131
{
sc_bv_base::operator =
( a ); }
132
133
sc_bv
(
int64
a )
134
:
sc_bv_base
( W )
135
{
sc_bv_base::operator =
( a ); }
136
137
template
<
class
X>
138
sc_bv
(
const
sc_proxy<X>
& a )
139
:
sc_bv_base
( W )
140
{
sc_bv_base::operator =
( a ); }
141
142
sc_bv
(
const
sc_bv<W>
& a )
143
:
sc_bv_base
( a )
144
{}
145
146
147
// assignment operators
148
149
template
<
class
X>
150
sc_bv<W>
&
operator =
(
const
sc_proxy<X>
& a )
151
{
sc_bv_base::operator =
( a );
return
*
this
; }
152
153
sc_bv<W>
&
operator =
(
const
sc_bv<W>
& a )
154
{
sc_bv_base::operator =
( a );
return
*
this
; }
155
156
sc_bv<W>
&
operator =
(
const
char
* a )
157
{
sc_bv_base::operator =
( a );
return
*
this
; }
158
159
sc_bv<W>
&
operator =
(
const
bool
* a )
160
{
sc_bv_base::operator =
( a );
return
*
this
; }
161
162
sc_bv<W>
&
operator =
(
const
sc_logic
* a )
163
{
sc_bv_base::operator =
( a );
return
*
this
; }
164
165
sc_bv<W>
&
operator =
(
const
sc_unsigned
& a )
166
{
sc_bv_base::operator =
( a );
return
*
this
; }
167
168
sc_bv<W>
&
operator =
(
const
sc_signed
& a )
169
{
sc_bv_base::operator =
( a );
return
*
this
; }
170
171
sc_bv<W>
&
operator =
(
const
sc_uint_base
& a )
172
{
sc_bv_base::operator =
( a );
return
*
this
; }
173
174
sc_bv<W>
&
operator =
(
const
sc_int_base
& a )
175
{
sc_bv_base::operator =
( a );
return
*
this
; }
176
177
sc_bv<W>
&
operator =
(
unsigned
long
a )
178
{
sc_bv_base::operator =
( a );
return
*
this
; }
179
180
sc_bv<W>
&
operator =
(
long
a )
181
{
sc_bv_base::operator =
( a );
return
*
this
; }
182
183
sc_bv<W>
&
operator =
(
unsigned
int
a )
184
{
sc_bv_base::operator =
( a );
return
*
this
; }
185
186
sc_bv<W>
&
operator =
(
int
a )
187
{
sc_bv_base::operator =
( a );
return
*
this
; }
188
189
sc_bv<W>
&
operator =
(
uint64
a )
190
{
sc_bv_base::operator =
( a );
return
*
this
; }
191
192
sc_bv<W>
&
operator =
(
int64
a )
193
{
sc_bv_base::operator =
( a );
return
*
this
; }
194
};
195
196
}
// namespace sc_dt
197
198
199
#endif
sc_dt::sc_bv::sc_bv
sc_bv()
Definition:
sc_bv.h:73
sc_dt::sc_unsigned
Definition:
sc_unsigned.h:985
sc_dt::sc_bv::sc_bv
sc_bv(const bool *a)
Definition:
sc_bv.h:89
sc_dt::sc_bv
Definition:
sc_bv.h:56
sc_dt::sc_bv::sc_bv
sc_bv(const sc_uint_base &a)
Definition:
sc_bv.h:105
sc_bv_base.h
sc_dt::sc_logic
Definition:
sc_logic.h:99
sc_dt::sc_bv::sc_bv
sc_bv(int64 a)
Definition:
sc_bv.h:133
sc_dt::int64
int64_t int64
Definition:
sc_nbdefs.h:182
sc_dt::sc_bv::sc_bv
sc_bv(bool init_value)
Definition:
sc_bv.h:77
sc_dt::sc_bv_base::operator=
sc_bv_base & operator=(const sc_proxy< X > &a)
Definition:
sc_bv_base.h:143
sc_dt::sc_bv::sc_bv
sc_bv(const sc_signed &a)
Definition:
sc_bv.h:101
sc_dt::sc_bv::sc_bv
sc_bv(const sc_unsigned &a)
Definition:
sc_bv.h:97
sc_dt::sc_proxy
Definition:
sc_proxy.h:79
sc_dt::sc_bv::operator=
sc_bv< W > & operator=(const sc_proxy< X > &a)
Definition:
sc_bv.h:150
sc_dt::sc_bv::sc_bv
sc_bv(uint64 a)
Definition:
sc_bv.h:129
sc_dt::sc_bv::sc_bv
sc_bv(const sc_int_base &a)
Definition:
sc_bv.h:109
sc_dt::sc_bv::sc_bv
sc_bv(const char *a)
Definition:
sc_bv.h:85
sc_dt::sc_bv::sc_bv
sc_bv(unsigned long a)
Definition:
sc_bv.h:113
sc_dt::sc_bv::sc_bv
sc_bv(long a)
Definition:
sc_bv.h:117
sc_dt::sc_bv::sc_bv
sc_bv(const sc_logic *a)
Definition:
sc_bv.h:93
sc_dt::sc_bv::sc_bv
sc_bv(const sc_bv< W > &a)
Definition:
sc_bv.h:142
sc_dt::sc_signed
Definition:
sc_signed.h:1085
sc_dt::sc_int_base
Definition:
sc_int_base.h:537
sc_dt::uint64
uint64_t uint64
Definition:
sc_nbdefs.h:183
sc_dt::sc_bv::sc_bv
sc_bv(unsigned int a)
Definition:
sc_bv.h:121
sc_dt::sc_bv::sc_bv
sc_bv(int a)
Definition:
sc_bv.h:125
sc_dt::sc_bv::sc_bv
sc_bv(char init_value)
Definition:
sc_bv.h:81
sc_dt::sc_bv_base
Definition:
sc_bv_base.h:74
sc_dt::sc_bv::sc_bv
sc_bv(const sc_proxy< X > &a)
Definition:
sc_bv.h:138
sc_dt::sc_uint_base
Definition:
sc_uint_base.h:523
Generated on Mon Sep 30 2019 13:16:43 for SystemC by
1.8.5