OpenASIP
2.0
|
#include <TemplateSlot.hh>
Public Member Functions | |
TemplateSlot (const Bus &slot, int width, ImmediateUnit &destination) | |
TemplateSlot (const ImmediateSlot &slot, int width, ImmediateUnit &destination) | |
TemplateSlot (const Bus &slot) | |
virtual | ~TemplateSlot () |
int | width () const |
std::string | slot () const |
ImmediateUnit * | destination () const |
ObjectState * | saveState () const |
const Bus * | bus () const |
Static Public Attributes | |
static const std::string | OSNAME_TEMPLATE_SLOT = "template_slot" |
ObjectState name for template slot. More... | |
static const std::string | OSKEY_SLOT = "slot" |
ObjectState attribute key for slot name. More... | |
static const std::string | OSKEY_WIDTH = "width" |
ObjectState attribute key for bit width. More... | |
static const std::string | OSKEY_DESTINATION = "destination" |
ObjectState attribute key for destination. More... | |
static const std::string | OSKEY_RF_READ = "rf_read" |
static const std::string | OSKEY_RF_WRITE = "rf_write" |
static const std::string | OSKEY_FU_READ = "fu_read" |
static const std::string | OSKEY_FU_WRITE = "fu_write" |
Private Attributes | |
const Bus * | bus_ |
The bus which is programmed by the instruction bit field of this template slot. More... | |
const ImmediateSlot * | immSlot_ |
The immediate slot which is programmed by the instruction bit field of this template slot. More... | |
int | width_ |
The number of bits that can be encoded in this instruction field. More... | |
ImmediateUnit * | destination_ |
Destination unit. More... | |
Repsesents a bit field of the TTA instruction that is used to encode a piece of a long immediate for a given instruction template or a NOP move.
Definition at line 55 of file TemplateSlot.hh.
TTAMachine::TemplateSlot::TemplateSlot | ( | const Bus & | slot, |
int | width, | ||
ImmediateUnit & | destination | ||
) |
Constructor.
slot | The bus or which is programmed by the instruction bit field of this template slot. |
width | The number of significant bits that can be encoded in this instruction field. |
destination | The destination ImmediateUnit, that is, the ImmediateUnit that contains the registers that can be written with the bits in this template slot. |
Definition at line 64 of file TemplateSlot.cc.
TTAMachine::TemplateSlot::TemplateSlot | ( | const ImmediateSlot & | slot, |
int | width, | ||
ImmediateUnit & | destination | ||
) |
Constructor.
slot | The immediate slot which is programmed by the instruction bit field of this template slot. |
width | The number of significant bits that can be encoded in this instruction field. |
destination | The destination ImmediateUnit, that is, the ImmediateUnit that contains the registers that can be written with the bits in this template slot. |
Definition at line 82 of file TemplateSlot.cc.
TTAMachine::TemplateSlot::TemplateSlot | ( | const Bus & | slot | ) |
Creates an implicit slot in a template that does not target an ImmediateUnit.
slot | The bus or which is programmed by the instruction bit field of this template slot. |
Definition at line 97 of file TemplateSlot.cc.
|
virtual |
const Bus* TTAMachine::TemplateSlot::bus | ( | ) | const |
Referenced by BusBroker::buildResources().
ImmediateUnit* TTAMachine::TemplateSlot::destination | ( | ) | const |
Referenced by BusBroker::buildResources(), TTAMachine::InstructionTemplate::destinationOfSlot(), TTAMachine::InstructionTemplate::destinationUsesSlot(), TTAMachine::InstructionTemplate::isOneOfDestinations(), TTAMachine::InstructionTemplate::numberOfDestinations(), TTAMachine::InstructionTemplate::numberOfSlots(), ImmediateGenerator::printImmediateTemplates(), TTAMachine::InstructionTemplate::removeSlots(), saveState(), TTAMachine::InstructionTemplate::slotOfDestination(), and TTAMachine::InstructionTemplate::supportedWidth().
ObjectState * TTAMachine::TemplateSlot::saveState | ( | ) | const |
Saves the state of the object into an ObjectState instance.
Definition at line 113 of file TemplateSlot.cc.
References destination(), OSKEY_DESTINATION, OSKEY_SLOT, OSKEY_WIDTH, OSNAME_TEMPLATE_SLOT, ObjectState::setAttribute(), slot(), and width().
Referenced by TTAMachine::InstructionTemplate::saveState().
std::string TTAMachine::TemplateSlot::slot | ( | ) | const |
int TTAMachine::TemplateSlot::width | ( | ) | const |
|
private |
The bus which is programmed by the instruction bit field of this template slot.
Definition at line 100 of file TemplateSlot.hh.
|
private |
Destination unit.
Definition at line 110 of file TemplateSlot.hh.
|
private |
The immediate slot which is programmed by the instruction bit field of this template slot.
Definition at line 104 of file TemplateSlot.hh.
|
static |
ObjectState attribute key for destination.
Definition at line 85 of file TemplateSlot.hh.
Referenced by TTAMachine::InstructionTemplate::loadState(), and saveState().
|
static |
Definition at line 91 of file TemplateSlot.hh.
|
static |
Definition at line 93 of file TemplateSlot.hh.
|
static |
Definition at line 87 of file TemplateSlot.hh.
|
static |
Definition at line 89 of file TemplateSlot.hh.
|
static |
ObjectState attribute key for slot name.
Definition at line 81 of file TemplateSlot.hh.
Referenced by TTAMachine::InstructionTemplate::loadState(), and saveState().
|
static |
ObjectState attribute key for bit width.
Definition at line 83 of file TemplateSlot.hh.
Referenced by TTAMachine::InstructionTemplate::loadState(), and saveState().
|
static |
ObjectState name for template slot.
Definition at line 79 of file TemplateSlot.hh.
Referenced by TTAMachine::InstructionTemplate::loadState(), and saveState().
|
private |
The number of bits that can be encoded in this instruction field.
Definition at line 107 of file TemplateSlot.hh.