OpenASIP
2.0
|
#include <LoopBufferBlock.hh>
Public Member Functions | |
LoopBufferBlock ()=delete | |
LoopBufferBlock (const ProGeContext &context, BaseNetlistBlock *parent=nullptr) | |
virtual | ~LoopBufferBlock () |
void | setBlockWidthParameter (const std::string value) |
void | setBufferSizeParameter (const std::string value) |
void | setIterationPortWidthParameter (const std::string value) |
void | setCoreIdParameter (const std::string value) |
void | setUsageTracingParameter (bool setting) |
const NetlistPort & | lockReqPortIn () const |
const NetlistPort & | lockReqPortOut () const |
const NetlistPort & | lockPortIn () const |
const NetlistPort & | lockPortOut () const |
const NetlistPort & | instructionPortIn () const |
const NetlistPort & | instructionPortOut () const |
const NetlistPort & | startPortIn () const |
const NetlistPort * | stopPortIn () const |
const NetlistPort & | loopBodySizePortIn () const |
const NetlistPort * | loopIterationPortIn () const |
const NetlistPort & | lenCntrPortOut () const |
const NetlistPort & | loopFromImemPortOut () const |
virtual void | write (const Path &targetBaseDir, HDL targetLang=VHDL) const override |
Public Member Functions inherited from ProGe::BaseNetlistBlock | |
BaseNetlistBlock () | |
BaseNetlistBlock (BaseNetlistBlock *parent) | |
BaseNetlistBlock (const std::string &moduleName, const std::string &instanceName, BaseNetlistBlock *parent=nullptr) | |
virtual | ~BaseNetlistBlock () |
const std::string & | instanceName () const |
void | setInstanceName (const std::string &name) |
const std::string & | moduleName () const |
const std::string | name () const |
virtual size_t | subBlockCount () const |
virtual const BaseNetlistBlock & | subBlock (size_t index) const |
virtual bool | hasSubBlock (const std::string &instanceName) const |
virtual bool | isSubBlock (const BaseNetlistBlock &block) const |
virtual bool | hasParameter (const std::string &name) const |
virtual const Parameter & | parameter (const std::string &name) const |
virtual size_t | parameterCount () const |
virtual const Parameter & | parameter (size_t index) const |
virtual size_t | portCount () const |
virtual const NetlistPort & | port (size_t index) const |
virtual std::vector< const NetlistPort * > | portsBy (SignalType type) const |
virtual const NetlistPort & | portBy (SignalType type, size_t index=0) const |
virtual bool | hasPortsBy (SignalType type) const |
virtual const NetlistPort * | port (const std::string &portName, bool partialMatch=true) const |
virtual size_t | portGroupCount () const |
virtual const NetlistPortGroup & | portGroup (size_t index) const |
virtual std::vector< const NetlistPortGroup * > | portGroupsBy (SignalGroupType type) const |
virtual const Netlist & | netlist () const |
virtual bool | hasParentBlock () const |
virtual const BaseNetlistBlock & | parentBlock () const |
virtual bool | isVirtual () const |
virtual void | build () override |
virtual void | connect () override |
virtual void | finalize () override |
virtual void | writeSelf (const Path &targetBaseDir, HDL targetLang=VHDL) const |
virtual size_t | packageCount () const |
virtual const std::string & | package (size_t idx) const |
PortContainerType & | ports () |
virtual bool | isLeaf () const |
BaseNetlistBlock * | shallowCopy (const std::string &instanceName="") const |
Public Member Functions inherited from ProGe::IGenerationPhases | |
virtual | ~IGenerationPhases () |
Private Attributes | |
NetlistPort * | lockReqPortIn_ = nullptr |
NetlistPort * | lockReqPortOut_ = nullptr |
NetlistPort * | lockPortIn_ = nullptr |
NetlistPort * | lockPortOut_ = nullptr |
NetlistPort * | instructionPortIn_ = nullptr |
NetlistPort * | instructionPortOut_ = nullptr |
NetlistPort * | startPortIn_ = nullptr |
NetlistPort * | stopPortIn_ = nullptr |
NetlistPort * | loopBodySizePortIn_ = nullptr |
NetlistPort * | loopIterationPortIn_ = nullptr |
NetlistPort * | lenCntrPortOut_ = nullptr |
NetlistPort * | loopFromImemPortOut_ = nullptr |
std::string | implmenetationFile_ = "" |
std::string | entityStr_ = "tta0" |
Definition at line 51 of file LoopBufferBlock.hh.
|
delete |
ProGe::LoopBufferBlock::LoopBufferBlock | ( | const ProGeContext & | context, |
BaseNetlistBlock * | parent = nullptr |
||
) |
Constructs the loop buffer block that automatically selects suitable implementation.
The constructor inspects operations in the CU of the machine and selects an appropriate loop buffer implementation.
NotAvailable | If the CU does not include an operation, which utilizes the loop buffer. |
Definition at line 58 of file LoopBufferBlock.cc.
References ProGe::BaseNetlistBlock::addParameter(), ProGe::BaseNetlistBlock::addPort(), ProGe::ProGeContext::adf(), assert, ProGe::PortFactory::clockPort(), TTAMachine::Machine::controlUnit(), ProGe::ProGeContext::coreEntityName(), entityStr_, MachineInfo::getOpset(), implmenetationFile_, instructionPortIn_, instructionPortOut_, lenCntrPortOut_, lockPortIn_, lockPortOut_, lockReqPortIn_, lockReqPortOut_, loopBodySizePortIn_, loopFromImemPortOut_, loopIterationPortIn_, ProGe::BaseNetlistBlock::Parameter, ProGe::NetlistPort::rename(), ProGe::PortFactory::resetPort(), ProGe::BaseNetlistBlock::setModuleName(), ProGe::BaseNetlistBlock::setParameter(), startPortIn_, stopPortIn_, and THROW_EXCEPTION.
|
virtual |
Definition at line 159 of file LoopBufferBlock.cc.
const NetlistPort & ProGe::LoopBufferBlock::instructionPortIn | ( | ) | const |
Returns input port for instruction word.
Definition at line 263 of file LoopBufferBlock.cc.
References assert, and instructionPortIn_.
const NetlistPort & ProGe::LoopBufferBlock::instructionPortOut | ( | ) | const |
Returns output port for instruction word.
Definition at line 272 of file LoopBufferBlock.cc.
References assert, and instructionPortOut_.
const NetlistPort & ProGe::LoopBufferBlock::lenCntrPortOut | ( | ) | const |
Returns control port for outputting current loop instruction index.
Definition at line 321 of file LoopBufferBlock.cc.
References assert, and lenCntrPortOut_.
const NetlistPort & ProGe::LoopBufferBlock::lockPortIn | ( | ) | const |
Returns (global) lock input port.
Definition at line 245 of file LoopBufferBlock.cc.
References assert, and lockPortIn_.
const NetlistPort & ProGe::LoopBufferBlock::lockPortOut | ( | ) | const |
Returns (global) lock output port.
Definition at line 254 of file LoopBufferBlock.cc.
References assert, and lockPortOut_.
const NetlistPort & ProGe::LoopBufferBlock::lockReqPortIn | ( | ) | const |
Returns (global) lock request input port.
Definition at line 227 of file LoopBufferBlock.cc.
References assert, and lockReqPortIn_.
const NetlistPort & ProGe::LoopBufferBlock::lockReqPortOut | ( | ) | const |
Returns (global) lock request output port.
Definition at line 236 of file LoopBufferBlock.cc.
References assert, and lockReqPortOut_.
const NetlistPort & ProGe::LoopBufferBlock::loopBodySizePortIn | ( | ) | const |
Returns control port for setting loop body size.
Definition at line 301 of file LoopBufferBlock.cc.
References assert, and loopBodySizePortIn_.
const NetlistPort & ProGe::LoopBufferBlock::loopFromImemPortOut | ( | ) | const |
Returns control port for indicating that loop is executed from outside of loopbuffer module.
Definition at line 331 of file LoopBufferBlock.cc.
References assert, and loopFromImemPortOut_.
const NetlistPort * ProGe::LoopBufferBlock::loopIterationPortIn | ( | ) | const |
Returns control port for setting iteration count.
Definition at line 313 of file LoopBufferBlock.cc.
References loopIterationPortIn_.
void ProGe::LoopBufferBlock::setBlockWidthParameter | ( | const std::string | value | ) |
Sets the width of the blocks (i.e. instructions).
Definition at line 167 of file LoopBufferBlock.cc.
References ProGe::BaseNetlistBlock::Parameter, and ProGe::BaseNetlistBlock::setParameter().
void ProGe::LoopBufferBlock::setBufferSizeParameter | ( | const std::string | value | ) |
Sets the depth of the loop buffer.
The depth is the number of blocks that can be stored in the buffer at most.
Definition at line 178 of file LoopBufferBlock.cc.
References ProGe::BaseNetlistBlock::Parameter, and ProGe::BaseNetlistBlock::setParameter().
void ProGe::LoopBufferBlock::setCoreIdParameter | ( | const std::string | value | ) |
Sets core id for usage tracing.
By default the core id is set to "0".
Definition at line 203 of file LoopBufferBlock.cc.
References ProGe::BaseNetlistBlock::Parameter, and ProGe::BaseNetlistBlock::setParameter().
void ProGe::LoopBufferBlock::setIterationPortWidthParameter | ( | const std::string | value | ) |
Sets the width of control port for iteration count if applicable.
The maximum amount of iterations via the port is 2^n-1, where n is the port width.
Definition at line 190 of file LoopBufferBlock.cc.
References ProGe::BaseNetlistBlock::hasParameter(), ProGe::BaseNetlistBlock::Parameter, and ProGe::BaseNetlistBlock::setParameter().
void ProGe::LoopBufferBlock::setUsageTracingParameter | ( | bool | value | ) |
Sets usage tracing.
By default the trace is disabled (set to false).
When enabled the instance dumps the usage trace into a file (core<core_id>_l0_access_trace.dump) in RTL-simulation.
Definition at line 217 of file LoopBufferBlock.cc.
References ProGe::BaseNetlistBlock::Parameter, and ProGe::BaseNetlistBlock::setParameter().
const NetlistPort & ProGe::LoopBufferBlock::startPortIn | ( | ) | const |
Returns control port for starting loop buffer.
Definition at line 281 of file LoopBufferBlock.cc.
References assert, and startPortIn_.
const NetlistPort * ProGe::LoopBufferBlock::stopPortIn | ( | ) | const |
Returns port that is used to stop looping.
Definition at line 293 of file LoopBufferBlock.cc.
References stopPortIn_.
Referenced by write().
|
overridevirtual |
Does nothing on self but calls write function on each sub block.
Reimplemented from ProGe::BaseNetlistBlock.
Definition at line 337 of file LoopBufferBlock.cc.
References assert, Environment::dataDirPath(), FileSystem::DIRECTORY_SEPARATOR, entityStr_, implmenetationFile_, HDLTemplateInstantiator::instantiateTemplateFile(), ProGe::BaseNetlistBlock::moduleName(), HDLTemplateInstantiator::replacePlaceholder(), HDLTemplateInstantiator::replacePlaceholderFromFile(), stopPortIn(), THROW_EXCEPTION, and ProGe::VHDL.
|
private |
Definition at line 96 of file LoopBufferBlock.hh.
Referenced by LoopBufferBlock(), and write().
|
private |
Definition at line 95 of file LoopBufferBlock.hh.
Referenced by LoopBufferBlock(), and write().
|
private |
Definition at line 86 of file LoopBufferBlock.hh.
Referenced by instructionPortIn(), and LoopBufferBlock().
|
private |
Definition at line 87 of file LoopBufferBlock.hh.
Referenced by instructionPortOut(), and LoopBufferBlock().
|
private |
Definition at line 92 of file LoopBufferBlock.hh.
Referenced by lenCntrPortOut(), and LoopBufferBlock().
|
private |
Definition at line 84 of file LoopBufferBlock.hh.
Referenced by lockPortIn(), and LoopBufferBlock().
|
private |
Definition at line 85 of file LoopBufferBlock.hh.
Referenced by lockPortOut(), and LoopBufferBlock().
|
private |
Definition at line 82 of file LoopBufferBlock.hh.
Referenced by lockReqPortIn(), and LoopBufferBlock().
|
private |
Definition at line 83 of file LoopBufferBlock.hh.
Referenced by lockReqPortOut(), and LoopBufferBlock().
|
private |
Definition at line 90 of file LoopBufferBlock.hh.
Referenced by loopBodySizePortIn(), and LoopBufferBlock().
|
private |
Definition at line 93 of file LoopBufferBlock.hh.
Referenced by LoopBufferBlock(), and loopFromImemPortOut().
|
private |
Definition at line 91 of file LoopBufferBlock.hh.
Referenced by LoopBufferBlock(), and loopIterationPortIn().
|
private |
Definition at line 88 of file LoopBufferBlock.hh.
Referenced by LoopBufferBlock(), and startPortIn().
|
private |
Definition at line 89 of file LoopBufferBlock.hh.
Referenced by LoopBufferBlock(), and stopPortIn().