gem5  v22.0.0.2
scfx_pow10.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_pow10.h -
23 
24  Original Author: Robert Graulich, Synopsys, Inc.
25  Martin Janssen, Synopsys, Inc.
26 
27  *****************************************************************************/
28 
29 /*****************************************************************************
30 
31  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
32  changes you are making here.
33 
34  Name, Affiliation, Date:
35  Description of Modification:
36 
37  *****************************************************************************/
38 
39 // $Log: scfx_pow10.h,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 #ifndef __SYSTEMC_EXT_DT_FX_SCFX_POW10_HH__
49 #define __SYSTEMC_EXT_DT_FX_SCFX_POW10_HH__
50 
51 #include "scfx_rep.hh"
52 
53 namespace sc_dt
54 {
55 
56 // classes defined in this module
57 class scfx_pow10;
58 
59 
60 // ----------------------------------------------------------------------------
61 // CLASS : scfx_pow10
62 //
63 // Class to compute (and cache) powers of 10 in arbitrary precision.
64 // ----------------------------------------------------------------------------
65 
66 const int SCFX_POW10_TABLE_SIZE = 32;
67 
68 class scfx_pow10
69 {
70  public:
71  scfx_pow10();
72  ~scfx_pow10();
73 
74  const scfx_rep operator() (int);
75 
76  private:
77  scfx_rep *pos(int);
78  scfx_rep *neg(int);
79 
80  scfx_rep m_pos[SCFX_POW10_TABLE_SIZE];
81  scfx_rep m_neg[SCFX_POW10_TABLE_SIZE];
82 };
83 
84 } // namespace sc_dt
85 
86 #endif // __SYSTEMC_EXT_DT_FX_SCFX_POW10_HH__
sc_dt
Definition: sc_bit.cc:67
sc_dt::scfx_pow10::~scfx_pow10
~scfx_pow10()
Definition: scfx_pow10.cc:103
sc_dt::SCFX_POW10_TABLE_SIZE
const int SCFX_POW10_TABLE_SIZE
Definition: scfx_pow10.hh:98
sc_dt::scfx_pow10::operator()
const scfx_rep operator()(int)
Definition: scfx_pow10.cc:106
sc_dt::scfx_pow10::m_neg
scfx_rep m_neg[SCFX_POW10_TABLE_SIZE]
Definition: scfx_pow10.hh:113
sc_dt::scfx_pow10::pos
scfx_rep * pos(int)
Definition: scfx_pow10.cc:144
scfx_rep.hh
sc_dt::scfx_pow10::scfx_pow10
scfx_pow10()
Definition: scfx_pow10.cc:92
sc_dt::scfx_pow10::neg
scfx_rep * neg(int)
Definition: scfx_pow10.cc:153
sc_dt::scfx_pow10::m_pos
scfx_rep m_pos[SCFX_POW10_TABLE_SIZE]
Definition: scfx_pow10.hh:112

Generated on Thu Jul 28 2022 13:32:38 for gem5 by doxygen 1.8.17