Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / sam / devices / common / regdef / include / Datatype.h
/*
* ========== Copyright Header Begin ==========================================
*
* OpenSPARC T2 Processor File: Datatype.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
*
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
*
* The above named program is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*
* ========== Copyright Header End ============================================
*/
#ifndef __Datatype_h
#define __Datatype_h
#include <limits.h>
/** @file Datatype.h
* Datatype.h defines useful primitive types and values.
*/
#ifndef __FixedSizeTypes
#define __FixedSizeTypes
typedef signed char int8;
typedef short int16;
typedef int int32;
typedef long long int64;
typedef unsigned char uchar, uint8;
typedef unsigned short ushort, uint16;
typedef unsigned int uint, uint32;
#ifdef _LP64
typedef unsigned long uint64;
#else /* _ILP32 */
#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)
typedef unsigned long long uint64;
#endif
#endif
#endif
typedef uint8 Byte;
typedef uint64 Addr;
typedef uint64 Data;
typedef uint64 Identifier;
typedef int64 Time; /* global simulation time (ticks of the root domain) */
typedef double Period; /* period of a domain in cycles of the root domain */
typedef double Freq; /* frequency in Hz of a particular domain */
static const Addr MIN_ADDR = (Addr) 0;
static const Addr MAX_ADDR = (Addr) ULLONG_MAX;
static const Time NOT_A_TIME = (Time) LLONG_MIN;
static const Time PAST_TIME = (Time) (LLONG_MIN +1);
static const Time INITIAL_TIME = (Time) -1;
static const Time FUTURE_TIME = (Time) LLONG_MAX;
#endif