OpenASIP
2.0
|
#include <InputFUBroker.hh>
Public Member Functions | |
InputFUBroker (std::string, unsigned int initiationInterval=0) | |
virtual | ~InputFUBroker () |
virtual SchedulingResourceSet | allAvailableResources (int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const override |
virtual int | earliestCycle (int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const override |
virtual int | latestCycle (int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const override |
virtual bool | isAlreadyAssigned (int cycle, const MoveNode &node, const TTAMachine::Bus *preassignedBus) const override |
virtual bool | isApplicable (const MoveNode &node, const TTAMachine::Bus *preAssigndBus=0) const override |
virtual void | assign (int cycle, MoveNode &node, SchedulingResource &res, int immWriteCycle, int immRegIndex) override |
virtual void | unassign (MoveNode &node) override |
virtual void | buildResources (const TTAMachine::Machine &target) override |
virtual void | setupResourceLinks (const ResourceMapper &mapper) override |
Public Member Functions inherited from FUBroker | |
FUBroker (std::string name, unsigned int initiationInterval=0) | |
virtual | ~FUBroker () |
Public Member Functions inherited from ResourceBroker | |
ResourceBroker (std::string, unsigned int initiationInterval=0) | |
virtual | ~ResourceBroker () |
virtual bool | isAnyResourceAvailable (int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const |
virtual SchedulingResource & | availableResource (int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const |
virtual bool | isAvailable (SchedulingResource &des, const MoveNode &node, int cycle, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const |
SchedulingResource * | resourceOf (const TTAMachine::MachinePart &mp) const |
virtual const TTAMachine::MachinePart & | machinePartOf (const SchedulingResource &r) const |
bool | hasResourceOf (const TTAMachine::MachinePart &mp) const |
bool | hasResource (const SchedulingResource &r) const |
int | resourceCount () const |
virtual bool | isBusBroker () const |
virtual bool | isITemplateBroker () const |
virtual bool | isIUBroker () const |
virtual bool | isExecutionPipelineBroker () const |
void | validateResources () const |
virtual std::string | brokerName () const |
void | resources (ResourceSet &contents) |
virtual void | setInitiationInterval (unsigned int cycles) |
virtual void | clear () |
virtual void | setMaxCycle (unsigned int) |
Input function unit broker.
Definition at line 55 of file InputFUBroker.hh.
InputFUBroker::InputFUBroker | ( | std::string | name, |
unsigned int | initiationInterval = 0 |
||
) |
Constructor.
Definition at line 68 of file InputFUBroker.cc.
|
virtual |
|
overridevirtual |
Return all resources managed by this broker that can be assigned to the given node in the given cycle.
cycle | Cycle. |
node | Node. |
Reimplemented from ResourceBroker.
Definition at line 89 of file InputFUBroker.cc.
References __func__, abortWithError, MachineConnectivityCheck::addAnnotatedFUs(), TTAProgram::ProgramAnnotation::ANN_ALLOWED_UNIT_DST, TTAProgram::ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_DST, TTAProgram::ProgramAnnotation::ANN_REJECTED_UNIT_DST, assert, InputFUResource::canAssign(), AssocTools::containsKey(), SchedulingResourceSet::count(), debugLogRM, TTAProgram::Move::destination(), MoveNode::destinationOperation(), Exception::errorMessageStack(), FUBroker::findDstFUOfMove(), TTAProgram::Terminal::functionUnit(), TTAMachine::FunctionUnit::hasOperationLowercase(), TTAProgram::TerminalFUPort::hintOperation(), ProgramOperation::inputMove(), ProgramOperation::inputMoveCount(), TTAMachine::Port::inputSocket(), SchedulingResourceSet::insert(), isApplicable(), InputFUResource::isAvailable(), MoveNode::isDestinationOperation(), SchedulingResource::isInputFUResource(), TTAMachine::FUPort::isTriggering(), MoveNode::move(), TTAMachine::Component::name(), Operation::name(), TTAProgram::TerminalFUPort::operationIndex(), TTAMachine::FunctionUnit::operationLowercase(), TTAMachine::HWOperation::port(), TTAProgram::TerminalFUPort::port(), ResourceBroker::resMap_, ResourceBroker::resourceMapper(), ResourceMapper::resourceOf(), ResourceBroker::resourceOf(), and StringTools::stringToLower().
|
overridevirtual |
Mark given resource as in use for the given node, and assign the corresponding machine part (if applicable) to the node's move.
If the node is already assigned to given resource, this method does nothing.
cycle | Cycle. |
node | Node to assign. |
res | Resource representing Input of and FU |
WrongSubclass | If this broker does not recognise the given type of resource. |
InvalidParameters | If he given resource cannot be assigned to given node or no corresponding machine part is found. |
Implements ResourceBroker.
Definition at line 414 of file InputFUBroker.cc.
References __func__, abortWithError, InputFUResource::assign(), ResourceBroker::assignedResources_, TTAProgram::Move::destination(), ResourceBroker::hasResource(), TTAProgram::TerminalFUPort::hintOperation(), isApplicable(), ResourceBroker::machinePartOf(), Operation::name(), TTAMachine::FunctionUnit::operation(), TTAProgram::TerminalFUPort::operationIndex(), TTAProgram::TerminalFUPort::port(), TTAProgram::TerminalFUPort::programOperation(), TTAMachine::ControlUnit::returnAddressPort(), TTAProgram::Move::setDestination(), and TTAProgram::TerminalFUPort::setProgramOperation().
|
overridevirtual |
Build all resource objects of the controlled type required to model scheduling resources of the given target processor.
This method cannot set up the resource links (dependent and related resources) of the constructed resource objects.
target | Target machine. |
Implements ResourceBroker.
Definition at line 503 of file InputFUBroker.cc.
References ResourceBroker::addResource(), TTAMachine::Machine::controlUnit(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::functionUnitNavigator(), ResourceBroker::initiationInterval_, TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), and TTAMachine::FunctionUnit::operationCount().
|
overridevirtual |
Return the earliest cycle, starting from given cycle, where a resource of the type managed by this broker can be assigned to the given node.
cycle | Cycle. |
node | Node. |
Implements ResourceBroker.
Definition at line 320 of file InputFUBroker.cc.
References abortWithError.
|
overridevirtual |
Return true if the given node is already assigned a resource of the type managed by this broker, and the assignment appears valid (that is, the broker has marked that resource as in use in the given cycle).
cycle | Cycle. Not used. |
node | Node. |
Implements ResourceBroker.
Definition at line 365 of file InputFUBroker.cc.
References ResourceBroker::assignedResources_, MapTools::containsKey(), TTAProgram::Terminal::functionUnit(), ResourceBroker::hasResourceOf(), ResourceBroker::instructionIndex(), and TTAProgram::Terminal::isFUPort().
|
overridevirtual |
Return true if the given node needs a resource of the type managed by this broker, false otherwise.
node | Node. |
Implements ResourceBroker.
Definition at line 389 of file InputFUBroker.cc.
References TTAProgram::Move::destination(), TTAProgram::Terminal::isFUPort(), and MoveNode::isMove().
Referenced by allAvailableResources(), assign(), and unassign().
|
overridevirtual |
Return the latest cycle, starting from given cycle, where a resource of the type managed by this broker can be assigned to the given node.
cycle | Cycle. |
node | Node. |
Implements ResourceBroker.
Definition at line 341 of file InputFUBroker.cc.
References abortWithError.
|
overridevirtual |
Complete resource initialisation by creating the references to other resources due to a dependency or a relation. Use the given resource mapper to lookup dependent and related resources using machine parts as keys.
mapper | Resource mapper. |
Implements ResourceBroker.
Definition at line 531 of file InputFUBroker.cc.
References __func__, SchedulingResource::addToDependentGroup(), TTAMachine::Port::inputSocket(), SchedulingResource::isExecutionPipelineResource(), TTAMachine::FunctionUnit::port(), TTAMachine::Unit::portCount(), ResourceBroker::resMap_, ResourceMapper::resourceCount(), ResourceMapper::resourceOf(), and ResourceBroker::setResourceMapper().
|
overridevirtual |
Free the resource type managed by this broker and unassign it from given node.
If this broker is not applicable to the given node, or the node is not assigned a resource of the managed type, this method does nothing.
node | Node. |
Implements ResourceBroker.
Definition at line 474 of file InputFUBroker.cc.
References ResourceBroker::assignedResources_, MapTools::containsKey(), MoveNode::cycle(), TTAProgram::Move::destination(), TTAProgram::TerminalFUPort::functionUnit(), isApplicable(), ResourceBroker::resourceOf(), and InputFUResource::unassign().