OpenASIP  2.0
Enumerations | Variables
TPEF::TPEFHeaders Namespace Reference

Enumerations

enum  TPEFVersion { TPEF_V1 = 0x01, TPEF_V2 = 0x02 }
 
enum  FileHeaderOffset {
  FH_ID = 0, FH_ARCH = 10, FH_TYPE = 11, FH_SHOFF = 12,
  FH_SIZE = 16, FH_SHSIZE = 18, FH_SHNUM = 20, FH_SHSTRTAB = 22
}
 
enum  SectionHeaderOffset {
  SH_NAME = 0, SH_TYPE = 4, SH_FLAGS = 5, SH_ADDR = 6,
  SH_OFFSET = 10, SH_SIZE = 14, SH_ID = 18, SH_ASPACE = 20,
  SH_PADDING = 21, SH_LINK = 22, SH_INFO = 24, SH_ENTSIZE = 28
}
 
enum  SymbolOtherValues { STO_ABS = 0x80 }
 
enum  RelocTypeValues { STF_RELOCATION_TYPE_MASK = 0x0F, STF_CHUNK = 0x80 }
 
enum  InstructionAnnotationMasks { IANNOTE_CONTINUATION = 0x80, IANNOTE_SIZE = 0x7f }
 
enum  InstructionAttributeField {
  IA_TYPE = 0x01, IA_END = 0x02, IA_ANNOTE = 0x04, IA_EMPTY = 0x08,
  IA_IMMSIZE = 0xf0, IA_MGUARD = 0x10
}
 
enum  InstructionFieldType {
  IE_SRC_TYPE_MASK = 0x0c, IE_DST_TYPE_MASK = 0x30, IE_GUARD_TYPE_MASK = 0x80, MVS_NULL = 0x00,
  MVS_RF = 0x04, MVS_IMM = 0x08, MVS_UNIT = 0x0c, MVD_NULL = 0x00,
  MVD_RF = 0x10, MVD_ILLEGAL = 0x20, MVD_UNIT = 0x30, MVG_UNIT = 0x00,
  MVG_RF = 0x80, IE_GUARD_INV_MASK = 0x40
}
 

Variables

const Byte FH_ID_BYTES []
 File format identification mark (TPEF version 1). See TPEF documentation for more info. More...
 
const Byte FH_ID_SIZE = 10
 Size of file identification code. More...
 
const HalfWord FH_HEADER_SIZE = 26
 Size of file header. More...
 
const HalfWord SH_HEADER_SIZE = 32
 Suze of section header. More...
 

Enumeration Type Documentation

◆ FileHeaderOffset

Offsets of file header.

Enumerator
FH_ID 

File identification code.

FH_ARCH 

Architecture template.

FH_TYPE 

Type of TTA program.

FH_SHOFF 

Offset to first section header.

FH_SIZE 

File header size.

FH_SHSIZE 

Size of section header entry.

FH_SHNUM 

Number of section headers.

FH_SHSTRTAB 

Offset to header of string table.

Definition at line 64 of file TPEFHeaders.hh.

64  {
65  FH_ID = 0, ///< File identification code.
66  FH_ARCH = 10, ///< Architecture template.
67  FH_TYPE = 11, ///< Type of TTA program.
68  FH_SHOFF = 12, ///< Offset to first section header.
69  FH_SIZE = 16, ///< File header size.
70  FH_SHSIZE = 18, ///< Size of section header entry.
71  FH_SHNUM = 20, ///< Number of section headers.
72  FH_SHSTRTAB = 22 ///< Offset to header of string table.
73  };

◆ InstructionAnnotationMasks

InstructionAnnotation flags and masks.

Enumerator
IANNOTE_CONTINUATION 

If there is more annotations.

IANNOTE_SIZE 

Size of payload of annotation.

Definition at line 112 of file TPEFHeaders.hh.

112  {
113  IANNOTE_CONTINUATION = 0x80, ///< If there is more annotations.
114  IANNOTE_SIZE = 0x7f ///< Size of payload of annotation.
115  };

◆ InstructionAttributeField

Instruction attribute flags and masks.

Enumerator
IA_TYPE 

Instruction type: move (0), immediate (1).

IA_END 

Is end of instruction.

IA_ANNOTE 

Contains annotation.

IA_EMPTY 

Empty instruction.

IA_IMMSIZE 

Immediade size mask.

IA_MGUARD 

Is conditional move or unconditional move.

Definition at line 120 of file TPEFHeaders.hh.

120  {
121  IA_TYPE = 0x01, ///< Instruction type: move (0), immediate (1).
122  IA_END = 0x02, ///< Is end of instruction.
123  IA_ANNOTE = 0x04, ///< Contains annotation.
124  IA_EMPTY = 0x08, ///< Empty instruction.
125  IA_IMMSIZE = 0xf0, ///< Immediade size mask.
126  IA_MGUARD = 0x10 ///< Is conditional move or unconditional move.
127  };

◆ InstructionFieldType

Masks for getting source and destination fields from instruction.

Enumerator
IE_SRC_TYPE_MASK 

Instruction source type mask.

IE_DST_TYPE_MASK 

Instruction destination type mask.

IE_GUARD_TYPE_MASK 

If (1) guard points to GPR,(0) to FU.

MVS_NULL 

Illegal source.

MVS_RF 

Source is RF.

MVS_IMM 

Source is immediate.

MVS_UNIT 

Source is FU.

MVD_NULL 

Illegal destination.

MVD_RF 

Destination is RF.

MVD_ILLEGAL 

Illegal destination.

MVD_UNIT 

Destination is FU.

MVG_UNIT 

Guard is FU.

MVG_RF 

Guard is RF.

IE_GUARD_INV_MASK 

Guard inverted (1) means inverted.

Definition at line 132 of file TPEFHeaders.hh.

132  {
133  IE_SRC_TYPE_MASK = 0x0c, ///< Instruction source type mask.
134  IE_DST_TYPE_MASK = 0x30, ///< Instruction destination type mask.
135  IE_GUARD_TYPE_MASK = 0x80,///< If (1) guard points to GPR,(0) to FU.
136  MVS_NULL = 0x00, ///< Illegal source.
137  MVS_RF = 0x04, ///< Source is RF.
138  MVS_IMM = 0x08, ///< Source is immediate.
139  MVS_UNIT = 0x0c, ///< Source is FU.
140  MVD_NULL = 0x00, ///< Illegal destination.
141  MVD_RF = 0x10, ///< Destination is RF.
142  MVD_ILLEGAL = 0x20, ///< Illegal destination.
143  MVD_UNIT = 0x30, ///< Destination is FU.
144  MVG_UNIT = 0x00, ///< Guard is FU.
145  MVG_RF = 0x80, ///< Guard is RF.
146  IE_GUARD_INV_MASK = 0x40 ///< Guard inverted (1) means inverted.
147  };

◆ RelocTypeValues

Values for RelocationElement type field

Enumerator
STF_RELOCATION_TYPE_MASK 

Mask for getting reloc type.

STF_CHUNK 

Relocation applied to chunk(1) or complete address(0).

Definition at line 103 of file TPEFHeaders.hh.

103  {
104  STF_RELOCATION_TYPE_MASK = 0x0F, ///< Mask for getting reloc type.
105  STF_CHUNK = 0x80 ///< Relocation applied to chunk(1)
106  ///< or complete address(0).
107  };

◆ SectionHeaderOffset

Offsets of section header.

Enumerator
SH_NAME 

Section offset to name.

SH_TYPE 

Type of section.

SH_FLAGS 

Flags of section.

SH_ADDR 

Starting memory address of program section.

SH_OFFSET 

Offset to section data.

SH_SIZE 

Size of section data.

SH_ID 

Section identification code.

SH_ASPACE 

Section address space identifier.

SH_PADDING 

Padding, must be zero.

SH_LINK 

Section identifier link.

SH_INFO 

Section specific information, usually zero.

SH_ENTSIZE 

Size of section elements (if fixed size).

Definition at line 78 of file TPEFHeaders.hh.

78  {
79  SH_NAME = 0, ///< Section offset to name.
80  SH_TYPE = 4, ///< Type of section.
81  SH_FLAGS = 5, ///< Flags of section.
82  SH_ADDR = 6, ///< Starting memory address of program section.
83  SH_OFFSET = 10, ///< Offset to section data.
84  SH_SIZE = 14, ///< Size of section data.
85  SH_ID = 18, ///< Section identification code.
86  SH_ASPACE = 20, ///< Section address space identifier.
87  SH_PADDING = 21, ///< Padding, must be zero.
88  SH_LINK = 22, ///< Section identifier link.
89  SH_INFO = 24, ///< Section specific information, usually zero.
90  SH_ENTSIZE = 28 ///< Size of section elements (if fixed size).
91  };

◆ SymbolOtherValues

Values for SymbolElement other field.

Enumerator
STO_ABS 

Section is absolute, not relocating.

Definition at line 96 of file TPEFHeaders.hh.

96  {
97  STO_ABS = 0x80 ///< Section is absolute, not relocating.
98  };

◆ TPEFVersion

Enumerator
TPEF_V1 

Initial TPEF version.

TPEF_V2 

Support for over 255 Buses, FUs, RFs.

Definition at line 56 of file TPEFHeaders.hh.

56  {
57  TPEF_V1 = 0x01, ///< Initial TPEF version.
58  TPEF_V2 = 0x02 ///< Support for over 255 Buses, FUs, RFs.
59  };

Variable Documentation

◆ FH_HEADER_SIZE

const HalfWord TPEF::TPEFHeaders::FH_HEADER_SIZE = 26

Size of file header.

Definition at line 52 of file TPEFHeaders.hh.

Referenced by TPEF::TPEFWriter::actualWriteBinary().

◆ FH_ID_BYTES

const Byte TPEF::TPEFHeaders::FH_ID_BYTES[]
Initial value:
= {
0x7f, 0x54, 0x54, 0x41, 0x2d, 0x50, 0x46, 0x00, 0x01, 0x0a
}

File format identification mark (TPEF version 1). See TPEF documentation for more info.

Definition at line 45 of file TPEFHeaders.hh.

Referenced by TPEF::TPEFWriter::actualWriteBinary().

◆ FH_ID_SIZE

const Byte TPEF::TPEFHeaders::FH_ID_SIZE = 10

Size of file identification code.

Definition at line 50 of file TPEFHeaders.hh.

Referenced by TPEF::TPEFWriter::actualWriteBinary(), and TPEF::TPEFReader::readData().

◆ SH_HEADER_SIZE

const HalfWord TPEF::TPEFHeaders::SH_HEADER_SIZE = 32

Suze of section header.

Definition at line 54 of file TPEFHeaders.hh.

Referenced by TPEF::TPEFWriter::actualWriteBinary().

TPEF::TPEFHeaders::MVD_NULL
@ MVD_NULL
Illegal destination.
Definition: TPEFHeaders.hh:140
TPEF::TPEFHeaders::IA_ANNOTE
@ IA_ANNOTE
Contains annotation.
Definition: TPEFHeaders.hh:123
TPEF::TPEFHeaders::SH_LINK
@ SH_LINK
Section identifier link.
Definition: TPEFHeaders.hh:88
TPEF::TPEFHeaders::IA_MGUARD
@ IA_MGUARD
Is conditional move or unconditional move.
Definition: TPEFHeaders.hh:126
TPEF::TPEFHeaders::FH_TYPE
@ FH_TYPE
Type of TTA program.
Definition: TPEFHeaders.hh:67
TPEF::TPEFHeaders::IA_END
@ IA_END
Is end of instruction.
Definition: TPEFHeaders.hh:122
TPEF::TPEFHeaders::TPEF_V2
@ TPEF_V2
Support for over 255 Buses, FUs, RFs.
Definition: TPEFHeaders.hh:58
TPEF::TPEFHeaders::MVD_RF
@ MVD_RF
Destination is RF.
Definition: TPEFHeaders.hh:141
TPEF::TPEFHeaders::SH_TYPE
@ SH_TYPE
Type of section.
Definition: TPEFHeaders.hh:80
TPEF::TPEFHeaders::MVS_RF
@ MVS_RF
Source is RF.
Definition: TPEFHeaders.hh:137
TPEF::TPEFHeaders::SH_OFFSET
@ SH_OFFSET
Offset to section data.
Definition: TPEFHeaders.hh:83
TPEF::TPEFHeaders::IANNOTE_CONTINUATION
@ IANNOTE_CONTINUATION
If there is more annotations.
Definition: TPEFHeaders.hh:113
TPEF::TPEFHeaders::IA_TYPE
@ IA_TYPE
Instruction type: move (0), immediate (1).
Definition: TPEFHeaders.hh:121
TPEF::TPEFHeaders::STF_RELOCATION_TYPE_MASK
@ STF_RELOCATION_TYPE_MASK
Mask for getting reloc type.
Definition: TPEFHeaders.hh:104
TPEF::TPEFHeaders::SH_ASPACE
@ SH_ASPACE
Section address space identifier.
Definition: TPEFHeaders.hh:86
TPEF::TPEFHeaders::SH_INFO
@ SH_INFO
Section specific information, usually zero.
Definition: TPEFHeaders.hh:89
TPEF::TPEFHeaders::FH_SHSIZE
@ FH_SHSIZE
Size of section header entry.
Definition: TPEFHeaders.hh:70
TPEF::TPEFHeaders::FH_SHSTRTAB
@ FH_SHSTRTAB
Offset to header of string table.
Definition: TPEFHeaders.hh:72
TPEF::TPEFHeaders::SH_PADDING
@ SH_PADDING
Padding, must be zero.
Definition: TPEFHeaders.hh:87
TPEF::TPEFHeaders::MVS_UNIT
@ MVS_UNIT
Source is FU.
Definition: TPEFHeaders.hh:139
TPEF::TPEFHeaders::SH_ENTSIZE
@ SH_ENTSIZE
Size of section elements (if fixed size).
Definition: TPEFHeaders.hh:90
TPEF::TPEFHeaders::MVG_RF
@ MVG_RF
Guard is RF.
Definition: TPEFHeaders.hh:145
TPEF::TPEFHeaders::MVD_ILLEGAL
@ MVD_ILLEGAL
Illegal destination.
Definition: TPEFHeaders.hh:142
TPEF::TPEFHeaders::IANNOTE_SIZE
@ IANNOTE_SIZE
Size of payload of annotation.
Definition: TPEFHeaders.hh:114
TPEF::TPEFHeaders::FH_SHOFF
@ FH_SHOFF
Offset to first section header.
Definition: TPEFHeaders.hh:68
TPEF::TPEFHeaders::MVS_NULL
@ MVS_NULL
Illegal source.
Definition: TPEFHeaders.hh:136
TPEF::TPEFHeaders::SH_ID
@ SH_ID
Section identification code.
Definition: TPEFHeaders.hh:85
TPEF::TPEFHeaders::IA_EMPTY
@ IA_EMPTY
Empty instruction.
Definition: TPEFHeaders.hh:124
TPEF::TPEFHeaders::FH_SHNUM
@ FH_SHNUM
Number of section headers.
Definition: TPEFHeaders.hh:71
TPEF::TPEFHeaders::MVS_IMM
@ MVS_IMM
Source is immediate.
Definition: TPEFHeaders.hh:138
TPEF::TPEFHeaders::TPEF_V1
@ TPEF_V1
Initial TPEF version.
Definition: TPEFHeaders.hh:57
TPEF::TPEFHeaders::IE_GUARD_INV_MASK
@ IE_GUARD_INV_MASK
Guard inverted (1) means inverted.
Definition: TPEFHeaders.hh:146
TPEF::TPEFHeaders::STF_CHUNK
@ STF_CHUNK
Relocation applied to chunk(1) or complete address(0).
Definition: TPEFHeaders.hh:105
TPEF::TPEFHeaders::IE_GUARD_TYPE_MASK
@ IE_GUARD_TYPE_MASK
If (1) guard points to GPR,(0) to FU.
Definition: TPEFHeaders.hh:135
TPEF::TPEFHeaders::MVG_UNIT
@ MVG_UNIT
Guard is FU.
Definition: TPEFHeaders.hh:144
TPEF::TPEFHeaders::SH_SIZE
@ SH_SIZE
Size of section data.
Definition: TPEFHeaders.hh:84
TPEF::TPEFHeaders::IE_DST_TYPE_MASK
@ IE_DST_TYPE_MASK
Instruction destination type mask.
Definition: TPEFHeaders.hh:134
TPEF::TPEFHeaders::MVD_UNIT
@ MVD_UNIT
Destination is FU.
Definition: TPEFHeaders.hh:143
TPEF::TPEFHeaders::SH_ADDR
@ SH_ADDR
Starting memory address of program section.
Definition: TPEFHeaders.hh:82
TPEF::TPEFHeaders::SH_FLAGS
@ SH_FLAGS
Flags of section.
Definition: TPEFHeaders.hh:81
TPEF::TPEFHeaders::SH_NAME
@ SH_NAME
Section offset to name.
Definition: TPEFHeaders.hh:79
TPEF::TPEFHeaders::FH_SIZE
@ FH_SIZE
File header size.
Definition: TPEFHeaders.hh:69
TPEF::TPEFHeaders::FH_ID
@ FH_ID
File identification code.
Definition: TPEFHeaders.hh:65
TPEF::TPEFHeaders::FH_ARCH
@ FH_ARCH
Architecture template.
Definition: TPEFHeaders.hh:66
TPEF::TPEFHeaders::IA_IMMSIZE
@ IA_IMMSIZE
Immediade size mask.
Definition: TPEFHeaders.hh:125
TPEF::TPEFHeaders::IE_SRC_TYPE_MASK
@ IE_SRC_TYPE_MASK
Instruction source type mask.
Definition: TPEFHeaders.hh:133
TPEF::TPEFHeaders::STO_ABS
@ STO_ABS
Section is absolute, not relocating.
Definition: TPEFHeaders.hh:97