SystemC
Recoding Infrastructure for SystemC v0.6.0 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
Main Page
Namespaces
Classes
Files
File List
File Members
sysc
datatypes
fx
scfx_pow10.h
Go to the documentation of this file.
1
/*****************************************************************************
2
3
The following code is derived, directly or indirectly, from the SystemC
4
source code Copyright (c) 1996-2014 by all Contributors.
5
All Rights reserved.
6
7
The contents of this file are subject to the restrictions and limitations
8
set forth in the SystemC Open Source License (the "License");
9
You may not use this file except in compliance with such restrictions and
10
limitations. You may obtain instructions on how to receive a copy of the
11
License at http://www.accellera.org/. Software distributed by Contributors
12
under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
13
ANY KIND, either express or implied. See the License for the specific
14
language governing rights and limitations under the License.
15
16
*****************************************************************************/
17
18
/*****************************************************************************
19
20
scfx_pow10.h -
21
22
Original Author: Robert Graulich, Synopsys, Inc.
23
Martin Janssen, Synopsys, Inc.
24
25
*****************************************************************************/
26
27
/*****************************************************************************
28
29
MODIFICATION LOG - modifiers, enter your name, affiliation, date and
30
changes you are making here.
31
32
Name, Affiliation, Date:
33
Description of Modification:
34
35
*****************************************************************************/
36
37
// $Log: scfx_pow10.h,v $
38
// Revision 1.1.1.1 2006/12/15 20:20:04 acg
39
// SystemC 2.3
40
//
41
// Revision 1.3 2006/01/13 18:53:58 acg
42
// Andy Goodrich: added $Log command so that CVS comments are reproduced in
43
// the source.
44
//
45
46
#ifndef SCFX_POW10_H
47
#define SCFX_POW10_H
48
49
50
#include "
sysc/datatypes/fx/scfx_rep.h
"
51
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
69
class
scfx_pow10
70
{
71
72
public
:
73
74
scfx_pow10
();
75
~scfx_pow10
();
76
77
const
scfx_rep
operator()
(
int
);
78
79
private
:
80
81
scfx_rep
* pos(
int
);
82
scfx_rep
* neg(
int
);
83
84
scfx_rep
m_pos[
SCFX_POW10_TABLE_SIZE
];
85
scfx_rep
m_neg[
SCFX_POW10_TABLE_SIZE
];
86
};
87
88
}
// namespace sc_dt
89
90
91
#endif
92
93
// Taf!
sc_dt::scfx_pow10::scfx_pow10
scfx_pow10()
sc_dt::scfx_pow10::~scfx_pow10
~scfx_pow10()
sc_dt::scfx_rep
Definition:
scfx_rep.h:172
sc_dt::scfx_pow10::operator()
const scfx_rep operator()(int)
scfx_rep.h
sc_dt::scfx_pow10
Definition:
scfx_pow10.h:69
sc_dt::SCFX_POW10_TABLE_SIZE
const int SCFX_POW10_TABLE_SIZE
Definition:
scfx_pow10.h:66
Generated on Mon Sep 30 2019 13:16:44 for SystemC by
1.8.5