gem5
v20.1.0.0
systemc
ext
dt
fx
scfx_params.hh
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
scfx_params.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: scfx_params.h,v $
39
// Revision 1.1.1.1 2006/12/15 20:20:04 acg
40
// SystemC 2.3
41
//
42
// Revision 1.3 2006/01/13 18:53:58 acg
43
// Andy Goodrich: added $Log command so that CVS comments are reproduced in
44
// the source.
45
//
46
47
#ifndef __SYSTEMC_EXT_DT_FX_SCFX_PARAMS_HH__
48
#define __SYSTEMC_EXT_DT_FX_SCFX_PARAMS_HH__
49
50
#include "
messages.hh
"
51
#include "
sc_fxcast_switch.hh
"
52
#include "
sc_fxtype_params.hh
"
53
54
namespace
sc_dt
55
{
56
57
// classes defined in this module
58
class
scfx_params;
59
60
61
// ----------------------------------------------------------------------------
62
// CLASS : scfx_params
63
//
64
// ...
65
// ----------------------------------------------------------------------------
66
67
class
scfx_params
68
{
69
public
:
70
// constructor
71
scfx_params
(
const
sc_fxtype_params &,
sc_enc
,
const
sc_fxcast_switch &);
72
73
// query functions
74
const
sc_fxtype_params &
type_params
()
const
;
75
sc_enc
enc
()
const
;
76
const
sc_fxcast_switch &
cast_switch
()
const
;
77
78
// shortcuts
79
int
wl
()
const
;
80
int
iwl
()
const
;
81
int
fwl
()
const
;
82
sc_q_mode
q_mode
()
const
;
83
sc_o_mode
o_mode
()
const
;
84
int
n_bits
()
const
;
85
86
// dump content
87
void
dump
(::std::ostream &)
const
;
88
89
private
:
90
sc_fxtype_params
m_type_params
;
91
sc_enc
m_enc
;
92
sc_fxcast_switch
m_cast_switch
;
93
};
94
95
96
// IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
97
98
// constructor
99
inline
scfx_params::scfx_params
(
const
sc_fxtype_params
&type_params_,
100
sc_enc
enc_,
101
const
sc_fxcast_switch
&cast_sw) :
102
m_type_params(type_params_), m_enc(enc_), m_cast_switch(cast_sw)
103
{
104
if
(
m_enc
==
SC_US_
&&
m_type_params
.
o_mode
() ==
SC_WRAP_SM
) {
105
SC_REPORT_ERROR
(
sc_core::SC_ID_INVALID_O_MODE_
,
106
sc_core::SC_ID_WRAP_SM_NOT_DEFINED_
);
107
// may continue, if suppressed
108
}
109
}
110
111
// query functions
112
inline
const
sc_fxtype_params
&
113
scfx_params::type_params
()
const
114
{
115
return
m_type_params
;
116
}
117
118
inline
sc_enc
119
scfx_params::enc
()
const
120
{
121
return
m_enc
;
122
}
123
124
inline
const
sc_fxcast_switch
&
125
scfx_params::cast_switch
()
const
126
{
127
return
m_cast_switch
;
128
}
129
130
// shortcuts
131
inline
int
132
scfx_params::wl
()
const
133
{
134
return
m_type_params
.
wl
();
135
}
136
137
inline
int
138
scfx_params::iwl
()
const
139
{
140
return
m_type_params
.
iwl
();
141
}
142
143
inline
int
144
scfx_params::fwl
()
const
145
{
146
return
(
m_type_params
.
wl
() -
m_type_params
.
iwl
());
147
}
148
149
inline
sc_q_mode
150
scfx_params::q_mode
()
const
151
{
152
return
m_type_params
.
q_mode
();
153
}
154
155
inline
sc_o_mode
156
scfx_params::o_mode
()
const
157
{
158
return
m_type_params
.
o_mode
();
159
}
160
161
inline
int
162
scfx_params::n_bits
()
const
163
{
164
return
m_type_params
.
n_bits
();
165
}
166
167
// dump content
168
inline
void
169
scfx_params::dump
(::std::ostream &
os
)
const
170
{
171
os
<<
"scfx_params"
<< ::std::endl;
172
os
<<
"("
<< ::std::endl;
173
os
<<
"type_params = "
;
174
m_type_params
.
dump
(
os
);
175
os
<<
"enc = "
<<
m_enc
<< ::std::endl;
176
os
<<
"cast_switch = "
;
177
m_cast_switch
.
dump
(
os
);
178
os
<<
")"
<< ::std::endl;
179
}
180
181
}
// namespace sc_dt
182
183
#endif // __SYSTEMC_EXT_DT_FX_SCFX_PARAMS_HH__
sc_dt::scfx_params::m_cast_switch
sc_fxcast_switch m_cast_switch
Definition:
scfx_params.hh:123
sc_dt::scfx_params::q_mode
sc_q_mode q_mode() const
Definition:
scfx_params.hh:181
X86ISA::os
Bitfield< 17 > os
Definition:
misc.hh:803
sc_dt::scfx_params::scfx_params
scfx_params(const sc_fxtype_params &, sc_enc, const sc_fxcast_switch &)
Definition:
scfx_params.hh:130
sc_dt
Definition:
sc_bit.cc:67
sc_dt::sc_fxtype_params::dump
void dump(::std::ostream &=::std::cout) const
Definition:
sc_fxtype_params.cc:116
sc_dt::sc_fxtype_params::wl
int wl() const
Definition:
sc_fxtype_params.hh:230
sc_dt::scfx_params::o_mode
sc_o_mode o_mode() const
Definition:
scfx_params.hh:187
sc_dt::sc_o_mode
sc_o_mode
Definition:
sc_fxdefs.hh:117
sc_dt::scfx_params::wl
int wl() const
Definition:
scfx_params.hh:163
sc_dt::sc_enc
sc_enc
Definition:
sc_fxdefs.hh:70
sc_dt::scfx_params::enc
sc_enc enc() const
Definition:
scfx_params.hh:150
sc_dt::sc_fxtype_params
Definition:
sc_fxtype_params.hh:101
sc_dt::scfx_params::n_bits
int n_bits() const
Definition:
scfx_params.hh:193
SC_REPORT_ERROR
#define SC_REPORT_ERROR(msg_type, msg)
Definition:
sc_report_handler.hh:127
sc_dt::scfx_params::m_type_params
sc_fxtype_params m_type_params
Definition:
scfx_params.hh:121
sc_dt::sc_q_mode
sc_q_mode
Definition:
sc_fxdefs.hh:91
sc_dt::scfx_params::fwl
int fwl() const
Definition:
scfx_params.hh:175
sc_fxcast_switch.hh
sc_dt::sc_fxtype_params::q_mode
sc_q_mode q_mode() const
Definition:
sc_fxtype_params.hh:242
sc_dt::sc_fxcast_switch
Definition:
sc_fxcast_switch.hh:102
sc_dt::scfx_params::type_params
const sc_fxtype_params & type_params() const
Definition:
scfx_params.hh:144
messages.hh
sc_dt::sc_fxtype_params::o_mode
sc_o_mode o_mode() const
Definition:
sc_fxtype_params.hh:245
sc_dt::scfx_params::m_enc
sc_enc m_enc
Definition:
scfx_params.hh:122
sc_dt::sc_fxcast_switch::dump
void dump(::std::ostream &=::std::cout) const
Definition:
sc_fxcast_switch.cc:112
sc_fxtype_params.hh
sc_dt::sc_fxtype_params::iwl
int iwl() const
Definition:
sc_fxtype_params.hh:238
sc_dt::sc_fxtype_params::n_bits
int n_bits() const
Definition:
sc_fxtype_params.hh:248
sc_dt::scfx_params::dump
void dump(::std::ostream &) const
Definition:
scfx_params.hh:200
sc_dt::scfx_params::iwl
int iwl() const
Definition:
scfx_params.hh:169
sc_core::SC_ID_WRAP_SM_NOT_DEFINED_
const char SC_ID_WRAP_SM_NOT_DEFINED_[]
Definition:
messages.cc:45
sc_dt::SC_WRAP_SM
@ SC_WRAP_SM
Definition:
sc_fxdefs.hh:123
sc_dt::scfx_params::cast_switch
const sc_fxcast_switch & cast_switch() const
Definition:
scfx_params.hh:156
sc_core::SC_ID_INVALID_O_MODE_
const char SC_ID_INVALID_O_MODE_[]
Definition:
messages.cc:41
sc_dt::SC_US_
@ SC_US_
Definition:
sc_fxdefs.hh:73
Generated on Wed Sep 30 2020 14:02:15 for gem5 by
doxygen
1.8.17