gem5  v20.1.0.0
sc_fxtype_params.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_fxtype_params.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_fxtype_params.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:58 acg
44 // Andy Goodrich: added $Log command so that CVS comments are reproduced in
45 // the source.
46 //
47 
48 #include <sstream>
49 
51 
52 namespace sc_dt
53 {
54 
55 template class sc_global<sc_fxtype_params>;
56 template class sc_context<sc_fxtype_params>;
57 
58 // ----------------------------------------------------------------------------
59 // CLASS : sc_fxtype_params
60 //
61 // Fixed-point type parameters class.
62 // ----------------------------------------------------------------------------
63 
64 const std::string
66 {
67  std::stringstream ss;
68  print(ss);
69  return ss.str();
70 }
71 
72 void
73 sc_fxtype_params::print(::std::ostream &os) const
74 {
75  os << "("
76  << m_wl << ","
77  << m_iwl << ","
78  << m_q_mode << ","
79  << m_o_mode << ","
80  << m_n_bits
81  << ")";
82 }
83 
84 void
85 sc_fxtype_params::dump(::std::ostream &os) const
86 {
87  os << "sc_fxtype_params" << ::std::endl;
88  os << "(" << ::std::endl;
89  os << "wl = " << m_wl << ::std::endl;
90  os << "iwl = " << m_iwl << ::std::endl;
91  os << "q_mode = " << m_q_mode << ::std::endl;
92  os << "o_mode = " << m_o_mode << ::std::endl;
93  os << "n_bits = " << m_n_bits << ::std::endl;
94  os << ")" << ::std::endl;
95 }
96 
97 } // namespace sc_dt
sc_dt::sc_fxtype_params::m_wl
int m_wl
Definition: sc_fxtype_params.hh:141
X86ISA::os
Bitfield< 17 > os
Definition: misc.hh:803
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::print
void print(::std::ostream &=::std::cout) const
Definition: sc_fxtype_params.cc:104
sc_dt::sc_fxtype_params::m_q_mode
sc_q_mode m_q_mode
Definition: sc_fxtype_params.hh:143
ArmISA::ss
Bitfield< 21 > ss
Definition: miscregs_types.hh:56
sc_dt::sc_fxtype_params::to_string
const std::string to_string() const
Definition: sc_fxtype_params.cc:96
sc_fxtype_params.hh
sc_dt::sc_fxtype_params::m_iwl
int m_iwl
Definition: sc_fxtype_params.hh:142
sc_dt::sc_fxtype_params::m_o_mode
sc_o_mode m_o_mode
Definition: sc_fxtype_params.hh:144
sc_dt::sc_fxtype_params::m_n_bits
int m_n_bits
Definition: sc_fxtype_params.hh:145

Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17