SystemC
3.0.0
Accellera SystemC proof-of-concept library
sysc
datatypes
fx
scfx_pow10.h
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 SCFX_POW10_H
49
#define SCFX_POW10_H
50
51
52
#include "
sysc/datatypes/fx/scfx_rep.h
"
53
54
55
namespace
sc_dt
56
{
57
58
// classes defined in this module
59
class
scfx_pow10;
60
61
62
// ----------------------------------------------------------------------------
63
// CLASS : scfx_pow10
64
//
65
// Class to compute (and cache) powers of 10 in arbitrary precision.
66
// ----------------------------------------------------------------------------
67
68
const
int
SCFX_POW10_TABLE_SIZE
= 32;
69
70
71
class
SC_API
scfx_pow10
72
{
73
74
public
:
75
76
scfx_pow10
();
77
~scfx_pow10
();
78
79
scfx_rep
operator() (
int
);
80
81
private
:
82
83
scfx_rep
* pos(
int
);
84
scfx_rep
*
neg
(
int
);
85
86
scfx_rep
m_pos[
SCFX_POW10_TABLE_SIZE
];
87
scfx_rep
m_neg[
SCFX_POW10_TABLE_SIZE
];
88
};
89
90
}
// namespace sc_dt
91
92
93
#endif
94
95
// Taf!
scfx_rep.h
SC_API
#define SC_API
Definition:
sc_cmnhdr.h:148
sc_dt
Definition:
sc_signal_ifs.h:38
sc_dt::neg
void neg(sc_fxval &c, const sc_fxnum &a)
Definition:
sc_fxnum.h:2758
sc_dt::SCFX_POW10_TABLE_SIZE
const int SCFX_POW10_TABLE_SIZE
Definition:
scfx_pow10.h:68
sc_dt::scfx_pow10
Definition:
scfx_pow10.h:72
sc_dt::scfx_pow10::scfx_pow10
scfx_pow10()
sc_dt::scfx_pow10::~scfx_pow10
~scfx_pow10()
sc_dt::scfx_rep
Definition:
scfx_rep.h:145
Generated on Fri Aug 16 2024 16:36:33 for SystemC by
1.9.4