gem5
v24.1.0.1
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
q
r
s
t
v
x
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Symbols
:
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
s
t
v
w
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Typedefs
a
b
c
d
g
h
i
l
m
r
s
t
u
w
Enumerations
b
h
i
o
p
Enumerator
h
i
o
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
systemc
tests
systemc
datatypes
fx
bit
test_all.hh
Go to the documentation of this file.
1
// This may look like C code, but it is really -*- C++ -*-
2
//
3
// test_all.hh<2> --
4
// Copyright Synopsys 1998
5
// Author : Ric Hilderink
6
// Created On : Thu Jan 21 10:32:46 1999
7
// Status : none
8
//
9
10
#ifndef _test_all_hh_
11
#define _test_all_hh_
12
13
14
15
#define TEST_BIT_T(T_op) \
16
{ \
17
out << #T_op << " " << T_WL << " " << T_IWL << "\n"; \
18
sc_fxtype_context fooc(sc_fxtype_params(T_WL, T_IWL)); \
19
T_op a = 0; \
20
int i; \
21
for (i = 0; i < T_WL; ++i) \
22
{ \
23
if (a[i]) \
24
out << "|"; \
25
else \
26
out << "."; \
27
} \
28
out << "\t"; \
29
for (i = 0; i < T_WL; i += 3) \
30
a[i] = 1; \
31
for (i = 0; i < T_WL; ++i) \
32
{ \
33
if (a[i]) \
34
out << "|"; \
35
else \
36
out << "."; \
37
} \
38
out << "\n"; \
39
a = 0; \
40
a = ~a; \
41
for (i = 0; i < T_WL; ++i) \
42
{ \
43
if (a[i]) \
44
out << "|"; \
45
else \
46
out << "."; \
47
} \
48
out << "\t"; \
49
for (i = 0; i < T_WL; i += 3) \
50
a[i] = 0; \
51
for (i = 0; i < T_WL; ++i) \
52
{ \
53
if (a[i]) \
54
out << "|"; \
55
else \
56
out << "."; \
57
} \
58
out << "\n"; \
59
out << "a = " << a.to_string(SC_BIN) << "\n"; \
60
a = "0b01010"; \
61
out << "a = " << a.to_string(SC_BIN) << "\n"; \
62
}
15
#define TEST_BIT_T(T_op) \
…
63
64
65
#define TEST_BIT \
66
TEST_BIT_T(T_FX_FIX); \
67
TEST_BIT_T(T_FX_FIXED); \
68
TEST_BIT_T(T_FX_UFIX); \
69
TEST_BIT_T(T_FX_UFIXED);
65
#define TEST_BIT \
…
70
71
72
#define T_FX_UFIX sc_ufix
73
#define T_FX_FIX sc_fix
74
#define T_FX_FIXED sc_fixed<T_WL, T_IWL>
75
#define T_FX_UFIXED sc_ufixed<T_WL, T_IWL>
76
77
#define T_WL 4
78
#define T_IWL 4
79
80
#endif
Generated on Mon Jan 13 2025 04:28:44 for gem5 by
doxygen
1.9.8