OpenASIP  2.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TPEF::Binary Class Reference

#include <Binary.hh>

Collaboration diagram for TPEF::Binary:
Collaboration graph

Public Types

enum  FileType {
  FT_NULL = 0x00, FT_OBJSEQ = 0x04, FT_PURESEQ = 0x05, FT_LIBSEQ = 0x06,
  FT_MIXED = 0x09, FT_PARALLEL = 0x0D
}
 
enum  FileArchitecture { FA_NOARCH = 0x00, FA_TTA_MOVE = 0x01, FA_TTA_TUT = 0x02, FA_TDS_TI = 0x03 }
 

Public Member Functions

 Binary ()
 
virtual ~Binary ()
 
void addSection (Section *section)
 
Sectionsection (Word index) const
 
Sectionsection (Section::SectionType type, Word number) const
 
Word sectionCount () const
 
Word sectionCount (Section::SectionType type) const
 
StringSectionstrings () const
 
void setStrings (StringSection *strTable)
 
void setStrings (const ReferenceManager::SafePointer *strTable)
 
FileArchitecture arch () const
 
void setArch (FileArchitecture arch)
 
FileType type () const
 
void setType (FileType type)
 
void setTPEFVersion (TPEFHeaders::TPEFVersion version)
 
TPEFHeaders::TPEFVersion TPEFVersion () const
 

Private Member Functions

 Binary (const Binary &)
 
Binary operator= (const Binary &)
 

Private Attributes

const ReferenceManager::SafePointerstrings_
 Reference to string table of binary. More...
 
std::vector< Section * > sections_
 Stores sections of binary. More...
 
FileType fileType_
 Binary's file type. See enumerations for more info. More...
 
FileArchitecture fileArch_
 Binary's file architecture. See enumerations for more info. More...
 
TPEFHeaders::TPEFVersion tpefVersion_
 Indicates TPEF format version used. More...
 

Detailed Description

Root class of tpef binary representation.

Definition at line 49 of file Binary.hh.

Member Enumeration Documentation

◆ FileArchitecture

Encodings of program sections.

Enumerator
FA_NOARCH 

Illegal/undefined architecture.

FA_TTA_MOVE 

Move design framework.

FA_TTA_TUT 

New TTA template.

FA_TDS_TI 

TTA Design Studio architecture.

Definition at line 67 of file Binary.hh.

67  {
68  FA_NOARCH = 0x00, ///< Illegal/undefined architecture.
69  FA_TTA_MOVE = 0x01, ///< Move design framework.
70  FA_TTA_TUT = 0x02, ///< New TTA template.
71  FA_TDS_TI = 0x03 ///< TTA Design Studio architecture.
72  };

◆ FileType

Storing types of TTA code.

Enumerator
FT_NULL 

Illegal/undefined type.

FT_OBJSEQ 

Sequential TTA object code.

FT_PURESEQ 

Sequential TTA code, no unresolved symbols.

FT_LIBSEQ 

Collection of sequential object code files for linkage.

FT_MIXED 

Partly scheduled code.

FT_PARALLEL 

Fully scheduled or mixed code.

Definition at line 54 of file Binary.hh.

54  {
55  FT_NULL = 0x00, ///< Illegal/undefined type.
56  FT_OBJSEQ = 0x04, ///< Sequential TTA object code.
57  FT_PURESEQ = 0x05, ///< Sequential TTA code, no unresolved symbols.
58  FT_LIBSEQ = 0x06, ///< Collection of sequential object code files
59  ///< for linkage.
60  FT_MIXED = 0x09, ///< Partly scheduled code.
61  FT_PARALLEL = 0x0D ///< Fully scheduled or mixed code.
62  };

Constructor & Destructor Documentation

◆ Binary() [1/2]

TPEF::Binary::Binary ( )

Constructor.

Definition at line 53 of file Binary.cc.

◆ ~Binary()

TPEF::Binary::~Binary ( )
virtual

Destructor.

Definition at line 60 of file Binary.cc.

60  {
61  while (sections_.size() != 0) {
62  delete sections_[sections_.size() - 1];
63  sections_[sections_.size() - 1] = NULL;
64  sections_.pop_back();
65  }
67 }

References TPEF::ReferenceManager::SafePointer::cleanup(), and sections_.

Here is the call graph for this function:

◆ Binary() [2/2]

TPEF::Binary::Binary ( const Binary )
private

Member Function Documentation

◆ addSection()

void TPEF::Binary::addSection ( Section section)

◆ arch()

FileArchitecture TPEF::Binary::arch ( ) const

◆ operator=()

Binary TPEF::Binary::operator= ( const Binary )
private

◆ section() [1/2]

Section* TPEF::Binary::section ( Section::SectionType  type,
Word  number 
) const

◆ section() [2/2]

Section* TPEF::Binary::section ( Word  index) const

◆ sectionCount() [1/2]

Word TPEF::Binary::sectionCount ( ) const

◆ sectionCount() [2/2]

Word TPEF::Binary::sectionCount ( Section::SectionType  type) const

◆ setArch()

void TPEF::Binary::setArch ( FileArchitecture  arch)

◆ setStrings() [1/2]

void TPEF::Binary::setStrings ( const ReferenceManager::SafePointer strTable)

◆ setStrings() [2/2]

void TPEF::Binary::setStrings ( StringSection strTable)

◆ setTPEFVersion()

void TPEF::Binary::setTPEFVersion ( TPEFHeaders::TPEFVersion  version)

◆ setType()

void TPEF::Binary::setType ( FileType  type)

◆ strings()

StringSection* TPEF::Binary::strings ( ) const

◆ TPEFVersion()

TPEFHeaders::TPEFVersion TPEF::Binary::TPEFVersion ( ) const

◆ type()

FileType TPEF::Binary::type ( ) const

Member Data Documentation

◆ fileArch_

FileArchitecture TPEF::Binary::fileArch_
private

Binary's file architecture. See enumerations for more info.

Definition at line 111 of file Binary.hh.

◆ fileType_

FileType TPEF::Binary::fileType_
private

Binary's file type. See enumerations for more info.

Definition at line 109 of file Binary.hh.

◆ sections_

std::vector<Section*> TPEF::Binary::sections_
private

Stores sections of binary.

Definition at line 106 of file Binary.hh.

Referenced by ~Binary().

◆ strings_

const ReferenceManager::SafePointer* TPEF::Binary::strings_
private

Reference to string table of binary.

Definition at line 103 of file Binary.hh.

◆ tpefVersion_

TPEFHeaders::TPEFVersion TPEF::Binary::tpefVersion_
private

Indicates TPEF format version used.

Definition at line 114 of file Binary.hh.


The documentation for this class was generated from the following files:
TPEF::TPEFHeaders::TPEF_V2
@ TPEF_V2
Support for over 255 Buses, FUs, RFs.
Definition: TPEFHeaders.hh:58
TPEF::Binary::FT_PARALLEL
@ FT_PARALLEL
Fully scheduled or mixed code.
Definition: Binary.hh:61
TPEF::Binary::FA_TTA_TUT
@ FA_TTA_TUT
New TTA template.
Definition: Binary.hh:70
TPEF::ReferenceManager::SafePointer::null
static const SafePointer null
The default SafePointer that is used in null references.
Definition: SafePointer.hh:229
TPEF::ReferenceManager::SafePointer::cleanup
static void cleanup()
Definition: SafePointer.cc:667
TPEF::Binary::sections_
std::vector< Section * > sections_
Stores sections of binary.
Definition: Binary.hh:106
TPEF::Binary::tpefVersion_
TPEFHeaders::TPEFVersion tpefVersion_
Indicates TPEF format version used.
Definition: Binary.hh:114
TPEF::Binary::FA_NOARCH
@ FA_NOARCH
Illegal/undefined architecture.
Definition: Binary.hh:68
TPEF::Binary::FA_TTA_MOVE
@ FA_TTA_MOVE
Move design framework.
Definition: Binary.hh:69
TPEF::Binary::FT_LIBSEQ
@ FT_LIBSEQ
Collection of sequential object code files for linkage.
Definition: Binary.hh:58
TPEF::Binary::FT_PURESEQ
@ FT_PURESEQ
Sequential TTA code, no unresolved symbols.
Definition: Binary.hh:57
TPEF::Binary::FT_NULL
@ FT_NULL
Illegal/undefined type.
Definition: Binary.hh:55
TPEF::Binary::FT_MIXED
@ FT_MIXED
Partly scheduled code.
Definition: Binary.hh:60
TPEF::Binary::strings_
const ReferenceManager::SafePointer * strings_
Reference to string table of binary.
Definition: Binary.hh:103
TPEF::Binary::FA_TDS_TI
@ FA_TDS_TI
TTA Design Studio architecture.
Definition: Binary.hh:71
TPEF::Binary::FT_OBJSEQ
@ FT_OBJSEQ
Sequential TTA object code.
Definition: Binary.hh:56