112027Sjungma@eit.uni-kl.de/*****************************************************************************
212027Sjungma@eit.uni-kl.de
312027Sjungma@eit.uni-kl.de  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
412027Sjungma@eit.uni-kl.de  more contributor license agreements.  See the NOTICE file distributed
512027Sjungma@eit.uni-kl.de  with this work for additional information regarding copyright ownership.
612027Sjungma@eit.uni-kl.de  Accellera licenses this file to you under the Apache License, Version 2.0
712027Sjungma@eit.uni-kl.de  (the "License"); you may not use this file except in compliance with the
812027Sjungma@eit.uni-kl.de  License.  You may obtain a copy of the License at
912027Sjungma@eit.uni-kl.de
1012027Sjungma@eit.uni-kl.de    http://www.apache.org/licenses/LICENSE-2.0
1112027Sjungma@eit.uni-kl.de
1212027Sjungma@eit.uni-kl.de  Unless required by applicable law or agreed to in writing, software
1312027Sjungma@eit.uni-kl.de  distributed under the License is distributed on an "AS IS" BASIS,
1412027Sjungma@eit.uni-kl.de  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
1512027Sjungma@eit.uni-kl.de  implied.  See the License for the specific language governing
1612027Sjungma@eit.uni-kl.de  permissions and limitations under the License.
1712027Sjungma@eit.uni-kl.de
1812027Sjungma@eit.uni-kl.de *****************************************************************************/
1912027Sjungma@eit.uni-kl.de
2012027Sjungma@eit.uni-kl.de/*****************************************************************************
2112027Sjungma@eit.uni-kl.de
2212027Sjungma@eit.uni-kl.de  sc_lv.h -- Arbitrary size logic vector class.
2312027Sjungma@eit.uni-kl.de
2412027Sjungma@eit.uni-kl.de  Original Author: Gene Bushuyev, Synopsys, Inc.
2512027Sjungma@eit.uni-kl.de
2612027Sjungma@eit.uni-kl.de *****************************************************************************/
2712027Sjungma@eit.uni-kl.de
2812027Sjungma@eit.uni-kl.de/*****************************************************************************
2912027Sjungma@eit.uni-kl.de
3012027Sjungma@eit.uni-kl.de  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
3112027Sjungma@eit.uni-kl.de  changes you are making here.
3212027Sjungma@eit.uni-kl.de
3312027Sjungma@eit.uni-kl.de      Name, Affiliation, Date:
3412027Sjungma@eit.uni-kl.de  Description of Modification:
3512027Sjungma@eit.uni-kl.de
3612027Sjungma@eit.uni-kl.de *****************************************************************************/
3712027Sjungma@eit.uni-kl.de
3812027Sjungma@eit.uni-kl.de// $Log: sc_lv.h,v $
3912027Sjungma@eit.uni-kl.de// Revision 1.1.1.1  2006/12/15 20:20:04  acg
4012027Sjungma@eit.uni-kl.de// SystemC 2.3
4112027Sjungma@eit.uni-kl.de//
4212027Sjungma@eit.uni-kl.de// Revision 1.3  2006/01/13 18:53:53  acg
4312027Sjungma@eit.uni-kl.de// Andy Goodrich: added $Log command so that CVS comments are reproduced in
4412027Sjungma@eit.uni-kl.de// the source.
4512027Sjungma@eit.uni-kl.de//
4612027Sjungma@eit.uni-kl.de
4712027Sjungma@eit.uni-kl.de#ifndef SC_LV_H
4812027Sjungma@eit.uni-kl.de#define SC_LV_H
4912027Sjungma@eit.uni-kl.de
5012027Sjungma@eit.uni-kl.de
5112027Sjungma@eit.uni-kl.de#include "sysc/datatypes/bit/sc_lv_base.h"
5212027Sjungma@eit.uni-kl.de
5312027Sjungma@eit.uni-kl.de
5412027Sjungma@eit.uni-kl.denamespace sc_dt
5512027Sjungma@eit.uni-kl.de{
5612027Sjungma@eit.uni-kl.de
5712027Sjungma@eit.uni-kl.de// classes defined in this module
5812027Sjungma@eit.uni-kl.detemplate <int W> class sc_lv;
5912027Sjungma@eit.uni-kl.de
6012027Sjungma@eit.uni-kl.de
6112027Sjungma@eit.uni-kl.de// ----------------------------------------------------------------------------
6212027Sjungma@eit.uni-kl.de//  CLASS TEMPLATE : sc_lv<W>
6312027Sjungma@eit.uni-kl.de//
6412027Sjungma@eit.uni-kl.de//  Arbitrary size logic vector class.
6512027Sjungma@eit.uni-kl.de// ----------------------------------------------------------------------------
6612027Sjungma@eit.uni-kl.de
6712027Sjungma@eit.uni-kl.detemplate <int W>
6812027Sjungma@eit.uni-kl.declass sc_lv
6912027Sjungma@eit.uni-kl.de    : public sc_lv_base
7012027Sjungma@eit.uni-kl.de{
7112027Sjungma@eit.uni-kl.depublic:
7212027Sjungma@eit.uni-kl.de
7312027Sjungma@eit.uni-kl.de    // constructors
7412027Sjungma@eit.uni-kl.de
7512027Sjungma@eit.uni-kl.de    sc_lv()
7612027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
7712027Sjungma@eit.uni-kl.de	{}
7812027Sjungma@eit.uni-kl.de
7912027Sjungma@eit.uni-kl.de    explicit sc_lv( const sc_logic& init_value )
8012027Sjungma@eit.uni-kl.de	: sc_lv_base( init_value, W )
8112027Sjungma@eit.uni-kl.de	{}
8212027Sjungma@eit.uni-kl.de
8312027Sjungma@eit.uni-kl.de    explicit sc_lv( bool init_value )
8412027Sjungma@eit.uni-kl.de	: sc_lv_base( sc_logic( init_value ), W )
8512027Sjungma@eit.uni-kl.de	{}
8612027Sjungma@eit.uni-kl.de
8712027Sjungma@eit.uni-kl.de    explicit sc_lv( char init_value )
8812027Sjungma@eit.uni-kl.de	: sc_lv_base( sc_logic( init_value ), W )
8912027Sjungma@eit.uni-kl.de	{}
9012027Sjungma@eit.uni-kl.de
9112027Sjungma@eit.uni-kl.de    sc_lv( const char* a )
9212027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
9312027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
9412027Sjungma@eit.uni-kl.de
9512027Sjungma@eit.uni-kl.de    sc_lv( const bool* a )
9612027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
9712027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
9812027Sjungma@eit.uni-kl.de
9912027Sjungma@eit.uni-kl.de    sc_lv( const sc_logic* a )
10012027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
10112027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
10212027Sjungma@eit.uni-kl.de
10312027Sjungma@eit.uni-kl.de    sc_lv( const sc_unsigned& a )
10412027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
10512027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
10612027Sjungma@eit.uni-kl.de
10712027Sjungma@eit.uni-kl.de    sc_lv( const sc_signed& a )
10812027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
10912027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
11012027Sjungma@eit.uni-kl.de
11112027Sjungma@eit.uni-kl.de    sc_lv( const sc_uint_base& a )
11212027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
11312027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
11412027Sjungma@eit.uni-kl.de
11512027Sjungma@eit.uni-kl.de    sc_lv( const sc_int_base& a )
11612027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
11712027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
11812027Sjungma@eit.uni-kl.de
11912027Sjungma@eit.uni-kl.de    sc_lv( unsigned long a )
12012027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
12112027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
12212027Sjungma@eit.uni-kl.de
12312027Sjungma@eit.uni-kl.de    sc_lv( long a )
12412027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
12512027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
12612027Sjungma@eit.uni-kl.de
12712027Sjungma@eit.uni-kl.de    sc_lv( unsigned int a )
12812027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
12912027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
13012027Sjungma@eit.uni-kl.de
13112027Sjungma@eit.uni-kl.de    sc_lv( int a )
13212027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
13312027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
13412027Sjungma@eit.uni-kl.de
13512027Sjungma@eit.uni-kl.de    sc_lv( uint64 a )
13612027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
13712027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
13812027Sjungma@eit.uni-kl.de
13912027Sjungma@eit.uni-kl.de    sc_lv( int64 a )
14012027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
14112027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
14212027Sjungma@eit.uni-kl.de
14312027Sjungma@eit.uni-kl.de    template <class X>
14412027Sjungma@eit.uni-kl.de    sc_lv( const sc_proxy<X>& a )
14512027Sjungma@eit.uni-kl.de	: sc_lv_base( W )
14612027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); }
14712027Sjungma@eit.uni-kl.de
14812027Sjungma@eit.uni-kl.de    sc_lv( const sc_lv<W>& a )
14912027Sjungma@eit.uni-kl.de	: sc_lv_base( a )
15012027Sjungma@eit.uni-kl.de	{}
15112027Sjungma@eit.uni-kl.de
15212027Sjungma@eit.uni-kl.de
15312027Sjungma@eit.uni-kl.de    // assignment operators
15412027Sjungma@eit.uni-kl.de
15512027Sjungma@eit.uni-kl.de    template <class X>
15612027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( const sc_proxy<X>& a )
15712027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
15812027Sjungma@eit.uni-kl.de
15912027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( const sc_lv<W>& a )
16012027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
16112027Sjungma@eit.uni-kl.de
16212027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( const char* a )
16312027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
16412027Sjungma@eit.uni-kl.de
16512027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( const bool* a )
16612027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
16712027Sjungma@eit.uni-kl.de
16812027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( const sc_logic* a )
16912027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
17012027Sjungma@eit.uni-kl.de
17112027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( const sc_unsigned& a )
17212027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
17312027Sjungma@eit.uni-kl.de
17412027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( const sc_signed& a )
17512027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
17612027Sjungma@eit.uni-kl.de
17712027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( const sc_uint_base& a )
17812027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
17912027Sjungma@eit.uni-kl.de
18012027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( const sc_int_base& a )
18112027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
18212027Sjungma@eit.uni-kl.de
18312027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( unsigned long a )
18412027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
18512027Sjungma@eit.uni-kl.de
18612027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( long a )
18712027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
18812027Sjungma@eit.uni-kl.de
18912027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( unsigned int a )
19012027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
19112027Sjungma@eit.uni-kl.de
19212027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( int a )
19312027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
19412027Sjungma@eit.uni-kl.de
19512027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( uint64 a )
19612027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
19712027Sjungma@eit.uni-kl.de
19812027Sjungma@eit.uni-kl.de    sc_lv<W>& operator = ( int64 a )
19912027Sjungma@eit.uni-kl.de	{ sc_lv_base::operator = ( a ); return *this; }
20012027Sjungma@eit.uni-kl.de};
20112027Sjungma@eit.uni-kl.de
20212027Sjungma@eit.uni-kl.de} // namespace sc_dt
20312027Sjungma@eit.uni-kl.de
20412027Sjungma@eit.uni-kl.de
20512027Sjungma@eit.uni-kl.de#endif
206