OpenASIP  2.0
Macros | Typedefs | Variables
BaseType.hh File Reference
#include "tce_config_public.h"
Include dependency graph for BaseType.hh:

Go to the source code of this file.

Macros

#define SIZEOF_LONG   8
 
#define HOST_BIGENDIAN   0
 
#define WORDS_BIGENDIAN   0
 

Typedefs

typedef unsigned long LongWord
 
typedef long SignedLongWord
 
typedef unsigned long ULongWord
 
typedef long SLongWord
 
typedef unsigned char Byte
 
typedef Word UInt32
 
typedef Word UIntWord
 
typedef SignedWord SIntWord
 
typedef float FloatWord
 
typedef double DoubleWord
 
typedef UInt32 InstructionAddress
 
typedef UInt32 DataAddress
 
typedef UInt32 AddressImage
 Type for storing addresses to memory image. More...
 
typedef Word MinimumAddressableUnit
 Type for storing a MAU (must be unsigned type!). This limits the maximum size of the simulated minimum addressable unit in the target's data memory. More...
 
typedef long long CycleCount
 Type for storing simulation cycle counts. More...
 

Variables

const Byte BYTE_BITWIDTH = 8*sizeof(Byte)
 
const Byte HALFWORD_BITWIDTH = 8*sizeof(HalfWord)
 
const Byte WORD_BITWIDTH = 8*sizeof(Word)
 
const Byte LONGWORD_BITWIDTH = 8*sizeof(LongWord)
 
const Byte INT_WORD_SIZE = 8 * sizeof(UIntWord)
 
const Byte FLT_WORD_SIZE = 8 * sizeof(FloatWord)
 
const Byte DBL_WORD_SIZE = 8 * sizeof(DoubleWord)
 

Detailed Description

Author
Pekka Jääskeläinen (pjaaskel-no.spam-cs.tut.fi) 2003
Note
This file is used in compiled simulation. Keep dependencies clean

This file contains definitions of base data types such as Word, HalfWord, Byte. These types have fixed, machine-independent bit width. If no base type of the host machine that matches the required bit width is found, compilation fails. In this case, it is necessary to add new cases to the type definitions for the host machine at hand.

If the host machine does not support IEC 559 (formerly, IEEE-754) floating point types as native built-in types, then the floating point type definitions should be replaced by abstract data types with all the operators applicable to floating-point types appropriately overloaded.

Definition in file BaseType.hh.

Macro Definition Documentation

◆ HOST_BIGENDIAN

#define HOST_BIGENDIAN   0

HOST_WORDS_BIGENDIAN is 1 when the host machine lays out the most significant byte of the word at the lowest memory address.

Definition at line 123 of file BaseType.hh.

◆ SIZEOF_LONG

#define SIZEOF_LONG   8

Definition at line 46 of file BaseType.hh.

◆ WORDS_BIGENDIAN

#define WORDS_BIGENDIAN   0

Definition at line 124 of file BaseType.hh.

Typedef Documentation

◆ AddressImage

Type for storing addresses to memory image.

Definition at line 179 of file BaseType.hh.

◆ Byte

typedef unsigned char Byte

Machine-independent definition of byte type.

Definition at line 116 of file BaseType.hh.

◆ CycleCount

typedef long long CycleCount

Type for storing simulation cycle counts.

Definition at line 187 of file BaseType.hh.

◆ DataAddress

Definition at line 176 of file BaseType.hh.

◆ DoubleWord

typedef double DoubleWord

A double-precision, IEC 559 floating-point number used in simulation.

Definition at line 166 of file BaseType.hh.

◆ FloatWord

typedef float FloatWord

A single-precision, IEC 559 floating-point number used in simulation.

Definition at line 160 of file BaseType.hh.

◆ InstructionAddress

Definition at line 175 of file BaseType.hh.

◆ LongWord

typedef unsigned long LongWord

Definition at line 49 of file BaseType.hh.

◆ MinimumAddressableUnit

typedef Word MinimumAddressableUnit

Type for storing a MAU (must be unsigned type!). This limits the maximum size of the simulated minimum addressable unit in the target's data memory.

Definition at line 184 of file BaseType.hh.

◆ SignedLongWord

typedef long SignedLongWord

Definition at line 50 of file BaseType.hh.

◆ SIntWord

typedef SignedWord SIntWord

Maximum sized signed integer used in simulation in 32-bit mode.

Definition at line 149 of file BaseType.hh.

◆ SLongWord

typedef long SLongWord

Definition at line 52 of file BaseType.hh.

◆ UInt32

typedef Word UInt32

32bit unsigned integer (alias for Word).

Definition at line 134 of file BaseType.hh.

◆ UIntWord

typedef Word UIntWord

Maximum sized unsigned integer used in simulation in 32-bit mode.

Definition at line 144 of file BaseType.hh.

◆ ULongWord

typedef unsigned long ULongWord

Definition at line 51 of file BaseType.hh.

Variable Documentation

◆ BYTE_BITWIDTH

const Byte BYTE_BITWIDTH = 8*sizeof(Byte)

◆ DBL_WORD_SIZE

const Byte DBL_WORD_SIZE = 8 * sizeof(DoubleWord)

Definition at line 169 of file BaseType.hh.

◆ FLT_WORD_SIZE

const Byte FLT_WORD_SIZE = 8 * sizeof(FloatWord)

Definition at line 168 of file BaseType.hh.

◆ HALFWORD_BITWIDTH

const Byte HALFWORD_BITWIDTH = 8*sizeof(HalfWord)

Definition at line 137 of file BaseType.hh.

Referenced by TPEF::SectionIndexReplacer::writeReplacement().

◆ INT_WORD_SIZE

const Byte INT_WORD_SIZE = 8 * sizeof(UIntWord)

Maximum size of integer in simulator.

Definition at line 154 of file BaseType.hh.

Referenced by ITemplateBroker::assignImmediate(), POMValidator::checkLongImmediates(), and ITemplateBroker::findITemplates().

◆ LONGWORD_BITWIDTH

const Byte LONGWORD_BITWIDTH = 8*sizeof(LongWord)

Definition at line 139 of file BaseType.hh.

◆ WORD_BITWIDTH

const Byte WORD_BITWIDTH = 8*sizeof(Word)