OpenASIP 2.2
Loading...
Searching...
No Matches
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.
 
const Byte FH_ID_SIZE = 10
 Size of file identification code.
 
const HalfWord FH_HEADER_SIZE = 26
 Size of file header.
 
const HalfWord SH_HEADER_SIZE = 32
 Suze of section header.
 

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 };
@ FH_ARCH
Architecture template.
@ FH_SHSIZE
Size of section header entry.
@ FH_SHSTRTAB
Offset to header of string table.
@ FH_ID
File identification code.
@ FH_SHNUM
Number of section headers.
@ FH_SHOFF
Offset to first section header.
@ FH_TYPE
Type of TTA program.
@ FH_SIZE
File header size.

◆ 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 };
@ IANNOTE_SIZE
Size of payload of annotation.
@ IANNOTE_CONTINUATION
If there is more annotations.

◆ 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 };
@ IA_END
Is end of instruction.
@ IA_MGUARD
Is conditional move or unconditional move.
@ IA_TYPE
Instruction type: move (0), immediate (1).
@ IA_ANNOTE
Contains annotation.
@ IA_IMMSIZE
Immediade size mask.
@ IA_EMPTY
Empty instruction.

◆ 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 };
@ IE_GUARD_TYPE_MASK
If (1) guard points to GPR,(0) to FU.
@ IE_GUARD_INV_MASK
Guard inverted (1) means inverted.
@ MVG_RF
Guard is RF.
@ MVD_UNIT
Destination is FU.
@ MVD_NULL
Illegal destination.
@ MVS_IMM
Source is immediate.
@ MVD_RF
Destination is RF.
@ MVS_UNIT
Source is FU.
@ MVS_NULL
Illegal source.
@ MVG_UNIT
Guard is FU.
@ MVD_ILLEGAL
Illegal destination.
@ IE_DST_TYPE_MASK
Instruction destination type mask.
@ MVS_RF
Source is RF.
@ IE_SRC_TYPE_MASK
Instruction source type mask.

◆ 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 };
@ STF_RELOCATION_TYPE_MASK
Mask for getting reloc type.
@ STF_CHUNK
Relocation applied to chunk(1) or complete address(0).

◆ 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 };
@ SH_LINK
Section identifier link.
@ SH_FLAGS
Flags of section.
@ SH_ASPACE
Section address space identifier.
@ SH_OFFSET
Offset to section data.
@ SH_ID
Section identification code.
@ SH_INFO
Section specific information, usually zero.
@ SH_ADDR
Starting memory address of program section.
@ SH_SIZE
Size of section data.
@ SH_NAME
Section offset to name.
@ SH_TYPE
Type of section.
@ SH_ENTSIZE
Size of section elements (if fixed size).
@ SH_PADDING
Padding, must be zero.

◆ 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 };
@ STO_ABS
Section is absolute, not relocating.

◆ 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 };
@ TPEF_V1
Initial TPEF version.
@ TPEF_V2
Support for over 255 Buses, FUs, RFs.

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.

45 {
46 0x7f, 0x54, 0x54, 0x41, 0x2d, 0x50, 0x46, 0x00, 0x01, 0x0a
47 };

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().