OpenASIP
2.0
|
#include <TerminalFUPort.hh>
Public Member Functions | |
TerminalFUPort (const TTAMachine::FUPort &opcodeSettingPort, const TTAMachine::HWOperation &opcode) | |
TerminalFUPort (const TTAMachine::BaseFUPort &port) | |
TerminalFUPort (const TTAMachine::HWOperation &operation, int opIndex) | |
virtual | ~TerminalFUPort () |
virtual bool | isOpcodeSetting () const |
virtual bool | isTriggering () const |
virtual bool | isFUPort () const |
virtual bool | isRA () const |
virtual const TTAMachine::FunctionUnit & | functionUnit () const |
virtual Operation & | operation () const |
virtual Operation & | hintOperation () const |
virtual void | setOperation (const TTAMachine::HWOperation &hwOp) |
void | setHintOperation (const char *name) |
virtual int | operationIndex () const |
virtual void | setOperationIndex (int index) |
virtual const TTAMachine::Port & | port () const |
virtual Terminal * | copy () const |
virtual bool | equals (const Terminal &other) const |
virtual const TTAMachine::HWOperation * | hwOperation () const |
bool | hasProgramOperation () const |
these methods are used to group terminals belonging to a single program operation invocation More... | |
void | setProgramOperation (ProgramOperationPtr po) |
ProgramOperationPtr | programOperation () const |
virtual TCEString | toString () const |
Public Member Functions inherited from TTAProgram::Terminal | |
Terminal () | |
virtual | ~Terminal () |
virtual bool | isImmediate () const |
virtual bool | isAddress () const |
virtual bool | isInstructionAddress () const |
virtual bool | isImmediateRegister () const |
virtual bool | isGPR () const |
virtual bool | isBasicBlockReference () const |
virtual bool | isProgramOperationReference () const |
virtual bool | isCodeSymbolReference () const |
virtual bool | isUniversalMachineRegister () const |
virtual SimValue | value () const |
virtual Address | address () const |
virtual const InstructionReference & | instructionReference () const |
virtual InstructionReference & | instructionReference () |
virtual const TTAMachine::RegisterFile & | registerFile () const |
virtual const TTAMachine::ImmediateUnit & | immediateUnit () const |
virtual const BasicBlock & | basicBlock () const |
virtual int | index () const |
virtual void | setIndex (int index) |
virtual void | setInstructionReference (InstructionReference ref) |
bool | operator== (const Terminal &other) const |
Private Member Functions | |
TerminalFUPort (const TerminalFUPort &tfup) | |
TerminalFUPort & | operator= (const TerminalFUPort &) |
Assignment not allowed. More... | |
int | findNewOperationIndex () const |
Private Attributes | |
const TTAMachine::BaseFUPort & | port_ |
Port of the unit. More... | |
const TTAMachine::HWOperation * | operation_ |
Operation code transported to the port. More... | |
Operation * | opcode_ |
The OSAL operation. More... | |
int | opIndex_ |
Operation index. More... | |
ProgramOperationPtr | po_ |
The ProgramOperation this terminal belongs to, if applicable. The instance is shared by all the TerminalFUs belonging to the operation. More... | |
Represents an input or output port of a function unit and (when applicable) the operation code written into it.
Notice that, in principle, operation codes can be written into FU output ports.
Definition at line 56 of file TerminalFUPort.hh.
TTAProgram::TerminalFUPort::TerminalFUPort | ( | const TTAMachine::FUPort & | opcodeSettingPort, |
const TTAMachine::HWOperation & | opcode | ||
) |
Creates a destination that writes to an opcode setting FU port.
opcodeSettingPort | The port of the terminal. |
opcode | The operation to trigger. |
Definition at line 72 of file TerminalFUPort.cc.
References __func__, assert, Exception::errorMessage(), TTAMachine::HWOperation::io(), TTAMachine::FUPort::isOpcodeSetting(), TTAMachine::HWOperation::name(), opcode_, OperationPool::operation(), operation_, opIndex_, and Exception::setCause().
Referenced by copy().
TTAProgram::TerminalFUPort::TerminalFUPort | ( | const TTAMachine::BaseFUPort & | port | ) |
Constructor.
port | The port of the terminal. |
Definition at line 57 of file TerminalFUPort.cc.
References __func__, TTAMachine::BaseFUPort::isOpcodeSetting(), and port_.
TTAProgram::TerminalFUPort::TerminalFUPort | ( | const TTAMachine::HWOperation & | operation, |
int | opIndex | ||
) |
Constructor.
Definition at line 104 of file TerminalFUPort.cc.
References __func__, Exception::errorMessage(), TTAMachine::HWOperation::name(), Operation::name(), opcode_, OperationPool::operation(), operation(), operation_, port_, and Exception::setCause().
|
virtual |
|
private |
Copy Constructor. private, only called internally by copy().
tfup | object to copy from. |
Definition at line 140 of file TerminalFUPort.cc.
|
virtual |
Creates an exact copy of the terminal and returns it.
Implements TTAProgram::Terminal.
Definition at line 305 of file TerminalFUPort.cc.
References TerminalFUPort().
|
virtual |
Checks if terminals are equal.
other | Terminal to compare. |
Implements TTAProgram::Terminal.
Definition at line 316 of file TerminalFUPort.cc.
References abortWithError, TTAProgram::Terminal::isFUPort(), TTAMachine::BaseFUPort::isOpcodeSetting(), operation_, and port_.
|
private |
Return operation index bound to the terminal port for a given operation.
Used if operation in terminal is changed.
Definition at line 366 of file TerminalFUPort.cc.
References TTAMachine::HWOperation::io(), TTAMachine::HWOperation::name(), TTAMachine::FunctionUnit::operation(), operation_, TTAMachine::BaseFUPort::parentUnit(), and port_.
|
virtual |
Returns the function unit of the port.
WrongSubclass | never. |
Reimplemented from TTAProgram::Terminal.
Definition at line 202 of file TerminalFUPort.cc.
References TTAMachine::BaseFUPort::parentUnit(), and port_.
Referenced by ProcedurePass::copyCfgToProcedure(), OutputFUBroker::unassign(), and InputFUBroker::unassign().
|
inline |
these methods are used to group terminals belonging to a single program operation invocation
Definition at line 91 of file TerminalFUPort.hh.
References po_.
Referenced by DataDependenceGraphBuilder::processOperand(), and DataDependenceGraphBuilder::processTriggerPO().
|
virtual |
Return the operation to which this terminal was originally bound.
NOTE! : Method must not be used for checkin if terminal contains opcode. See. operation().
Method is mainly used for preserving information to which operation port reference is bound, during TPEF -> POM -> TPEF write cycles.
Reimplemented from TTAProgram::Terminal.
Definition at line 262 of file TerminalFUPort.cc.
References NullOperation::instance(), and opcode_.
Referenced by OutputFUBroker::allAvailableResources(), InputFUBroker::allAvailableResources(), OutputFUBroker::assign(), InputFUBroker::assign(), POMDisassembler::createFUPort(), SimpleIfConverter::fixTerminalPO(), TTAProgram::Move::isCall(), TTAProgram::Move::isControlFlowMove(), TTAProgram::Move::isJump(), DataDependenceGraphBuilder::processDestination(), TTAProgram::ProgramWriter::terminalResource(), and DataDependenceGraphBuilder::updateBB().
|
virtual |
Returns a pointer to the HW operation
Definition at line 379 of file TerminalFUPort.cc.
References operation_.
Referenced by ControlFlowGraph::buildMBBFromBB(), POMDisassembler::createFUPort(), CodeCompressorPlugin::encodeFUTerminal(), CompiledSimCodeGenerator::generateInstruction(), DataDependenceEdge::latencySt(), and DataDependenceEdge::saveState().
|
virtual |
Tells whether the terminal is a function unit port (possibly, including an operation code).
Reimplemented from TTAProgram::Terminal.
Definition at line 158 of file TerminalFUPort.cc.
|
virtual |
Tells whether terminal transports an opcode to a function unit port.
WrongSubclass | never. |
Reimplemented from TTAProgram::Terminal.
Definition at line 180 of file TerminalFUPort.cc.
References TTAMachine::BaseFUPort::isOpcodeSetting(), and port_.
Referenced by POMDisassembler::createFUPort(), TTAProgram::Move::isCall(), TTAProgram::Move::isControlFlowMove(), TTAProgram::Move::isJump(), DataDependenceGraphBuilder::processDestination(), and TTAProgram::ProgramWriter::terminalResource().
|
virtual |
Tells whether the terminal is the return address port of gcu.
Reimplemented from TTAProgram::Terminal.
Definition at line 168 of file TerminalFUPort.cc.
References port().
|
virtual |
Tells whether terminal is a triggering port.
WrongSubclass | never. |
Reimplemented from TTAProgram::Terminal.
Definition at line 191 of file TerminalFUPort.cc.
References TTAMachine::BaseFUPort::isTriggering(), and port_.
Referenced by TTAProgram::Move::isTriggering().
|
virtual |
Return the operation code transported into the function unit port.
InvalidData | If terminal does not set opcode for FU. |
Reimplemented from TTAProgram::Terminal.
Definition at line 213 of file TerminalFUPort.cc.
References __func__, TTAMachine::BaseFUPort::isOpcodeSetting(), opcode_, and port_.
Referenced by POMDisassembler::createFUPort(), TTAProgram::Move::isCall(), TTAProgram::Move::isControlFlowMove(), TTAProgram::Move::isJump(), TerminalFUPort(), and TTAProgram::ProgramWriter::terminalResource().
|
virtual |
Return the index that identifies the operation input or output that is represented by this terminal.
WrongSubclass | Never. |
InvalidData | If the terminal is of the the right class type, but the FU port of the terminal is not opcode-setting and bears no auxiliary "hint operation" information. |
Reimplemented from TTAProgram::Terminal.
Definition at line 238 of file TerminalFUPort.cc.
References __func__, opcode_, operation_, and opIndex_.
Referenced by OutputFUBroker::allAvailableResources(), InputFUBroker::allAvailableResources(), OutputFUBroker::assign(), InputFUBroker::assign(), and MachineConnectivityCheck::busConnectedToAnyFU().
|
private |
Assignment not allowed.
|
virtual |
Return the port.
WrongSubclass | never. |
Reimplemented from TTAProgram::Terminal.
Definition at line 291 of file TerminalFUPort.cc.
References port_.
Referenced by OutputFUBroker::allAvailableResources(), InputFUBroker::allAvailableResources(), OutputFUBroker::assign(), InputFUBroker::assign(), POMDisassembler::createFUPort(), isRA(), and toString().
|
inline |
Definition at line 97 of file TerminalFUPort.hh.
References po_.
Referenced by InputFUBroker::assign(), ControlFlowGraph::buildMBBFromBB(), llvm::LLVMTCEIRBuilder::buildTCECFG(), SimpleIfConverter::fixTerminalPO(), DataDependenceGraphBuilder::processOperand(), and DataDependenceGraphBuilder::processTriggerPO().
void TTAProgram::TerminalFUPort::setHintOperation | ( | const char * | name | ) |
Definition at line 270 of file TerminalFUPort.cc.
References assert, NullOperation::instance(), opcode_, OperationPool::operation(), and operation_.
Referenced by ProgramOperation::setOperation().
|
virtual |
Definition at line 278 of file TerminalFUPort.cc.
References TTAMachine::HWOperation::name(), opcode_, OperationPool::operation(), and operation_.
|
inlinevirtual |
Definition at line 82 of file TerminalFUPort.hh.
References TTAProgram::Terminal::index(), and opIndex_.
|
inline |
Definition at line 94 of file TerminalFUPort.hh.
References po_.
Referenced by InputFUBroker::assign(), llvm::LLVMTCEIRBuilder::createMoveNode(), and SimpleIfConverter::fixTerminalPO().
|
virtual |
Implements TTAProgram::Terminal.
Definition at line 384 of file TerminalFUPort.cc.
References TTAMachine::HWOperation::name(), operation_, port(), DisassemblyFUOpcodePort::toString(), and DisassemblyFUPort::toString().
|
private |
The OSAL operation.
Definition at line 117 of file TerminalFUPort.hh.
Referenced by hintOperation(), operation(), operationIndex(), setHintOperation(), setOperation(), and TerminalFUPort().
|
private |
Operation code transported to the port.
Definition at line 115 of file TerminalFUPort.hh.
Referenced by equals(), findNewOperationIndex(), hwOperation(), operationIndex(), setHintOperation(), setOperation(), TerminalFUPort(), and toString().
|
private |
Operation index.
Definition at line 119 of file TerminalFUPort.hh.
Referenced by operationIndex(), setOperationIndex(), and TerminalFUPort().
|
private |
The ProgramOperation this terminal belongs to, if applicable. The instance is shared by all the TerminalFUs belonging to the operation.
Definition at line 123 of file TerminalFUPort.hh.
Referenced by hasProgramOperation(), programOperation(), and setProgramOperation().
|
private |
Port of the unit.
Definition at line 113 of file TerminalFUPort.hh.
Referenced by equals(), findNewOperationIndex(), functionUnit(), isOpcodeSetting(), isTriggering(), operation(), port(), and TerminalFUPort().