OpenASIP 2.2
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
BinaryEncoding Class Reference

#include <BinaryEncoding.hh>

Inheritance diagram for BinaryEncoding:
Inheritance graph
Collaboration diagram for BinaryEncoding:
Collaboration graph

Public Types

enum  Position { LEFT , RIGHT }
 

Public Member Functions

 BinaryEncoding ()
 
 BinaryEncoding (const ObjectState *state)
 
virtual ~BinaryEncoding ()
 
int moveSlotCount () const
 
MoveSlotmoveSlot (int index) const
 
bool hasMoveSlot (const std::string &name) const
 
MoveSlotmoveSlot (const std::string &name) const
 
void addMoveSlot (MoveSlot &slot)
 
void removeMoveSlot (MoveSlot &slot)
 
int immediateSlotCount () const
 
ImmediateSlotFieldimmediateSlot (int index) const
 
bool hasImmediateSlot (const std::string &name) const
 
ImmediateSlotFieldimmediateSlot (const std::string &name) const
 
void addImmediateSlot (ImmediateSlotField &slot)
 
void removeImmediateSlot (ImmediateSlotField &slot)
 
bool hasImmediateControlField () const
 
ImmediateControlFieldimmediateControlField () const
 
void setImmediateControlField (ImmediateControlField &field)
 
void unsetImmediateControlField ()
 
int longImmDstRegisterFieldCount () const
 
LImmDstRegisterFieldlongImmDstRegisterField (int index) const
 
LImmDstRegisterFieldlongImmDstRegisterField (const std::string &iTemp, const std::string &dstUnit) const
 
void addLongImmDstRegisterField (LImmDstRegisterField &field)
 
void removeLongImmDstRegisterField (LImmDstRegisterField &field)
 
int instructionFormatCount () const
 
bool hasInstructionFormat (const std::string &name) const
 
InstructionFormatinstructionFormat (int index) const
 
InstructionFormatinstructionFormat (const std::string &name) const
 
void addInstructionFormat (InstructionFormat &format)
 
void removeInstructionFormat (InstructionFormat &format)
 
int socketCodeTableCount () const
 
SocketCodeTablesocketCodeTable (int index) const
 
SocketCodeTablesocketCodeTable (const std::string &name) const
 
void addSocketCodeTable (SocketCodeTable &table)
 
void removeSocketCodeTable (SocketCodeTable &table)
 
int longestTemplateExtraBits () const
 
virtual int childFieldCount () const
 
virtual InstructionFieldchildField (int position) const
 
virtual int width (const TCEString &templateName) const
 
virtual int width () const
 
void setTemplateExtraBits (const TCEString &templateName, int bitCount)
 
int templateExtraBits (const TCEString &templateName) const
 
virtual void loadState (const ObjectState *state)
 
virtual ObjectStatesaveState () const
 
- Public Member Functions inherited from InstructionField
virtual ~InstructionField ()
 
InstructionFieldparent () const
 
int bitPosition () const
 
int relativePosition () const
 
virtual void setRelativePosition (int position)
 
void setExtraBits (int bits)
 
int extraBits () const
 
- Public Member Functions inherited from Serializable
virtual ~Serializable ()
 

Static Public Attributes

static const std::string OSNAME_BEM = "bem"
 ObjectState name for binary encoding.
 
static const std::string OSNAME_FU_OPCODE
 
static const std::string OSNAME_TEMPLATE_EXTRA_BITS
 
static const std::string OSNAME_TEMPLATE_EXTRA_BIT_COUNT
 
static const std::string OSNAME_TEMPLATE_NAME = "template"
 
- Static Public Attributes inherited from InstructionField
static const std::string OSNAME_INSTRUCTION_FIELD = "instr_field"
 ObjectState name for instruction field.
 
static const std::string OSKEY_EXTRA_BITS = "extra_bits"
 ObjectState attribute key for the number of extra bits.
 
static const std::string OSKEY_POSITION = "position"
 ObjectState attribute key for the relative position of the field.
 

Private Types

typedef std::vector< MoveSlot * > MoveSlotContainer
 Container type for MoveSlots.
 
typedef std::vector< ImmediateSlotField * > ImmediateSlotContainer
 Container type for ImmediateSlotFields.
 
typedef std::vector< SocketCodeTable * > SocketCodeTableContainer
 Container type for SocketCodeTables.
 
typedef std::vector< LImmDstRegisterField * > LImmDstRegisterFieldContainer
 Container type for LImmDstRegisterFields.
 
typedef std::vector< InstructionFormat * > InstructionFormatContainer
 Container type for InstructionFormats.
 
typedef std::map< TCEString, int > TemplateExtraBitCountMap
 Template extra bit count container.
 

Private Member Functions

bool hasSocketCodeTable (const std::string &name) const
 
void deleteMoveSlots ()
 
void deleteImmediateSlots ()
 
void deleteLongImmDstRegisterFields ()
 
void deleteSocketCodes ()
 
void deleteInstructionFormats ()
 

Private Attributes

InstructionFormatContainer instructionFormats_
 A container for instruction formats.
 
MoveSlotContainer moveSlots_
 A container for move slots.
 
ImmediateSlotContainer immediateSlots_
 A container for immediate slots.
 
SocketCodeTableContainer socketCodes_
 A container for socket code tables.
 
ImmediateControlFieldimmediateField_
 The immediate control field.
 
LImmDstRegisterFieldContainer longImmDstRegFields_
 A container for long immediate register fields.
 
TemplateExtraBitCountMap extraTemplateBits_
 Extra (padding) bits per instruction template.
 

Additional Inherited Members

- Protected Member Functions inherited from InstructionField
 InstructionField (InstructionField *parent)
 
 InstructionField (const ObjectState *state, InstructionField *parent)
 
void setParent (InstructionField *parent)
 
- Static Protected Member Functions inherited from InstructionField
static void reorderSubfields (ObjectState *state)
 

Detailed Description

BinaryEncoding is the root class in the object model of the binary encoding map.

An instance of this class is sufficient to access all the information pertaining a binary encoding map, so an object can be passed to clients whenever a full description of the encoding map is required. BinaryEncoding is mostly a specialized container of objects of other classes.

Definition at line 61 of file BinaryEncoding.hh.

Member Typedef Documentation

◆ ImmediateSlotContainer

Container type for ImmediateSlotFields.

Definition at line 137 of file BinaryEncoding.hh.

◆ InstructionFormatContainer

Container type for InstructionFormats.

Definition at line 143 of file BinaryEncoding.hh.

◆ LImmDstRegisterFieldContainer

Container type for LImmDstRegisterFields.

Definition at line 141 of file BinaryEncoding.hh.

◆ MoveSlotContainer

typedef std::vector<MoveSlot*> BinaryEncoding::MoveSlotContainer
private

Container type for MoveSlots.

Definition at line 135 of file BinaryEncoding.hh.

◆ SocketCodeTableContainer

Container type for SocketCodeTables.

Definition at line 139 of file BinaryEncoding.hh.

◆ TemplateExtraBitCountMap

typedef std::map<TCEString, int> BinaryEncoding::TemplateExtraBitCountMap
private

Template extra bit count container.

Definition at line 145 of file BinaryEncoding.hh.

Member Enumeration Documentation

◆ Position

Enumerator
LEFT 
RIGHT 

Definition at line 63 of file BinaryEncoding.hh.

Constructor & Destructor Documentation

◆ BinaryEncoding() [1/2]

BinaryEncoding::BinaryEncoding ( )

The constructor.

Creates an empty BEM.

Definition at line 65 of file BinaryEncoding.cc.

65 :
67}
ImmediateControlField * immediateField_
The immediate control field.

◆ BinaryEncoding() [2/2]

BinaryEncoding::BinaryEncoding ( const ObjectState state)

The constructor.

Loads the state of the object from the given ObjectState tree.

Exceptions
ObjectStateLoadingExceptionIf an error occurs while loading the state.

Definition at line 78 of file BinaryEncoding.cc.

79 : InstructionField(NULL), immediateField_(NULL) {
80 loadState(state);
81}
virtual void loadState(const ObjectState *state)

References loadState().

Here is the call graph for this function:

◆ ~BinaryEncoding()

BinaryEncoding::~BinaryEncoding ( )
virtual

Member Function Documentation

◆ addImmediateSlot()

void BinaryEncoding::addImmediateSlot ( ImmediateSlotField slot)

Adds the given immediate slot to the encoding map.

This method is to be called from the constructor of ImmediateSlotField.

Parameters
slotThe immediate slot to be added.
Exceptions
ObjectAlreadyExistsIf the encoding map contains an immediate slot with the same name already.

Definition at line 300 of file BinaryEncoding.cc.

300 {
301 // verify that this is called from MoveSlot constructor
302 assert(slot.parent() == NULL);
303
304 if (hasImmediateSlot(slot.name())) {
305 const string procName = "BinaryEncoding::addImmediateSlot";
306 throw ObjectAlreadyExists(__FILE__, __LINE__, procName);
307 }
308
309 immediateSlots_.push_back(&slot);
310}
#define assert(condition)
ImmediateSlotContainer immediateSlots_
A container for immediate slots.
bool hasImmediateSlot(const std::string &name) const
std::string name() const
BinaryEncoding * parent() const

References assert, hasImmediateSlot(), immediateSlots_, ImmediateSlotField::name(), and ImmediateSlotField::parent().

Referenced by ImmediateSlotField::ImmediateSlotField(), and ImmediateSlotField::ImmediateSlotField().

Here is the call graph for this function:

◆ addInstructionFormat()

void BinaryEncoding::addInstructionFormat ( InstructionFormat format)

Adds the given instruction format to the encoding map.

Parameters
formatThe instruction format to be added.
Exceptions
ObjectAlreadyExistsIf the encoding map already contains a a socket code table with the same name as the given table.

Definition at line 557 of file BinaryEncoding.cc.

557 {
558 // verify that this is called from InstructionFormat constructor
559 assert(format.parent() == NULL);
560
561 if (hasInstructionFormat(format.name())) {
562 const string procName = "BinaryEncoding::addInstructionFormat";
563 throw ObjectAlreadyExists(__FILE__, __LINE__, procName);
564 }
565
566 instructionFormats_.push_back(&format);
567}
bool hasInstructionFormat(const std::string &name) const
InstructionFormatContainer instructionFormats_
A container for instruction formats.
std::string name() const
InstructionField * parent() const

References assert, hasInstructionFormat(), instructionFormats_, InstructionFormat::name(), and InstructionFormat::parent().

Here is the call graph for this function:

◆ addLongImmDstRegisterField()

void BinaryEncoding::addLongImmDstRegisterField ( LImmDstRegisterField field)

Adds the given long immediate destination register field to the instruction format.

This method is to be called from the constructor of LImmDstRegisterField only!

Parameters
fieldThe field to add.

Definition at line 459 of file BinaryEncoding.cc.

459 {
460 assert(field.parent() == NULL);
461 longImmDstRegFields_.push_back(&field);
462}
LImmDstRegisterFieldContainer longImmDstRegFields_
A container for long immediate register fields.
BinaryEncoding * parent() const

References assert, longImmDstRegFields_, and LImmDstRegisterField::parent().

Referenced by LImmDstRegisterField::LImmDstRegisterField(), and LImmDstRegisterField::LImmDstRegisterField().

Here is the call graph for this function:

◆ addMoveSlot()

void BinaryEncoding::addMoveSlot ( MoveSlot slot)

Adds the given move slot to the encoding map.

This method is to be called from the constructor of MoveSlot.

Parameters
slotThe move slot to be added.
Exceptions
ObjectAlreadyExistsIf the encoding map contains a slot with the same name already.

Definition at line 183 of file BinaryEncoding.cc.

183 {
184 // verify that this is called from MoveSlot constructor
185 assert(slot.parent() == NULL);
186
187 if (hasMoveSlot(slot.name())) {
188 const string procName = "BinaryEncoding::addMoveSlot";
189 throw ObjectAlreadyExists(__FILE__, __LINE__, procName);
190 }
191
192 moveSlots_.push_back(&slot);
193}
MoveSlotContainer moveSlots_
A container for move slots.
bool hasMoveSlot(const std::string &name) const
BinaryEncoding * parent() const
Definition MoveSlot.cc:118
std::string name() const
Definition MoveSlot.cc:136

References assert, hasMoveSlot(), moveSlots_, MoveSlot::name(), and MoveSlot::parent().

Referenced by MoveSlot::MoveSlot(), and MoveSlot::MoveSlot().

Here is the call graph for this function:

◆ addSocketCodeTable()

void BinaryEncoding::addSocketCodeTable ( SocketCodeTable table)

Adds the given socket code table to the encoding map.

This method is to be called from the constructor of SocketCodeTable.

Parameters
tableThe socket code table to be added.
Exceptions
ObjectAlreadyExistsIf the encoding map already contains a socket code table with the same name as the given table.

Definition at line 644 of file BinaryEncoding.cc.

644 {
645 // verify that this is called from SocketCodeTable constructor
646 assert(table.parent() == NULL);
647
648 if (hasSocketCodeTable(table.name())) {
649 const string procName = "BinaryEncoding::addSocketCodeTable";
650 throw ObjectAlreadyExists(__FILE__, __LINE__, procName);
651 }
652
653 socketCodes_.push_back(&table);
654}
bool hasSocketCodeTable(const std::string &name) const
SocketCodeTableContainer socketCodes_
A container for socket code tables.
std::string name() const
BinaryEncoding * parent() const

References assert, hasSocketCodeTable(), SocketCodeTable::name(), SocketCodeTable::parent(), and socketCodes_.

Referenced by SocketCodeTable::SocketCodeTable(), and SocketCodeTable::SocketCodeTable().

Here is the call graph for this function:

◆ childField()

InstructionField & BinaryEncoding::childField ( int  position) const
virtual

Returns the child instruction field at the given relative position.

Returns a NullInstructionField instance if there is no child field at the given position. This is, however, not possible if the object model is in consistent state.

Parameters
positionThe relative position.
Returns
The instruction field at the given relative position.
Exceptions
OutOfRangeIf the given position is negative or not smaller than the number of child fields.

Reimplemented from InstructionField.

Definition at line 723 of file BinaryEncoding.cc.

723 {
724 if (position < 0 || position >= childFieldCount()) {
725 const string procName = "BinaryEncoding::childField";
726 throw OutOfRange(__FILE__, __LINE__, procName);
727 }
728
730 immediateControlField().relativePosition() == position) {
731 return immediateControlField();
732 }
733
734 int moveSlots = moveSlotCount();
735 for (int i = 0; i < moveSlots; i++) {
736 MoveSlot& slot = moveSlot(i);
737 if (slot.relativePosition() == position) {
738 return slot;
739 }
740 }
741
742 int immediateSlots = immediateSlotCount();
743 for (int i = 0; i < immediateSlots; i++) {
745 if (slot.relativePosition() == position) {
746 return slot;
747 }
748 }
749
750 int limmDstRegFields = longImmDstRegisterFieldCount();
751 for (int i = 0; i < limmDstRegFields; i++) {
753 if (field.relativePosition() == position) {
754 return field;
755 }
756 }
757
759}
ImmediateControlField & immediateControlField() const
LImmDstRegisterField & longImmDstRegisterField(int index) const
int moveSlotCount() const
virtual int childFieldCount() const
int immediateSlotCount() const
MoveSlot & moveSlot(int index) const
int longImmDstRegisterFieldCount() const
ImmediateSlotField & immediateSlot(int index) const
int relativePosition() const
static NullInstructionField & instance()

References childFieldCount(), hasImmediateControlField(), immediateControlField(), immediateSlot(), immediateSlotCount(), NullInstructionField::instance(), longImmDstRegisterField(), longImmDstRegisterFieldCount(), moveSlot(), moveSlotCount(), and InstructionField::relativePosition().

Referenced by CodeCompressorPlugin::bemInstructionBits(), and printInstructionLayout().

Here is the call graph for this function:

◆ childFieldCount()

int BinaryEncoding::childFieldCount ( ) const
virtual

Returns the number of immediate child fields (move slots + immediate slots + immediate control field).

Returns
The number of child fields.

Implements InstructionField.

Definition at line 700 of file BinaryEncoding.cc.

700 {
701 int count = moveSlotCount() + immediateSlotCount() +
704 count++;
705 }
706 return count;
707}

References hasImmediateControlField(), immediateSlotCount(), longImmDstRegisterFieldCount(), and moveSlotCount().

Referenced by childField(), and printInstructionLayout().

Here is the call graph for this function:

◆ deleteImmediateSlots()

void BinaryEncoding::deleteImmediateSlots ( )
private

Deletes all the immediate slots contained by the encoding map.

Definition at line 980 of file BinaryEncoding.cc.

980 {
982}
static void deleteAllItems(SequenceType &aSequence)

References SequenceTools::deleteAllItems(), and immediateSlots_.

Referenced by ~BinaryEncoding().

Here is the call graph for this function:

◆ deleteInstructionFormats()

void BinaryEncoding::deleteInstructionFormats ( )
private

Deletes all the instruction formats contained by the encoding map.

Definition at line 1007 of file BinaryEncoding.cc.

References SequenceTools::deleteAllItems(), and instructionFormats_.

Referenced by ~BinaryEncoding().

Here is the call graph for this function:

◆ deleteLongImmDstRegisterFields()

void BinaryEncoding::deleteLongImmDstRegisterFields ( )
private

Deletes all the long immediate destination register fields contained by the encoding map.

Definition at line 990 of file BinaryEncoding.cc.

References SequenceTools::deleteAllItems(), and longImmDstRegFields_.

Referenced by ~BinaryEncoding().

Here is the call graph for this function:

◆ deleteMoveSlots()

void BinaryEncoding::deleteMoveSlots ( )
private

Deletes all the move slots contained by the encoding map.

Definition at line 971 of file BinaryEncoding.cc.

References SequenceTools::deleteAllItems(), and moveSlots_.

Referenced by ~BinaryEncoding().

Here is the call graph for this function:

◆ deleteSocketCodes()

void BinaryEncoding::deleteSocketCodes ( )
private

Deletes all the socket code tables contained by the encoding map.

Definition at line 999 of file BinaryEncoding.cc.

References SequenceTools::deleteAllItems(), and socketCodes_.

Referenced by ~BinaryEncoding().

Here is the call graph for this function:

◆ hasImmediateControlField()

bool BinaryEncoding::hasImmediateControlField ( ) const

◆ hasImmediateSlot()

bool BinaryEncoding::hasImmediateSlot ( const std::string &  name) const

Tells whether the encoding map contains an immediate slot with the given name.

Parameters
nameThe name of the immediate slot.
Returns
True if there is an immediate slot with the given name, otherwise false.

Definition at line 252 of file BinaryEncoding.cc.

252 {
253
254 for (ImmediateSlotContainer::const_iterator iter =
255 immediateSlots_.begin(); iter != immediateSlots_.end();
256 iter++) {
257 ImmediateSlotField* slot = *iter;
258 if (slot->name() == name) {
259 return true;
260 }
261 }
262
263 return false;
264}

References immediateSlots_, and ImmediateSlotField::name().

Referenced by addImmediateSlot(), and BEMValidator::checkImmediateSlot().

Here is the call graph for this function:

◆ hasInstructionFormat()

bool BinaryEncoding::hasInstructionFormat ( const std::string &  name) const

Tells whether the binary encoding has an instruction format with the given name.

Parameters
nameThe name.
Returns
True if the ecoding map contains an instruction format with the given name, otherwise false.

Definition at line 502 of file BinaryEncoding.cc.

502 {
503 return std::find_if(
505 [name](const InstructionFormat* it) {
506 return it->name() == name;
507 }) != instructionFormats_.end();
508}

References instructionFormats_.

Referenced by addInstructionFormat().

◆ hasMoveSlot()

bool BinaryEncoding::hasMoveSlot ( const std::string &  name) const

Tells whether the encoding map contains a move slot with the given (bus) name.

Parameters
nameThe bus name.
Returns
True if there is a move slot with the given name, otherwise false.

Definition at line 138 of file BinaryEncoding.cc.

138 {
139 for (MoveSlotContainer::const_iterator iter = moveSlots_.begin();
140 iter != moveSlots_.end(); iter++) {
141 MoveSlot* slot = *iter;
142 if (slot->name() == name) {
143 return true;
144 }
145 }
146
147 return false;
148}

References moveSlots_, and MoveSlot::name().

Referenced by addMoveSlot(), BEMValidator::checkMoveSlot(), DefaultDecoderGenerator::writeSquashSignalGenerationProcess(), and DefaultDecoderGenerator::writeSquashSignals().

Here is the call graph for this function:

◆ hasSocketCodeTable()

bool BinaryEncoding::hasSocketCodeTable ( const std::string &  name) const
private

Tells whether the encoding map contains a socket code table with the given name.

Parameters
nameThe name.
Returns
True if the encoding map contains a socket code table with the given name, otherwise false.

Definition at line 954 of file BinaryEncoding.cc.

954 {
955 for (SocketCodeTableContainer::const_iterator iter = socketCodes_.begin();
956 iter != socketCodes_.end(); iter++) {
957 SocketCodeTable* table = *iter;
958 if (table->name() == name) {
959 return true;
960 }
961 }
962
963 return false;
964}

References SocketCodeTable::name(), and socketCodes_.

Referenced by addSocketCodeTable().

Here is the call graph for this function:

◆ immediateControlField()

ImmediateControlField & BinaryEncoding::immediateControlField ( ) const

Returns the immediate control field of the instruction word, if one exists.

Returns a NullImmediateControlField instance otherwise (a single-template instruction).

Returns
The immediate control field.

Definition at line 348 of file BinaryEncoding.cc.

348 {
350 return *immediateField_;
351 } else {
353 }
354}
static NullImmediateControlField & instance()

References hasImmediateControlField(), immediateField_, and NullImmediateControlField::instance().

Referenced by BEMValidator::checkImmediateControlField(), childField(), CodeCompressorPlugin::firstMoveSlotIndex(), DefaultDecoderGenerator::instructionTemplateCondition(), printImmediateControlField(), saveState(), unsetImmediateControlField(), width(), DefaultDecoderGenerator::writeInstructionDismembering(), DefaultDecoderGenerator::writeLongImmediateTagSignal(), and DefaultDecoderGenerator::writeSquashSignalGenerationProcess().

Here is the call graph for this function:

◆ immediateSlot() [1/2]

ImmediateSlotField & BinaryEncoding::immediateSlot ( const std::string &  name) const

Returns the immediate slot of the given name.

Parameters
nameThe name of the immediate slot.
Returns
The immediate slot.
Exceptions
InstanceNotFoundIf the encoding map does not contain an immediate slot with the given name.

Definition at line 276 of file BinaryEncoding.cc.

276 {
277 for (ImmediateSlotContainer::const_iterator iter =
278 immediateSlots_.begin(); iter != immediateSlots_.end();
279 iter++) {
280 ImmediateSlotField* slot = *iter;
281 if (slot->name() == name) {
282 return *slot;
283 }
284 }
285
286 const string procName = "BinaryEncoding::immediateSlot";
287 throw InstanceNotFound(__FILE__, __LINE__, procName);
288}

References immediateSlots_, and ImmediateSlotField::name().

Here is the call graph for this function:

◆ immediateSlot() [2/2]

ImmediateSlotField & BinaryEncoding::immediateSlot ( int  index) const

Returns the immediate slot at given index.

The index does not have to reflect the actual order within the TTA instruction word.

Parameters
indexThe index.
Returns
The immediate slot at given index.
Exceptions
OutOfRangeIf the index is negative or is not smaller than the number of immediate slots in the TTA instruction word.

Definition at line 234 of file BinaryEncoding.cc.

234 {
235 if (index < 0 || index >= immediateSlotCount()) {
236 const string procName = "BinaryEncoding::immediateSlot";
237 throw OutOfRange(__FILE__, __LINE__, procName);
238 }
239
240 return *immediateSlots_[index];
241}

References immediateSlotCount(), and immediateSlots_.

Referenced by BEMValidator::checkImmediateSlot(), childField(), saveState(), width(), DefaultDecoderGenerator::writeImmediateSlotSignals(), DefaultDecoderGenerator::writeInstructionDismembering(), and DefaultDecoderGenerator::writeInstructionTemplateProcedures().

Here is the call graph for this function:

◆ immediateSlotCount()

int BinaryEncoding::immediateSlotCount ( ) const

Returns the number of immediate slots in the instruction.

Returns
The number of immediate slots.

Definition at line 216 of file BinaryEncoding.cc.

216 {
217 return immediateSlots_.size();
218}

References immediateSlots_.

Referenced by childField(), childFieldCount(), immediateSlot(), saveState(), width(), DefaultDecoderGenerator::writeImmediateSlotSignals(), and DefaultDecoderGenerator::writeInstructionDismembering().

◆ instructionFormat() [1/2]

InstructionFormat * BinaryEncoding::instructionFormat ( const std::string &  name) const

Returns the instruction format with the given name.

Parameters
nameThe name of the format.
Returns
The instruction format, null if not found

Definition at line 536 of file BinaryEncoding.cc.

536 {
537 InstructionFormat* format = NULL;
538 for (int f = 0; f < instructionFormatCount(); f++) {
539 if (instructionFormat(f).name() == name) {
540 format = &instructionFormat(f);
541 break;
542 }
543 }
544 return format;
545}
int instructionFormatCount() const
InstructionFormat & instructionFormat(int index) const

References instructionFormat(), instructionFormatCount(), and InstructionFormat::name().

Here is the call graph for this function:

◆ instructionFormat() [2/2]

InstructionFormat & BinaryEncoding::instructionFormat ( int  index) const

Returns the instruction format with the given index.

Parameters
indexThe index.
Returns
The instruction format
Exceptions
OutOfRangeIf the given index is negative or not smaller than the number of instruction formats in the encoding map.

Definition at line 521 of file BinaryEncoding.cc.

521 {
522 if (index < 0 || index >= instructionFormatCount()) {
523 throw OutOfRange(__FILE__, __LINE__, __func__);
524 }
525 return *instructionFormats_[index];
526}
#define __func__

References __func__, instructionFormatCount(), and instructionFormats_.

Referenced by RISCVTDGen::findCustomOps(), llvm::LLVMTCERISCVIntrinsicsLowering::findRFormat(), ProGe::RV32MicroCodeGenerator::initializeOperations(), and instructionFormat().

Here is the call graph for this function:

◆ instructionFormatCount()

int BinaryEncoding::instructionFormatCount ( ) const

Returns the number of instruction formats in the in binary encoding.

Returns
The number of instruction formats.

Definition at line 488 of file BinaryEncoding.cc.

488 {
489 return instructionFormats_.size();
490}

References instructionFormats_.

Referenced by llvm::LLVMTCERISCVIntrinsicsLowering::findRFormat(), ProGe::RV32MicroCodeGenerator::initializeOperations(), instructionFormat(), instructionFormat(), and saveState().

◆ loadState()

void BinaryEncoding::loadState ( const ObjectState state)
virtual

Loads the state of the binary encoding map from the given ObjectState tree.

Parameters
stateThe ObjectState tree.
Exceptions
ObjectStateLoadingExceptionIf an error occurs while loading the state.

Reimplemented from InstructionField.

Definition at line 826 of file BinaryEncoding.cc.

826 {
827 if (state->name() != OSNAME_BEM) {
828 const string procName = "BinaryEncoding::loadState";
829 throw ObjectStateLoadingException(__FILE__, __LINE__, procName);
830 }
831
832 // create socket code tables at first
833 for (int i = 0; i < state->childCount(); i++) {
834 ObjectState* child = state->child(i);
836 new SocketCodeTable(child, *this);
837 }
838 }
839
840 // create subfields in the correct order
841 ObjectState* newState = new ObjectState(*state);
842 reorderSubfields(newState);
843
844 for (int i = 0; i < newState->childCount(); i++) {
845 ObjectState* child = newState->child(i);
846 if (child->name() == MoveSlot::OSNAME_MOVE_SLOT) {
847 new MoveSlot(child, *this);
848 } else if (child->name() ==
850 new ImmediateSlotField(child, *this);
851 } else if (child->name() ==
853 new ImmediateControlField(child, *this);
854 } else if (child->name() ==
856 new LImmDstRegisterField(child, *this);
857 } else if (
861 ->stringValue(),
862 child
863 ->childByName(
865 ->intValue());
866 }
867 }
868 delete newState;
869}
static const std::string OSNAME_TEMPLATE_NAME
static const std::string OSNAME_BEM
ObjectState name for binary encoding.
static const std::string OSNAME_TEMPLATE_EXTRA_BIT_COUNT
static const std::string OSNAME_TEMPLATE_EXTRA_BITS
void setTemplateExtraBits(const TCEString &templateName, int bitCount)
static const std::string OSNAME_IMM_CONTROL_FIELD
ObjectState name for immediate control field.
static const std::string OSNAME_IMMEDIATE_SLOT_FIELD
ObjectState name for immediate slot field.
static void reorderSubfields(ObjectState *state)
static const std::string OSNAME_LIMM_DST_REGISTER_FIELD
ObjectState name for long immediate destination register field.
static const std::string OSNAME_MOVE_SLOT
ObjectState name for move slot.
Definition MoveSlot.hh:96
ObjectState * childByName(const std::string &name) const
ObjectState * child(int index) const
int intValue() const
std::string stringValue() const
std::string name() const
int childCount() const
static const std::string OSNAME_SOCKET_CODE_TABLE
ObjectState name for socket code table.

References ObjectState::child(), ObjectState::childByName(), ObjectState::childCount(), ObjectState::intValue(), ObjectState::name(), OSNAME_BEM, ImmediateControlField::OSNAME_IMM_CONTROL_FIELD, ImmediateSlotField::OSNAME_IMMEDIATE_SLOT_FIELD, LImmDstRegisterField::OSNAME_LIMM_DST_REGISTER_FIELD, MoveSlot::OSNAME_MOVE_SLOT, SocketCodeTable::OSNAME_SOCKET_CODE_TABLE, OSNAME_TEMPLATE_EXTRA_BIT_COUNT, OSNAME_TEMPLATE_EXTRA_BITS, OSNAME_TEMPLATE_NAME, InstructionField::reorderSubfields(), setTemplateExtraBits(), and ObjectState::stringValue().

Referenced by BinaryEncoding().

Here is the call graph for this function:

◆ longestTemplateExtraBits()

int BinaryEncoding::longestTemplateExtraBits ( ) const

Returns the extra template bit amount in the largest template in the machine. Needed for instructionField's bitPosition-method.

Returns
The extra padding bits in the longest instruction template.

Definition at line 676 of file BinaryEncoding.cc.

676 {
677 if (immediateField_ == NULL) return 0;
678
679 TCEString longestTemplate = "";
680 int maxWidth = 0;
681
682 for (int i = 0; i < immediateField_->templateCount(); ++i) {
684 int w = width(iTemplate);
685 if (w > maxWidth) {
686 maxWidth = w;
687 longestTemplate = iTemplate;
688 }
689 }
690 return templateExtraBits(longestTemplate);
691}
virtual int width() const
int templateExtraBits(const TCEString &templateName) const
std::string instructionTemplate(int index) const

References immediateField_, ImmediateControlField::instructionTemplate(), ImmediateControlField::templateCount(), templateExtraBits(), and width().

Here is the call graph for this function:

◆ longImmDstRegisterField() [1/2]

LImmDstRegisterField & BinaryEncoding::longImmDstRegisterField ( const std::string &  iTemp,
const std::string &  dstUnit 
) const

Returns the long immediate destination register field that gives the destination register of the given immediate unit in the given instruction template.

Parameters
iTempName of the instruction template.
dstUnitName of the immediate unit.
Returns
The long immediate destination register field.
Exceptions
InstanceNotFoundIf there is no such field.

Definition at line 434 of file BinaryEncoding.cc.

435 {
436 int fields = longImmDstRegisterFieldCount();
437 for (int i = 0; i < fields; i++) {
439 if (field.usedByInstructionTemplate(iTemp)) {
440 if (field.immediateUnit(iTemp) == dstUnit) {
441 return field;
442 }
443 }
444 }
445
446 throw InstanceNotFound(__FILE__, __LINE__, __func__);
447}
bool usedByInstructionTemplate(const std::string &instructionTemplate) const
std::string immediateUnit(const std::string &instructionTemplate) const

References __func__, LImmDstRegisterField::immediateUnit(), longImmDstRegisterField(), longImmDstRegisterFieldCount(), and LImmDstRegisterField::usedByInstructionTemplate().

Here is the call graph for this function:

◆ longImmDstRegisterField() [2/2]

LImmDstRegisterField & BinaryEncoding::longImmDstRegisterField ( int  index) const

Returns a long immediate destination register field by the given index.

Parameters
indexThe index.
Returns
The field.
Exceptions
OutOfRangeIf the index is negative or not smaller than the number of long immediate destination register fields.

Definition at line 415 of file BinaryEncoding.cc.

415 {
416 if (index < 0 || index >= longImmDstRegisterFieldCount()) {
417 throw OutOfRange(__FILE__, __LINE__, __func__);
418 }
419
420 return *longImmDstRegFields_[index];
421}

References __func__, longImmDstRegFields_, and longImmDstRegisterFieldCount().

Referenced by BEMValidator::checkLImmDstRegisterFields(), childField(), CodeCompressorPlugin::firstMoveSlotIndex(), longImmDstRegisterField(), printBEMInfo(), saveState(), width(), and DefaultDecoderGenerator::writeInstructionTemplateProcedures().

Here is the call graph for this function:

◆ longImmDstRegisterFieldCount()

int BinaryEncoding::longImmDstRegisterFieldCount ( ) const

Returns the number of long immediate destination register fields in the instruction.

Returns
The number of fields.

Definition at line 400 of file BinaryEncoding.cc.

400 {
401 return longImmDstRegFields_.size();
402}

References longImmDstRegFields_.

Referenced by BEMValidator::checkLImmDstRegisterFields(), childField(), childFieldCount(), CodeCompressorPlugin::firstMoveSlotIndex(), longImmDstRegisterField(), longImmDstRegisterField(), printBEMInfo(), saveState(), and width().

◆ moveSlot() [1/2]

MoveSlot & BinaryEncoding::moveSlot ( const std::string &  name) const

Returns the move slot that programs the bus identified by the given name.

Parameters
Thebus name.
Returns
The move slot.
Exceptions
InstanceNotFoundIf the encoding map does not contain a move slot with the given name.

Definition at line 160 of file BinaryEncoding.cc.

160 {
161 for (MoveSlotContainer::const_iterator iter = moveSlots_.begin();
162 iter != moveSlots_.end(); iter++) {
163 MoveSlot* slot = *iter;
164 if (slot->name() == name) {
165 return *slot;
166 }
167 }
168
169 const string procName = "BinaryEncoding::moveSlot";
170 throw InstanceNotFound(__FILE__, __LINE__, procName);
171}

References moveSlots_, and MoveSlot::name().

Here is the call graph for this function:

◆ moveSlot() [2/2]

MoveSlot & BinaryEncoding::moveSlot ( int  index) const

Returns the move slot at given index.

The index does not have to reflect the actual order within the TTA instruction word.

Parameters
indexThe index.
Returns
The move slot at given index.
Exceptions
OutOfRangeIf the index is negative or is not smaller than the number of move slots of the TTA instruction word.

Definition at line 121 of file BinaryEncoding.cc.

121 {
122 if (index < 0 || index >= moveSlotCount()) {
123 const string procName = "BinaryEncoding::moveSlot";
124 throw OutOfRange(__FILE__, __LINE__, procName);
125 }
126
127 return *moveSlots_[index];
128}

References moveSlotCount(), and moveSlots_.

Referenced by BEMValidator::checkDestinationField(), BEMValidator::checkGuardField(), BEMValidator::checkSourceField(), childField(), DestinationField::DestinationField(), ProGe::RV32MicroCodeGenerator::findBusWidths(), BEMGenerator::generate(), CodeCompressorPlugin::moveSlotWidth(), printBEMInfo(), saveState(), SourceField::SourceField(), width(), DefaultDecoderGenerator::writeBusControlRulesOfOutputSocket(), DefaultDecoderGenerator::writeBusControlRulesOfSImmSocketOfBus(), DefaultDecoderGenerator::writeControlRulesOfFUInputPort(), DefaultDecoderGenerator::writeControlRulesOfFUOutputPort(), DefaultDecoderGenerator::writeControlRulesOfRFReadPort(), DefaultDecoderGenerator::writeControlRulesOfRFWritePort(), DefaultDecoderGenerator::writeInstructionDismembering(), DefaultDecoderGenerator::writeInstructionTemplateProcedures(), DefaultDecoderGenerator::writeMoveFieldSignals(), DefaultDecoderGenerator::writeSimmDataSignal(), DefaultDecoderGenerator::writeSquashSignalGenerationProcess(), DefaultDecoderGenerator::writeSquashSignals(), and SocketCodeTable::~SocketCodeTable().

Here is the call graph for this function:

◆ moveSlotCount()

int BinaryEncoding::moveSlotCount ( ) const

◆ removeImmediateSlot()

void BinaryEncoding::removeImmediateSlot ( ImmediateSlotField slot)

Removes the given immediate slot from the encoding map.

This method is to be called from the destructor of ImmediateSlotField.

Parameters
slotThe immediate slot to be removed.

Definition at line 320 of file BinaryEncoding.cc.

320 {
321 // verify that this is called from ImmediateSlotField destructor.
322 assert(slot.parent() == NULL);
324}
static bool removeValueIfExists(ContainerType &aContainer, const ElementType &aKey)

References assert, immediateSlots_, ImmediateSlotField::parent(), and ContainerTools::removeValueIfExists().

Referenced by ImmediateSlotField::~ImmediateSlotField().

Here is the call graph for this function:

◆ removeInstructionFormat()

void BinaryEncoding::removeInstructionFormat ( InstructionFormat format)

Removes the given instruction format from the encoding map. This method is to be called from the destructor Instruction Format.

Parameters
formatThe instruction format to be removed.

Definition at line 577 of file BinaryEncoding.cc.

577 {
578 assert(format.parent() == NULL);
580}

References assert, instructionFormats_, InstructionFormat::parent(), and ContainerTools::removeValueIfExists().

Here is the call graph for this function:

◆ removeLongImmDstRegisterField()

void BinaryEncoding::removeLongImmDstRegisterField ( LImmDstRegisterField field)

Removes the given long immediate destination register field from the instruction format.

This method is to be called from the destructor of LImmDstRegisterField only!

Parameters
fieldThe field to remove.

Definition at line 475 of file BinaryEncoding.cc.

475 {
476 assert(field.parent() == NULL);
477 assert(
479}

References assert, longImmDstRegFields_, LImmDstRegisterField::parent(), and ContainerTools::removeValueIfExists().

Referenced by LImmDstRegisterField::~LImmDstRegisterField().

Here is the call graph for this function:

◆ removeMoveSlot()

void BinaryEncoding::removeMoveSlot ( MoveSlot slot)

Removes the given move slot from the encoding map.

This method is to be called from the destructor of MoveSlot.

Parameters
slotThe move slot to be removed.

Definition at line 203 of file BinaryEncoding.cc.

203 {
204 // verify that this is called from MoveSlot destructor.
205 assert(slot.parent() == NULL);
207}

References assert, moveSlots_, MoveSlot::parent(), and ContainerTools::removeValueIfExists().

Referenced by MoveSlot::~MoveSlot().

Here is the call graph for this function:

◆ removeSocketCodeTable()

void BinaryEncoding::removeSocketCodeTable ( SocketCodeTable table)

Removes the given socket code table from the encoding map.

This method is to be called from the destructor of SocketCodeTable.

Parameters
tableThe socket code table to be removed.

Definition at line 664 of file BinaryEncoding.cc.

664 {
665 assert(table.parent() == NULL);
667}

References assert, SocketCodeTable::parent(), ContainerTools::removeValueIfExists(), and socketCodes_.

Referenced by SocketCodeTable::~SocketCodeTable().

Here is the call graph for this function:

◆ saveState()

ObjectState * BinaryEncoding::saveState ( ) const
virtual

Saves the state of the binary encoding map to an ObjectState tree.

Returns
The newly created ObjectState tree.

Reimplemented from InstructionField.

Definition at line 877 of file BinaryEncoding.cc.

877 {
878
880
881 // add move slots
882 int moveSlots = moveSlotCount();
883 for (int i = 0; i < moveSlots; i++) {
884 MoveSlot& slot = moveSlot(i);
885 bem->addChild(slot.saveState());
886 }
887
888 // add immediate slots
889 int immediateSlots = immediateSlotCount();
890 for (int i = 0; i < immediateSlots; i++) {
892 bem->addChild(slot.saveState());
893 }
894
895 // add long immediate destination register fields
896 int limmDstRegFields = longImmDstRegisterFieldCount();
897 for (int i = 0; i < limmDstRegFields; i++) {
899 bem->addChild(field.saveState());
900 }
901
902 // add socket code tables
903 int tableCount = socketCodeTableCount();
904 for (int i = 0; i < tableCount; i++) {
906 bem->addChild(table.saveState());
907 }
908
909 // add immediate control field
912 }
913
914 for (TemplateExtraBitCountMap::const_iterator
915 i = extraTemplateBits_.begin(),
916 e = extraTemplateBits_.end();
917 i != e; ++i) {
918 TCEString templateName = (*i).first;
919 int bitCount = (*i).second;
920 ObjectState* root =
922
923 ObjectState* templateNameObj =
925 templateNameObj->setValue(templateName);
926
927 ObjectState* bitCountObj =
929 bitCountObj->setValue(bitCount);
930
931 root->addChild(templateNameObj);
932 root->addChild(bitCountObj);
933
934 bem->addChild(root);
935 }
936
937 for (int i = 0; i < instructionFormatCount(); i++) {
938 bem->addChild(instructionFormats_.at(i)->saveState());
939 }
940
941 return bem;
942}
int socketCodeTableCount() const
virtual ObjectState * saveState() const
TemplateExtraBitCountMap extraTemplateBits_
Extra (padding) bits per instruction template.
SocketCodeTable & socketCodeTable(int index) const
virtual ObjectState * saveState() const
virtual ObjectState * saveState() const
virtual ObjectState * saveState() const
Definition MoveSlot.cc:469
void setValue(const std::string &value)
void addChild(ObjectState *child)
virtual ObjectState * saveState() const

References ObjectState::addChild(), extraTemplateBits_, hasImmediateControlField(), immediateControlField(), immediateSlot(), immediateSlotCount(), instructionFormatCount(), instructionFormats_, longImmDstRegisterField(), longImmDstRegisterFieldCount(), moveSlot(), moveSlotCount(), OSNAME_BEM, OSNAME_TEMPLATE_EXTRA_BIT_COUNT, OSNAME_TEMPLATE_EXTRA_BITS, OSNAME_TEMPLATE_NAME, saveState(), ImmediateSlotField::saveState(), LImmDstRegisterField::saveState(), MoveSlot::saveState(), SocketCodeTable::saveState(), ObjectState::setValue(), socketCodeTable(), and socketCodeTableCount().

Referenced by ProGe::ProGeUI::loadBinaryEncoding(), saveState(), and BEMSerializer::writeBinaryEncoding().

Here is the call graph for this function:

◆ setImmediateControlField()

void BinaryEncoding::setImmediateControlField ( ImmediateControlField field)

Adds the given immediate control field to the instruction word.

This method is to be called from the constructor of ImmediateControlField.

Parameters
fieldThe immediate control field to be added.
Exceptions
ObjectAlreadyExistsIf the instruction word already has an immediate control field.

Definition at line 367 of file BinaryEncoding.cc.

367 {
368 // verify that this is called from ImmediateControlField constructor
369 assert(field.parent() == NULL);
370
372 const string procName = "BinaryEncoding::setImmediateControlField";
373 throw ObjectAlreadyExists(__FILE__, __LINE__, procName);
374 }
375
376 immediateField_ = &field;
377}
BinaryEncoding * parent() const

References assert, hasImmediateControlField(), immediateField_, and ImmediateControlField::parent().

Referenced by ImmediateControlField::ImmediateControlField(), and ImmediateControlField::ImmediateControlField().

Here is the call graph for this function:

◆ setTemplateExtraBits()

void BinaryEncoding::setTemplateExtraBits ( const TCEString templateName,
int  bitCount 
)

Sets the extra padding bit count for an instruction template

Definition at line 1014 of file BinaryEncoding.cc.

1015 {
1016 extraTemplateBits_[templateName] = bitCount;
1017}

References extraTemplateBits_.

Referenced by loadState().

◆ socketCodeTable() [1/2]

SocketCodeTable & BinaryEncoding::socketCodeTable ( const std::string &  name) const

Returns the socket code table which has the given name.

Returns a NullSocketCodeTable instance if there is no such table.

Parameters
nameName of the table.
Returns
The socket code table.

Definition at line 620 of file BinaryEncoding.cc.

620 {
621
622 for (int i = 0; i < socketCodeTableCount(); i++) {
624 if (table.name() == name) {
625 return table;
626 }
627 }
628
630}
static NullSocketCodeTable & instance()

References NullSocketCodeTable::instance(), SocketCodeTable::name(), socketCodeTable(), and socketCodeTableCount().

Here is the call graph for this function:

◆ socketCodeTable() [2/2]

SocketCodeTable & BinaryEncoding::socketCodeTable ( int  index) const

Returns the socket code table at the given index.

Parameters
indexThe index.
Exceptions
OutOfRangeIf the given index is negative or not smaller than the number of socket code tables in the encoding map.

Definition at line 602 of file BinaryEncoding.cc.

602 {
603 if (index < 0 || index >= socketCodeTableCount()) {
604 const string procName = "BinaryEncoding::socketCodeTable";
605 throw OutOfRange(__FILE__, __LINE__, procName);
606 }
607
608 return *socketCodes_[index];
609}

References socketCodes_, and socketCodeTableCount().

Referenced by SocketCodeTable::hasParentSCTable(), saveState(), socketCodeTable(), and SocketEncoding::SocketEncoding().

Here is the call graph for this function:

◆ socketCodeTableCount()

int BinaryEncoding::socketCodeTableCount ( ) const

Returns the number of socket code tables contained by the encoding map.

Returns
The number of socket code tables.

Definition at line 588 of file BinaryEncoding.cc.

588 {
589 return socketCodes_.size();
590}

References socketCodes_.

Referenced by SocketCodeTable::hasParentSCTable(), saveState(), socketCodeTable(), and socketCodeTable().

◆ templateExtraBits()

int BinaryEncoding::templateExtraBits ( const TCEString templateName) const

Definition at line 1020 of file BinaryEncoding.cc.

1020 {
1021 TemplateExtraBitCountMap::const_iterator pos =
1022 extraTemplateBits_.find(templateName);
1023
1024 if (pos == extraTemplateBits_.end()) return 0;
1025 return (*pos).second;
1026}

References extraTemplateBits_.

Referenced by longestTemplateExtraBits(), and width().

◆ unsetImmediateControlField()

void BinaryEncoding::unsetImmediateControlField ( )

Removes the immediate control field.

This method is to be called from the destructor of ImmediateControlField.

Definition at line 385 of file BinaryEncoding.cc.

385 {
386 // verify that this is called from ImmediateControlField destructor
389 immediateField_ = NULL;
390}
InstructionField * parent() const

References assert, hasImmediateControlField(), immediateControlField(), immediateField_, and InstructionField::parent().

Referenced by ImmediateControlField::~ImmediateControlField().

Here is the call graph for this function:

◆ width() [1/2]

int BinaryEncoding::width ( ) const
virtual

Returns the bit width of the maximum width instruction word defined by this encoding map.

Parameters
Ifset, returns the instruction width of the given instruction template, otherwise the maximum.
Returns
The bit width of the instruction word.

Implements InstructionField.

Definition at line 770 of file BinaryEncoding.cc.

770 {
771 if (immediateField_ == NULL) return width("");
772
773 int maxWidth = 0;
774 for (int i = 0; i < immediateField_->templateCount(); ++i) {
776 int w = width(iTemplate);
777 if (w > maxWidth) maxWidth = w;
778 }
779 return maxWidth;
780}

References immediateField_, ImmediateControlField::instructionTemplate(), ImmediateControlField::templateCount(), and width().

Referenced by longestTemplateExtraBits(), width(), and width().

Here is the call graph for this function:

◆ width() [2/2]

int BinaryEncoding::width ( const TCEString templateName) const
virtual

Returns the bit width of the instruction word defined by an instruction template in this encoding map.

Definition at line 787 of file BinaryEncoding.cc.

787 {
788 int moveSlots = moveSlotCount();
789 int immediateSlots = immediateSlotCount();
790 int limmDstRegFields = longImmDstRegisterFieldCount();
791 int width = 0;
792
793 for (int i = 0; i < moveSlots; i++) {
794 MoveSlot& slot = moveSlot(i);
795 width += slot.width();
796 }
797
798 for (int i = 0; i < immediateSlots; i++) {
800 width += slot.width();
801 }
802
803 for (int i = 0; i < limmDstRegFields; i++) {
805 width += field.width();
806 }
807
810 }
811
812 width += templateExtraBits(templateName);
813 width += extraBits();
814 return width;
815}
virtual int width() const
virtual int width() const
virtual int width() const
Definition MoveSlot.cc:406

References InstructionField::extraBits(), hasImmediateControlField(), immediateControlField(), immediateSlot(), immediateSlotCount(), longImmDstRegisterField(), longImmDstRegisterFieldCount(), moveSlot(), moveSlotCount(), templateExtraBits(), width(), ImmediateControlField::width(), ImmediateSlotField::width(), LImmDstRegisterField::width(), and MoveSlot::width().

Referenced by CodeCompressorPlugin::bemBits(), BEMValidator::checkImemMauWidth(), InstructionDictionary::createDictionary(), InstructionDictionary::generateDecompressor(), ProgramImageGenerator::generateProgramImage(), main(), printBEMInfo(), MoveSlotDictionary::printDetails(), ProGe::ProGeUI::readImemParameters(), CodeCompressorPlugin::setMachine(), MachineCanvas::updateMachine(), and DefaultICDecoderGenerator::writeGlobalDefinitions().

Here is the call graph for this function:

Member Data Documentation

◆ extraTemplateBits_

TemplateExtraBitCountMap BinaryEncoding::extraTemplateBits_
private

Extra (padding) bits per instruction template.

Definition at line 167 of file BinaryEncoding.hh.

Referenced by saveState(), setTemplateExtraBits(), and templateExtraBits().

◆ immediateField_

ImmediateControlField* BinaryEncoding::immediateField_
private

◆ immediateSlots_

ImmediateSlotContainer BinaryEncoding::immediateSlots_
private

◆ instructionFormats_

InstructionFormatContainer BinaryEncoding::instructionFormats_
private

◆ longImmDstRegFields_

LImmDstRegisterFieldContainer BinaryEncoding::longImmDstRegFields_
private

◆ moveSlots_

MoveSlotContainer BinaryEncoding::moveSlots_
private

A container for move slots.

Definition at line 157 of file BinaryEncoding.hh.

Referenced by addMoveSlot(), deleteMoveSlots(), hasMoveSlot(), moveSlot(), moveSlot(), moveSlotCount(), and removeMoveSlot().

◆ OSNAME_BEM

const std::string BinaryEncoding::OSNAME_BEM = "bem"
static

ObjectState name for binary encoding.

Definition at line 127 of file BinaryEncoding.hh.

Referenced by BEMSerializer::convertToOMFormat(), loadState(), and saveState().

◆ OSNAME_FU_OPCODE

const std::string BinaryEncoding::OSNAME_FU_OPCODE
static

Definition at line 128 of file BinaryEncoding.hh.

◆ OSNAME_TEMPLATE_EXTRA_BIT_COUNT

const std::string BinaryEncoding::OSNAME_TEMPLATE_EXTRA_BIT_COUNT
static
Initial value:
=
"bit-count"

Definition at line 130 of file BinaryEncoding.hh.

Referenced by loadState(), and saveState().

◆ OSNAME_TEMPLATE_EXTRA_BITS

const std::string BinaryEncoding::OSNAME_TEMPLATE_EXTRA_BITS
static
Initial value:
=
"template-extra-bits"

Definition at line 129 of file BinaryEncoding.hh.

Referenced by BEMSerializer::convertToFileFormat(), BEMSerializer::convertToOMFormat(), loadState(), and saveState().

◆ OSNAME_TEMPLATE_NAME

const std::string BinaryEncoding::OSNAME_TEMPLATE_NAME = "template"
static

Definition at line 131 of file BinaryEncoding.hh.

Referenced by loadState(), and saveState().

◆ socketCodes_

SocketCodeTableContainer BinaryEncoding::socketCodes_
private

A container for socket code tables.

Definition at line 161 of file BinaryEncoding.hh.

Referenced by addSocketCodeTable(), deleteSocketCodes(), hasSocketCodeTable(), removeSocketCodeTable(), socketCodeTable(), and socketCodeTableCount().


The documentation for this class was generated from the following files: