112853Sgabeblack@google.com/*****************************************************************************
212853Sgabeblack@google.com
312853Sgabeblack@google.com  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
412853Sgabeblack@google.com  more contributor license agreements.  See the NOTICE file distributed
512853Sgabeblack@google.com  with this work for additional information regarding copyright ownership.
612853Sgabeblack@google.com  Accellera licenses this file to you under the Apache License, Version 2.0
712853Sgabeblack@google.com  (the "License"); you may not use this file except in compliance with the
812853Sgabeblack@google.com  License.  You may obtain a copy of the License at
912853Sgabeblack@google.com
1012853Sgabeblack@google.com    http://www.apache.org/licenses/LICENSE-2.0
1112853Sgabeblack@google.com
1212853Sgabeblack@google.com  Unless required by applicable law or agreed to in writing, software
1312853Sgabeblack@google.com  distributed under the License is distributed on an "AS IS" BASIS,
1412853Sgabeblack@google.com  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
1512853Sgabeblack@google.com  implied.  See the License for the specific language governing
1612853Sgabeblack@google.com  permissions and limitations under the License.
1712853Sgabeblack@google.com
1812853Sgabeblack@google.com *****************************************************************************/
1912853Sgabeblack@google.com
2012853Sgabeblack@google.com/*****************************************************************************
2112853Sgabeblack@google.com
2212853Sgabeblack@google.com  scfx_pow10.h -
2312853Sgabeblack@google.com
2412853Sgabeblack@google.com  Original Author: Robert Graulich, Synopsys, Inc.
2512853Sgabeblack@google.com                   Martin Janssen,  Synopsys, Inc.
2612853Sgabeblack@google.com
2712853Sgabeblack@google.com *****************************************************************************/
2812853Sgabeblack@google.com
2912853Sgabeblack@google.com/*****************************************************************************
3012853Sgabeblack@google.com
3112853Sgabeblack@google.com  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
3212853Sgabeblack@google.com  changes you are making here.
3312853Sgabeblack@google.com
3412853Sgabeblack@google.com      Name, Affiliation, Date:
3512853Sgabeblack@google.com  Description of Modification:
3612853Sgabeblack@google.com
3712853Sgabeblack@google.com *****************************************************************************/
3812853Sgabeblack@google.com
3912853Sgabeblack@google.com// $Log: scfx_pow10.h,v $
4012853Sgabeblack@google.com// Revision 1.1.1.1  2006/12/15 20:20:04  acg
4112853Sgabeblack@google.com// SystemC 2.3
4212853Sgabeblack@google.com//
4312853Sgabeblack@google.com// Revision 1.3  2006/01/13 18:53:58  acg
4412853Sgabeblack@google.com// Andy Goodrich: added $Log command so that CVS comments are reproduced in
4512853Sgabeblack@google.com// the source.
4612853Sgabeblack@google.com//
4712853Sgabeblack@google.com
4812853Sgabeblack@google.com#ifndef __SYSTEMC_EXT_DT_FX_SCFX_POW10_HH__
4912853Sgabeblack@google.com#define __SYSTEMC_EXT_DT_FX_SCFX_POW10_HH__
5012853Sgabeblack@google.com
5112853Sgabeblack@google.com#include "scfx_rep.hh"
5212853Sgabeblack@google.com
5312853Sgabeblack@google.comnamespace sc_dt
5412853Sgabeblack@google.com{
5512853Sgabeblack@google.com
5612853Sgabeblack@google.com// classes defined in this module
5712853Sgabeblack@google.comclass scfx_pow10;
5812853Sgabeblack@google.com
5912853Sgabeblack@google.com
6012853Sgabeblack@google.com// ----------------------------------------------------------------------------
6112853Sgabeblack@google.com//  CLASS : scfx_pow10
6212853Sgabeblack@google.com//
6312853Sgabeblack@google.com//  Class to compute (and cache) powers of 10 in arbitrary precision.
6412853Sgabeblack@google.com// ----------------------------------------------------------------------------
6512853Sgabeblack@google.com
6612853Sgabeblack@google.comconst int SCFX_POW10_TABLE_SIZE = 32;
6712853Sgabeblack@google.com
6812853Sgabeblack@google.comclass scfx_pow10
6912853Sgabeblack@google.com{
7012853Sgabeblack@google.com  public:
7112853Sgabeblack@google.com    scfx_pow10();
7212853Sgabeblack@google.com    ~scfx_pow10();
7312853Sgabeblack@google.com
7412853Sgabeblack@google.com    const scfx_rep operator() (int);
7512853Sgabeblack@google.com
7612853Sgabeblack@google.com  private:
7712853Sgabeblack@google.com    scfx_rep *pos(int);
7812853Sgabeblack@google.com    scfx_rep *neg(int);
7912853Sgabeblack@google.com
8012853Sgabeblack@google.com    scfx_rep m_pos[SCFX_POW10_TABLE_SIZE];
8112853Sgabeblack@google.com    scfx_rep m_neg[SCFX_POW10_TABLE_SIZE];
8212853Sgabeblack@google.com};
8312853Sgabeblack@google.com
8412853Sgabeblack@google.com} // namespace sc_dt
8512853Sgabeblack@google.com
8612853Sgabeblack@google.com#endif // __SYSTEMC_EXT_DT_FX_SCFX_POW10_HH__
87