gem5
v20.1.0.0
systemc
dt
fx
sc_fxdefs.cc
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_fxdefs.cpp -
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
39
// $Log: sc_fxdefs.cpp,v $
40
// Revision 1.1.1.1 2006/12/15 20:20:04 acg
41
// SystemC 2.3
42
//
43
// Revision 1.3 2006/01/13 18:53:57 acg
44
// Andy Goodrich: added $Log command so that CVS comments are reproduced in
45
// the source.
46
//
47
48
#include "
systemc/ext/dt/fx/sc_fxdefs.hh
"
49
50
namespace
sc_dt
51
{
52
53
// ----------------------------------------------------------------------------
54
// ENUM : sc_enc
55
//
56
// Enumeration of sign encodings.
57
// ----------------------------------------------------------------------------
58
59
const
std::string
60
to_string
(
sc_enc
enc)
61
{
62
switch
(enc) {
63
case
SC_TC_
:
64
return
std::string(
"SC_TC_"
);
65
case
SC_US_
:
66
return
std::string(
"SC_US_"
);
67
default
:
68
return
std::string(
"unknown"
);
69
}
70
}
71
72
// ----------------------------------------------------------------------------
73
// ENUM : sc_q_mode
74
//
75
// Enumeration of quantization modes.
76
// ----------------------------------------------------------------------------
77
78
const
std::string
79
to_string
(
sc_q_mode
q_mode)
80
{
81
switch
(q_mode) {
82
case
SC_RND
:
83
return
std::string(
"SC_RND"
);
84
case
SC_RND_ZERO
:
85
return
std::string(
"SC_RND_ZERO"
);
86
case
SC_RND_MIN_INF
:
87
return
std::string(
"SC_RND_MIN_INF"
);
88
case
SC_RND_INF
:
89
return
std::string(
"SC_RND_INF"
);
90
case
SC_RND_CONV
:
91
return
std::string(
"SC_RND_CONV"
);
92
case
SC_TRN
:
93
return
std::string(
"SC_TRN"
);
94
case
SC_TRN_ZERO
:
95
return
std::string(
"SC_TRN_ZERO"
);
96
default
:
97
return
std::string(
"unknown"
);
98
}
99
}
100
101
// ----------------------------------------------------------------------------
102
// ENUM : sc_o_mode
103
//
104
// Enumeration of overflow modes.
105
// ----------------------------------------------------------------------------
106
107
const
std::string
108
to_string
(
sc_o_mode
o_mode)
109
{
110
switch
(o_mode) {
111
case
SC_SAT
:
112
return
std::string(
"SC_SAT"
);
113
case
SC_SAT_ZERO
:
114
return
std::string(
"SC_SAT_ZERO"
);
115
case
SC_SAT_SYM
:
116
return
std::string(
"SC_SAT_SYM"
);
117
case
SC_WRAP
:
118
return
std::string(
"SC_WRAP"
);
119
case
SC_WRAP_SM
:
120
return
std::string(
"SC_WRAP_SM"
);
121
default
:
122
return
std::string(
"unknown"
);
123
}
124
}
125
126
127
// ----------------------------------------------------------------------------
128
// ENUM : sc_switch
129
//
130
// Enumeration of switch states.
131
// ----------------------------------------------------------------------------
132
133
const
std::string
134
to_string
(
sc_switch
sw
)
135
{
136
switch
(
sw
) {
137
case
SC_OFF
:
138
return
std::string(
"SC_OFF"
);
139
case
SC_ON
:
140
return
std::string(
"SC_ON"
);
141
default
:
142
return
std::string(
"unknown"
);
143
}
144
}
145
146
147
// ----------------------------------------------------------------------------
148
// ENUM : sc_fmt
149
//
150
// Enumeration of formats for character string conversion.
151
// ----------------------------------------------------------------------------
152
153
const
std::string
154
to_string
(
sc_fmt
fmt)
155
{
156
switch
(fmt) {
157
case
SC_F
:
158
return
std::string(
"SC_F"
);
159
case
SC_E
:
160
return
std::string(
"SC_E"
);
161
default
:
162
return
std::string(
"unknown"
);
163
}
164
}
165
166
}
// namespace sc_dt
sc_dt::SC_F
@ SC_F
Definition:
sc_fxdefs.hh:166
ArmISA::sw
Bitfield< 10 > sw
Definition:
miscregs_types.hh:371
sc_dt
Definition:
sc_bit.cc:67
sc_dt::sc_o_mode
sc_o_mode
Definition:
sc_fxdefs.hh:117
sc_dt::to_string
const std::string to_string(sc_enc enc)
Definition:
sc_fxdefs.cc:91
sc_dt::SC_OFF
@ SC_OFF
Definition:
sc_fxdefs.hh:145
sc_dt::SC_SAT_ZERO
@ SC_SAT_ZERO
Definition:
sc_fxdefs.hh:120
sc_dt::SC_RND_INF
@ SC_RND_INF
Definition:
sc_fxdefs.hh:96
sc_dt::sc_enc
sc_enc
Definition:
sc_fxdefs.hh:70
sc_dt::SC_ON
@ SC_ON
Definition:
sc_fxdefs.hh:146
sc_fxdefs.hh
sc_dt::SC_RND_CONV
@ SC_RND_CONV
Definition:
sc_fxdefs.hh:97
sc_dt::SC_E
@ SC_E
Definition:
sc_fxdefs.hh:167
sc_dt::sc_fmt
sc_fmt
Definition:
sc_fxdefs.hh:164
sc_dt::sc_q_mode
sc_q_mode
Definition:
sc_fxdefs.hh:91
sc_dt::SC_SAT
@ SC_SAT
Definition:
sc_fxdefs.hh:119
sc_dt::SC_RND_ZERO
@ SC_RND_ZERO
Definition:
sc_fxdefs.hh:94
sc_dt::SC_TRN
@ SC_TRN
Definition:
sc_fxdefs.hh:98
sc_dt::SC_WRAP
@ SC_WRAP
Definition:
sc_fxdefs.hh:122
sc_dt::SC_SAT_SYM
@ SC_SAT_SYM
Definition:
sc_fxdefs.hh:121
sc_dt::SC_RND_MIN_INF
@ SC_RND_MIN_INF
Definition:
sc_fxdefs.hh:95
sc_dt::SC_TC_
@ SC_TC_
Definition:
sc_fxdefs.hh:72
sc_dt::sc_switch
sc_switch
Definition:
sc_fxdefs.hh:143
sc_dt::SC_WRAP_SM
@ SC_WRAP_SM
Definition:
sc_fxdefs.hh:123
sc_dt::SC_RND
@ SC_RND
Definition:
sc_fxdefs.hh:93
sc_dt::SC_US_
@ SC_US_
Definition:
sc_fxdefs.hh:73
sc_dt::SC_TRN_ZERO
@ SC_TRN_ZERO
Definition:
sc_fxdefs.hh:99
Generated on Wed Sep 30 2020 14:02:14 for gem5 by
doxygen
1.8.17