OpenASIP
2.0
|
#include <BinaryEncoding.hh>
Public Types | |
enum | Position { LEFT, RIGHT } |
Static Public Attributes | |
static const std::string | OSNAME_BEM = "bem" |
ObjectState name for binary encoding. More... | |
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. More... | |
static const std::string | OSKEY_EXTRA_BITS = "extra_bits" |
ObjectState attribute key for the number of extra bits. More... | |
static const std::string | OSKEY_POSITION = "position" |
ObjectState attribute key for the relative position of the field. More... | |
Private Types | |
typedef std::vector< MoveSlot * > | MoveSlotContainer |
Container type for MoveSlots. More... | |
typedef std::vector< ImmediateSlotField * > | ImmediateSlotContainer |
Container type for ImmediateSlotFields. More... | |
typedef std::vector< SocketCodeTable * > | SocketCodeTableContainer |
Container type for SocketCodeTables. More... | |
typedef std::vector< LImmDstRegisterField * > | LImmDstRegisterFieldContainer |
Container type for LImmDstRegisterFields. More... | |
typedef std::vector< InstructionFormat * > | InstructionFormatContainer |
Container type for InstructionFormats. More... | |
typedef std::map< TCEString, int > | TemplateExtraBitCountMap |
Template extra bit count container. More... | |
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. More... | |
MoveSlotContainer | moveSlots_ |
A container for move slots. More... | |
ImmediateSlotContainer | immediateSlots_ |
A container for immediate slots. More... | |
SocketCodeTableContainer | socketCodes_ |
A container for socket code tables. More... | |
ImmediateControlField * | immediateField_ |
The immediate control field. More... | |
LImmDstRegisterFieldContainer | longImmDstRegFields_ |
A container for long immediate register fields. More... | |
TemplateExtraBitCountMap | extraTemplateBits_ |
Extra (padding) bits per instruction template. More... | |
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) |
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.
|
private |
Container type for ImmediateSlotFields.
Definition at line 136 of file BinaryEncoding.hh.
|
private |
Container type for InstructionFormats.
Definition at line 142 of file BinaryEncoding.hh.
|
private |
Container type for LImmDstRegisterFields.
Definition at line 140 of file BinaryEncoding.hh.
|
private |
Container type for MoveSlots.
Definition at line 134 of file BinaryEncoding.hh.
|
private |
Container type for SocketCodeTables.
Definition at line 138 of file BinaryEncoding.hh.
|
private |
Template extra bit count container.
Definition at line 144 of file BinaryEncoding.hh.
BinaryEncoding::BinaryEncoding | ( | ) |
BinaryEncoding::BinaryEncoding | ( | const ObjectState * | state | ) |
The constructor.
Loads the state of the object from the given ObjectState tree.
ObjectStateLoadingException | If an error occurs while loading the state. |
Definition at line 78 of file BinaryEncoding.cc.
References loadState().
|
virtual |
The destructor.
Definition at line 86 of file BinaryEncoding.cc.
References deleteImmediateSlots(), deleteInstructionFormats(), deleteLongImmDstRegisterFields(), deleteMoveSlots(), deleteSocketCodes(), hasImmediateControlField(), and immediateField_.
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.
slot | The immediate slot to be added. |
ObjectAlreadyExists | If the encoding map contains an immediate slot with the same name already. |
Definition at line 300 of file BinaryEncoding.cc.
References assert, hasImmediateSlot(), immediateSlots_, ImmediateSlotField::name(), and ImmediateSlotField::parent().
Referenced by ImmediateSlotField::ImmediateSlotField().
void BinaryEncoding::addInstructionFormat | ( | InstructionFormat & | format | ) |
Adds the given instruction format to the encoding map.
format | The instruction format to be added. |
ObjectAlreadyExists | If the encoding map already contains a a socket code table with the same name as the given table. |
Definition at line 538 of file BinaryEncoding.cc.
References assert, hasInstructionFormat(), instructionFormats_, InstructionFormat::name(), and InstructionFormat::parent().
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!
field | The field to add. |
Definition at line 459 of file BinaryEncoding.cc.
References assert, longImmDstRegFields_, and LImmDstRegisterField::parent().
Referenced by LImmDstRegisterField::LImmDstRegisterField().
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.
slot | The move slot to be added. |
ObjectAlreadyExists | If the encoding map contains a slot with the same name already. |
Definition at line 183 of file BinaryEncoding.cc.
References assert, hasMoveSlot(), moveSlots_, MoveSlot::name(), and MoveSlot::parent().
Referenced by MoveSlot::MoveSlot().
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.
table | The socket code table to be added. |
ObjectAlreadyExists | If the encoding map already contains a socket code table with the same name as the given table. |
Definition at line 625 of file BinaryEncoding.cc.
References assert, hasSocketCodeTable(), SocketCodeTable::name(), SocketCodeTable::parent(), and socketCodes_.
Referenced by SocketCodeTable::SocketCodeTable().
|
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.
position | The relative position. |
OutOfRange | If the given position is negative or not smaller than the number of child fields. |
Reimplemented from InstructionField.
Definition at line 704 of file BinaryEncoding.cc.
References childFieldCount(), hasImmediateControlField(), immediateControlField(), immediateSlot(), immediateSlotCount(), NullInstructionField::instance(), longImmDstRegisterField(), longImmDstRegisterFieldCount(), moveSlot(), moveSlotCount(), and InstructionField::relativePosition().
Referenced by CodeCompressorPlugin::bemInstructionBits(), and printInstructionLayout().
|
virtual |
Returns the number of immediate child fields (move slots + immediate slots + immediate control field).
Implements InstructionField.
Definition at line 681 of file BinaryEncoding.cc.
References hasImmediateControlField(), immediateSlotCount(), longImmDstRegisterFieldCount(), and moveSlotCount().
Referenced by childField(), and printInstructionLayout().
|
private |
Deletes all the immediate slots contained by the encoding map.
Definition at line 961 of file BinaryEncoding.cc.
References SequenceTools::deleteAllItems(), and immediateSlots_.
Referenced by ~BinaryEncoding().
|
private |
Deletes all the instruction formats contained by the encoding map.
Definition at line 988 of file BinaryEncoding.cc.
References SequenceTools::deleteAllItems(), and instructionFormats_.
Referenced by ~BinaryEncoding().
|
private |
Deletes all the long immediate destination register fields contained by the encoding map.
Definition at line 971 of file BinaryEncoding.cc.
References SequenceTools::deleteAllItems(), and longImmDstRegFields_.
Referenced by ~BinaryEncoding().
|
private |
Deletes all the move slots contained by the encoding map.
Definition at line 952 of file BinaryEncoding.cc.
References SequenceTools::deleteAllItems(), and moveSlots_.
Referenced by ~BinaryEncoding().
|
private |
Deletes all the socket code tables contained by the encoding map.
Definition at line 980 of file BinaryEncoding.cc.
References SequenceTools::deleteAllItems(), and socketCodes_.
Referenced by ~BinaryEncoding().
bool BinaryEncoding::hasImmediateControlField | ( | ) | const |
Tells whether the instruction word has an immediate control field.
Definition at line 334 of file BinaryEncoding.cc.
References immediateField_.
Referenced by BEMValidator::checkImmediateControlField(), childField(), childFieldCount(), CodeCompressorPlugin::firstMoveSlotIndex(), immediateControlField(), DefaultDecoderGenerator::instructionTemplateCondition(), printImmediateControlField(), saveState(), setImmediateControlField(), unsetImmediateControlField(), width(), DefaultDecoderGenerator::writeInstructionDismembering(), DefaultDecoderGenerator::writeLongImmediateTagSignal(), DefaultDecoderGenerator::writeLongImmediateWriteProcess(), and ~BinaryEncoding().
bool BinaryEncoding::hasImmediateSlot | ( | const std::string & | name | ) | const |
Tells whether the encoding map contains an immediate slot with the given name.
name | The name of the immediate slot. |
Definition at line 252 of file BinaryEncoding.cc.
References immediateSlots_, and ImmediateSlotField::name().
Referenced by addImmediateSlot(), and BEMValidator::checkImmediateSlot().
bool BinaryEncoding::hasInstructionFormat | ( | const std::string | name | ) | const |
Tells whether the binary encoding has an instruction format with the given name.
name | The name. |
Definition at line 502 of file BinaryEncoding.cc.
References instructionFormats_.
Referenced by addInstructionFormat().
bool BinaryEncoding::hasMoveSlot | ( | const std::string & | name | ) | const |
Tells whether the encoding map contains a move slot with the given (bus) name.
name | The bus name. |
Definition at line 138 of file BinaryEncoding.cc.
References moveSlots_, and MoveSlot::name().
Referenced by addMoveSlot(), BEMValidator::checkMoveSlot(), DefaultDecoderGenerator::writeSquashSignalGenerationProcess(), and DefaultDecoderGenerator::writeSquashSignals().
|
private |
Tells whether the encoding map contains a socket code table with the given name.
name | The name. |
Definition at line 935 of file BinaryEncoding.cc.
References SocketCodeTable::name(), and socketCodes_.
Referenced by addSocketCodeTable().
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).
Definition at line 348 of file BinaryEncoding.cc.
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().
ImmediateSlotField & BinaryEncoding::immediateSlot | ( | const std::string & | name | ) | const |
Returns the immediate slot of the given name.
name | The name of the immediate slot. |
InstanceNotFound | If the encoding map does not contain an immediate slot with the given name. |
Definition at line 276 of file BinaryEncoding.cc.
References immediateSlots_, and ImmediateSlotField::name().
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.
index | The index. |
OutOfRange | If 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.
References immediateSlotCount(), and immediateSlots_.
Referenced by BEMValidator::checkImmediateSlot(), childField(), saveState(), width(), DefaultDecoderGenerator::writeImmediateSlotSignals(), DefaultDecoderGenerator::writeInstructionDismembering(), and DefaultDecoderGenerator::writeInstructionTemplateProcedures().
int BinaryEncoding::immediateSlotCount | ( | ) | const |
Returns the number of immediate slots in the instruction.
Definition at line 216 of file BinaryEncoding.cc.
References immediateSlots_.
Referenced by childField(), childFieldCount(), immediateSlot(), saveState(), width(), DefaultDecoderGenerator::writeImmediateSlotSignals(), and DefaultDecoderGenerator::writeInstructionDismembering().
InstructionFormat & BinaryEncoding::instructionFormat | ( | int | index | ) | const |
Returns the instruction format with the given index.
index | The index. |
OutOfRange | If 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.
References __func__, instructionFormatCount(), and instructionFormats_.
Referenced by llvm::LLVMTCERISCVIntrinsicsLowering::findRFormat(), and ProGe::RV32MicroCodeGenerator::initializeOperations().
int BinaryEncoding::instructionFormatCount | ( | ) | const |
Returns the number of instruction formats in the in binary encoding.
Definition at line 488 of file BinaryEncoding.cc.
References instructionFormats_.
Referenced by llvm::LLVMTCERISCVIntrinsicsLowering::findRFormat(), ProGe::RV32MicroCodeGenerator::initializeOperations(), instructionFormat(), and saveState().
|
virtual |
Loads the state of the binary encoding map from the given ObjectState tree.
state | The ObjectState tree. |
ObjectStateLoadingException | If an error occurs while loading the state. |
Reimplemented from InstructionField.
Definition at line 807 of file BinaryEncoding.cc.
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().
int BinaryEncoding::longestTemplateExtraBits | ( | ) | const |
Returns the extra template bit amount in the largest template in the machine. Needed for instructionField's bitPosition-method.
Definition at line 657 of file BinaryEncoding.cc.
References immediateField_, ImmediateControlField::instructionTemplate(), ImmediateControlField::templateCount(), templateExtraBits(), and width().
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.
iTemp | Name of the instruction template. |
dstUnit | Name of the immediate unit. |
InstanceNotFound | If there is no such field. |
Definition at line 434 of file BinaryEncoding.cc.
References __func__, LImmDstRegisterField::immediateUnit(), longImmDstRegisterField(), longImmDstRegisterFieldCount(), and LImmDstRegisterField::usedByInstructionTemplate().
LImmDstRegisterField & BinaryEncoding::longImmDstRegisterField | ( | int | index | ) | const |
Returns a long immediate destination register field by the given index.
index | The index. |
OutOfRange | If the index is negative or not smaller than the number of long immediate destination register fields. |
Definition at line 415 of file BinaryEncoding.cc.
References __func__, longImmDstRegFields_, and longImmDstRegisterFieldCount().
Referenced by BEMValidator::checkLImmDstRegisterFields(), childField(), CodeCompressorPlugin::firstMoveSlotIndex(), longImmDstRegisterField(), printBEMInfo(), saveState(), width(), and DefaultDecoderGenerator::writeInstructionTemplateProcedures().
int BinaryEncoding::longImmDstRegisterFieldCount | ( | ) | const |
Returns the number of long immediate destination register fields in the instruction.
Definition at line 400 of file BinaryEncoding.cc.
References longImmDstRegFields_.
Referenced by BEMValidator::checkLImmDstRegisterFields(), childField(), childFieldCount(), CodeCompressorPlugin::firstMoveSlotIndex(), longImmDstRegisterField(), printBEMInfo(), saveState(), and width().
MoveSlot & BinaryEncoding::moveSlot | ( | const std::string & | name | ) | const |
Returns the move slot that programs the bus identified by the given name.
The | bus name. |
InstanceNotFound | If the encoding map does not contain a move slot with the given name. |
Definition at line 160 of file BinaryEncoding.cc.
References moveSlots_, and MoveSlot::name().
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.
index | The index. |
OutOfRange | If 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.
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().
int BinaryEncoding::moveSlotCount | ( | ) | const |
Returns the number of move slots in the instruction.
Definition at line 104 of file BinaryEncoding.cc.
References moveSlots_.
Referenced by childField(), childFieldCount(), DestinationField::DestinationField(), ProGe::RV32MicroCodeGenerator::findBusWidths(), BEMGenerator::generate(), moveSlot(), CodeCompressorPlugin::moveSlotCount(), printBEMInfo(), saveState(), SourceField::SourceField(), width(), DefaultDecoderGenerator::writeInstructionDismembering(), DefaultDecoderGenerator::writeMoveFieldSignals(), and SocketCodeTable::~SocketCodeTable().
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.
slot | The immediate slot to be removed. |
Definition at line 320 of file BinaryEncoding.cc.
References assert, immediateSlots_, ImmediateSlotField::parent(), and ContainerTools::removeValueIfExists().
Referenced by ImmediateSlotField::~ImmediateSlotField().
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.
format | The instruction format to be removed. |
Definition at line 558 of file BinaryEncoding.cc.
References assert, instructionFormats_, InstructionFormat::parent(), and ContainerTools::removeValueIfExists().
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!
field | The field to remove. |
Definition at line 475 of file BinaryEncoding.cc.
References assert, longImmDstRegFields_, LImmDstRegisterField::parent(), and ContainerTools::removeValueIfExists().
Referenced by LImmDstRegisterField::~LImmDstRegisterField().
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.
slot | The move slot to be removed. |
Definition at line 203 of file BinaryEncoding.cc.
References assert, moveSlots_, MoveSlot::parent(), and ContainerTools::removeValueIfExists().
Referenced by MoveSlot::~MoveSlot().
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.
table | The socket code table to be removed. |
Definition at line 645 of file BinaryEncoding.cc.
References assert, SocketCodeTable::parent(), ContainerTools::removeValueIfExists(), and socketCodes_.
Referenced by SocketCodeTable::~SocketCodeTable().
|
virtual |
Saves the state of the binary encoding map to an ObjectState tree.
Reimplemented from InstructionField.
Definition at line 858 of file BinaryEncoding.cc.
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, ImmediateSlotField::saveState(), LImmDstRegisterField::saveState(), MoveSlot::saveState(), SocketCodeTable::saveState(), ObjectState::setValue(), socketCodeTable(), and socketCodeTableCount().
Referenced by ProGe::ProGeUI::loadBinaryEncoding(), and BEMSerializer::writeBinaryEncoding().
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.
field | The immediate control field to be added. |
ObjectAlreadyExists | If the instruction word already has an immediate control field. |
Definition at line 367 of file BinaryEncoding.cc.
References assert, hasImmediateControlField(), immediateField_, and ImmediateControlField::parent().
Referenced by ImmediateControlField::ImmediateControlField().
void BinaryEncoding::setTemplateExtraBits | ( | const TCEString & | templateName, |
int | bitCount | ||
) |
Sets the extra padding bit count for an instruction template
Definition at line 995 of file BinaryEncoding.cc.
References extraTemplateBits_.
Referenced by loadState().
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.
name | Name of the table. |
Definition at line 601 of file BinaryEncoding.cc.
References NullSocketCodeTable::instance(), SocketCodeTable::name(), socketCodeTable(), and socketCodeTableCount().
SocketCodeTable & BinaryEncoding::socketCodeTable | ( | int | index | ) | const |
Returns the socket code table at the given index.
index | The index. |
OutOfRange | If the given index is negative or not smaller than the number of socket code tables in the encoding map. |
Definition at line 583 of file BinaryEncoding.cc.
References socketCodes_, and socketCodeTableCount().
Referenced by SocketCodeTable::hasParentSCTable(), saveState(), socketCodeTable(), and SocketEncoding::SocketEncoding().
int BinaryEncoding::socketCodeTableCount | ( | ) | const |
Returns the number of socket code tables contained by the encoding map.
Definition at line 569 of file BinaryEncoding.cc.
References socketCodes_.
Referenced by SocketCodeTable::hasParentSCTable(), saveState(), and socketCodeTable().
int BinaryEncoding::templateExtraBits | ( | const TCEString & | templateName | ) | const |
Definition at line 1001 of file BinaryEncoding.cc.
References extraTemplateBits_.
Referenced by longestTemplateExtraBits(), and width().
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.
References assert, hasImmediateControlField(), immediateControlField(), immediateField_, and InstructionField::parent().
Referenced by ImmediateControlField::~ImmediateControlField().
|
virtual |
Returns the bit width of the maximum width instruction word defined by this encoding map.
If | set, returns the instruction width of the given instruction template, otherwise the maximum. |
Implements InstructionField.
Definition at line 751 of file BinaryEncoding.cc.
References immediateField_, ImmediateControlField::instructionTemplate(), and ImmediateControlField::templateCount().
Referenced by longestTemplateExtraBits(), and width().
|
virtual |
Returns the bit width of the instruction word defined by an instruction template in this encoding map.
Definition at line 768 of file BinaryEncoding.cc.
References InstructionField::extraBits(), hasImmediateControlField(), immediateControlField(), immediateSlot(), immediateSlotCount(), longImmDstRegisterField(), longImmDstRegisterFieldCount(), moveSlot(), moveSlotCount(), templateExtraBits(), ImmediateSlotField::width(), LImmDstRegisterField::width(), ImmediateControlField::width(), MoveSlot::width(), and width().
Referenced by CodeCompressorPlugin::bemBits(), BEMValidator::checkImemMauWidth(), ProgramImageGenerator::generateProgramImage(), main(), printBEMInfo(), ProGe::ProGeUI::readImemParameters(), CodeCompressorPlugin::setMachine(), and MachineCanvas::updateMachine().
|
private |
Extra (padding) bits per instruction template.
Definition at line 166 of file BinaryEncoding.hh.
Referenced by saveState(), setTemplateExtraBits(), and templateExtraBits().
|
private |
The immediate control field.
Definition at line 162 of file BinaryEncoding.hh.
Referenced by hasImmediateControlField(), immediateControlField(), longestTemplateExtraBits(), setImmediateControlField(), unsetImmediateControlField(), width(), and ~BinaryEncoding().
|
private |
A container for immediate slots.
Definition at line 158 of file BinaryEncoding.hh.
Referenced by addImmediateSlot(), deleteImmediateSlots(), hasImmediateSlot(), immediateSlot(), immediateSlotCount(), and removeImmediateSlot().
|
private |
A container for instruction formats.
Definition at line 154 of file BinaryEncoding.hh.
Referenced by addInstructionFormat(), deleteInstructionFormats(), hasInstructionFormat(), instructionFormat(), instructionFormatCount(), removeInstructionFormat(), and saveState().
|
private |
A container for long immediate register fields.
Definition at line 164 of file BinaryEncoding.hh.
Referenced by addLongImmDstRegisterField(), deleteLongImmDstRegisterFields(), longImmDstRegisterField(), longImmDstRegisterFieldCount(), and removeLongImmDstRegisterField().
|
private |
A container for move slots.
Definition at line 156 of file BinaryEncoding.hh.
Referenced by addMoveSlot(), deleteMoveSlots(), hasMoveSlot(), moveSlot(), moveSlotCount(), and removeMoveSlot().
|
static |
ObjectState name for binary encoding.
Definition at line 126 of file BinaryEncoding.hh.
Referenced by BEMSerializer::convertToOMFormat(), loadState(), and saveState().
|
static |
Definition at line 127 of file BinaryEncoding.hh.
|
static |
Definition at line 129 of file BinaryEncoding.hh.
Referenced by loadState(), and saveState().
|
static |
Definition at line 128 of file BinaryEncoding.hh.
Referenced by BEMSerializer::convertToFileFormat(), BEMSerializer::convertToOMFormat(), loadState(), and saveState().
|
static |
Definition at line 130 of file BinaryEncoding.hh.
Referenced by loadState(), and saveState().
|
private |
A container for socket code tables.
Definition at line 160 of file BinaryEncoding.hh.
Referenced by addSocketCodeTable(), deleteSocketCodes(), hasSocketCodeTable(), removeSocketCodeTable(), socketCodeTable(), and socketCodeTableCount().