OpenASIP  2.0
Public Member Functions | List of all members
ProGe::NetlistBlock Class Reference

#include <NetlistBlock.hh>

Inheritance diagram for ProGe::NetlistBlock:
Inheritance graph
Collaboration diagram for ProGe::NetlistBlock:
Collaboration graph

Public Member Functions

 NetlistBlock (const std::string &moduleName, const std::string &instanceName, BaseNetlistBlock *parent=NULL)
 
virtual ~NetlistBlock ()
 
void setParameter (const std::string &name, const std::string &type, const std::string &value)
 
void removePort (NetlistPort &port)
 
virtual NetlistPortport (const std::string &portName, bool partialMatch=true)
 
NetlistBlocksubBlock (size_t index) override
 
virtual const NetlistBlockparentBlock () const override
 
virtual NetlistBlockparentBlock () override
 
NetlistBlockshallowCopy (const std::string &instanceName) const
 
virtual void write (const Path &targetBaseDir, HDL targetLang=VHDL) const override
 
void addParameter (const Parameter &param)
 
void setParameter (const Parameter &param)
 
virtual const Parameterparameter (const std::string &name) const
 
virtual const Parameterparameter (size_t index) const
 
Parameterparameter (const std::string &name)
 
NetlistPortaddPort (NetlistPort *port)
 
void removePort (NetlistPort *port)
 
virtual size_t portCount () const
 
virtual const NetlistPortport (size_t index) const
 
virtual const NetlistPortport (const std::string &portName, bool partialMatch=true) const
 
virtual NetlistPortport (size_t index)
 
void addPortGroup (NetlistPortGroup *portGroup)
 
void addSubBlock (BaseNetlistBlock *subBlock, const std::string &instanceName="")
 
virtual size_t subBlockCount () const
 
virtual const Netlistnetlist () const
 
Netlistnetlist ()
 
void addPackage (const std::string &packageName)
 
virtual size_t packageCount () const
 
virtual const std::string & package (size_t idx) const
 
- 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 BaseNetlistBlocksubBlock (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 Parameterparameter (const std::string &name) const
 
virtual size_t parameterCount () const
 
virtual const Parameterparameter (size_t index) const
 
virtual size_t portCount () const
 
virtual const NetlistPortport (size_t index) const
 
virtual std::vector< const NetlistPort * > portsBy (SignalType type) const
 
virtual const NetlistPortportBy (SignalType type, size_t index=0) const
 
virtual bool hasPortsBy (SignalType type) const
 
virtual const NetlistPortport (const std::string &portName, bool partialMatch=true) const
 
virtual size_t portGroupCount () const
 
virtual const NetlistPortGroupportGroup (size_t index) const
 
virtual std::vector< const NetlistPortGroup * > portGroupsBy (SignalGroupType type) const
 
virtual const Netlistnetlist () const
 
virtual bool hasParentBlock () 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
 
PortContainerTypeports ()
 
virtual bool isLeaf () const
 
BaseNetlistBlockshallowCopy (const std::string &instanceName="") const
 
- Public Member Functions inherited from ProGe::IGenerationPhases
virtual ~IGenerationPhases ()
 

Additional Inherited Members

- Public Types inherited from ProGe::BaseNetlistBlock
typedef std::vector< BaseNetlistBlock * > BlockContainerType
 
typedef std::vector< ParameterParameterContainerType
 
typedef std::vector< NetlistPort * > PortContainerType
 
typedef std::vector< NetlistPortGroup * > PortGroupContainerType
 
- Protected Member Functions inherited from ProGe::BaseNetlistBlock
Netlistnetlist ()
 
virtual NetlistPortport (size_t index)
 
void setModuleName (const std::string &name)
 
void addSubBlock (BaseNetlistBlock *subBlock, const std::string &instanceName="")
 
void deleteSubBlock (BaseNetlistBlock *subBlock)
 
void removeSubBlock (BaseNetlistBlock *subBlock)
 
NetlistPortaddPort (NetlistPort *port)
 
void removePort (NetlistPort *port)
 
void addPortGroup (NetlistPortGroup *portGroup)
 
void removePortGroup (NetlistPortGroup *portGroup)
 
void setParameter (const Parameter &param)
 
void addParameter (const Parameter &param)
 
Parameterparameter (const std::string &name)
 
NetlistPortfindPort (const std::string &portName, bool recursiveSearch=false, bool partialMatch=true) const
 
void addPackage (const std::string &packageName)
 
void connectClocks ()
 
void connectResets ()
 

Detailed Description

Represents a hardware block in the netlist.

Definition at line 61 of file NetlistBlock.hh.

Constructor & Destructor Documentation

◆ NetlistBlock()

ProGe::NetlistBlock::NetlistBlock ( const std::string &  moduleName,
const std::string &  instanceName,
BaseNetlistBlock parent = NULL 
)

Constructor. Creates a netlist with no ports.

The created is empty. Only its name, the parent netlist and the name of the instance module are defined.

Parameters
moduleNameName of the module.
instanceNameName of the instance of the module.
netlistThe netlist which the belongs to.

Definition at line 68 of file NetlistBlock.cc.

Referenced by shallowCopy().

◆ ~NetlistBlock()

ProGe::NetlistBlock::~NetlistBlock ( )
virtual

The destructor.

Deletes all the ports.

Definition at line 78 of file NetlistBlock.cc.

78  {
79 }

Member Function Documentation

◆ addPackage()

void ProGe::BaseNetlistBlock::addPackage

Definition at line 687 of file BaseNetlistBlock.cc.

687  {
688  if (!ContainerTools::containsValue(packages_, packageName)) {
689  packages_.push_back(packageName);
690  }
691 }

Referenced by PlatformIntegrator::copyProgeBlockToNetlist(), ProGe::NetlistGenerator::generate(), DefaultICDecoderGenerator::generateDebuggerCode(), and shallowCopy().

◆ addParameter()

void ProGe::BaseNetlistBlock::addParameter

Adds new parameter to the block. Throws exception if the block has the parameter by the name already.

Definition at line 547 of file BaseNetlistBlock.cc.

547  {
548  // Check for uniqueness //
549  for (Parameter& p : parameters_) {
550  if (p.name() == param.name()) {
551  throw ObjectAlreadyExists(
552  __FILE__, __LINE__,
553  "The block \"" + name() + "\" already has parameter\"" +
554  param.name() + "\"");
555  }
556  }
557 
558  // Check if parameter's value refers to a constant //
559  if (param.valueIsConstant()) {
560  std::string packageName = param.packageNameOfConstant();
561  assert(!packageName.empty());
562  addPackage(packageName);
563  }
564 
565  parameters_.push_back(param);
566 }

Referenced by ProGe::NetlistGenerator::addGCUToNetlist().

◆ addPort()

NetlistPort * ProGe::BaseNetlistBlock::addPort

Adds port to this block and acquires ownership of it.

Added port will point to this block after the call.

Exceptions
ObjectAlreadyExistsThrown if the netlist block already has a port by same name.

Definition at line 467 of file BaseNetlistBlock.cc.

467  {
468  assert(port != nullptr && "Attempted to add null port.");
469  if (findPort(port->name(), false, false)) {
472  "Given port by name (" + port->name() +
473  ") already exists in the netlist block (" +
474  this->instanceName() + " : " + this->moduleName() + ").");
475  }
476 
477  if (!port->hasParentBlock() || &port->parentBlock() != this) {
478  port->setParent(this);
479  }
480  ports_.push_back(port);
482  if (parent_ != nullptr) {
484  }
485  return port;
486 }

◆ addPortGroup()

void ProGe::BaseNetlistBlock::addPortGroup

Definition at line 508 of file BaseNetlistBlock.cc.

508  {
509  portGroups_.push_back(portGroup);
510  portGroup->setParent(this);
511  for (size_t i = 0; i < portGroup->portCount(); i++) {
512  if (!netlist().isRegistered(portGroup->portAt(i))) {
513  addPort(&portGroup->portAt(i));
514  }
515  }
516 }

Referenced by ProGe::NetlistGenerator::addFUExternalPortsToNetlist(), ProGe::NetlistGenerator::addGCUToNetlist(), AlmaIFIntegrator::initAlmaifBlock(), and shallowCopy().

◆ addSubBlock()

void ProGe::BaseNetlistBlock::addSubBlock

Adds sub block to this block and acquires ownership of it.

Parameters
subBlockThe block to be added.
instanceNameThe instance base name to be given for sub block. If the given or sub block's instance name is not unique within the block The name will be prefixed with a running number.

Definition at line 405 of file BaseNetlistBlock.cc.

406  {
407  if (!instanceName.empty()) {
410  } else {
411  if (subBlock->instanceName().empty()) {
413  *this, subBlock->moduleName() + "_inst0"));
414  } else {
416  *this, subBlock->instanceName()));
417  }
418  }
419 
420  assert(!subBlock->hasParentBlock() || &subBlock->parentBlock() == this);
421  subBlock->setParent(this);
422  subBlocks_.push_back(subBlock);
423 
424  // Register ports of the subblock so connections can be made.
425  for (size_t i = 0; i < subBlock->portCount(); i++) {
427  }
428 }

Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), ProGe::NetlistGenerator::addFUToNetlist(), ProGe::NetlistGenerator::addGCUToNetlist(), ProGe::NetlistGenerator::addGeneratableFUsToNetlist(), DefaultICGenerator::addICToNetlist(), XilinxBlockRamGenerator::addMemory(), MemoryGenerator::addMemory(), DefaultICDecoderGenerator::addRV32MicroCode(), MemoryGenerator::connectPorts(), PlatformIntegrator::copyProgeBlockToNetlist(), MemoryGenerator::createMemoryNetlistBlock(), and DefaultICDecoderGenerator::generateDebuggerCode().

◆ netlist() [1/2]

Netlist& ProGe::BaseNetlistBlock::netlist

◆ netlist() [2/2]

Netlist & ProGe::BaseNetlistBlock::netlist

◆ package()

const std::string & ProGe::BaseNetlistBlock::package

Definition at line 699 of file BaseNetlistBlock.cc.

699  {
700  return packages_.at(idx);
701 }

Referenced by PlatformIntegrator::copyProgeBlockToNetlist().

◆ packageCount()

size_t ProGe::BaseNetlistBlock::packageCount

Definition at line 694 of file BaseNetlistBlock.cc.

694  {
695  return packages_.size();
696 }

Referenced by PlatformIntegrator::copyProgeBlockToNetlist().

◆ parameter() [1/3]

Parameter & ProGe::BaseNetlistBlock::parameter

Returns a Parameter object by name.

Exceptions
NotAvailableThrown if the block does not have such Parameter.

Definition at line 217 of file BaseNetlistBlock.cc.

217  {
218  for (size_t i = 0; i < parameterCount(); i++) {
219  if (parameters_.at(i).name() == name) {
220  return parameters_.at(i);
221  }
222  }
223 
224  throw NotAvailable(
225  __FILE__, __LINE__, __func__,
226  std::string("The block (") + instanceName() + ":" + moduleName() +
227  ") does not have parameter \"" + name + "\"");
228 }

◆ parameter() [2/3]

const Parameter & ProGe::BaseNetlistBlock::parameter

Returns a Parameter object by name.

Exceptions
NotAvailableThrown if the block does not have such Parameter.

Definition at line 198 of file BaseNetlistBlock.cc.

198  {
199  for (size_t i = 0; i < parameterCount(); i++) {
200  if (parameter(i).name() == name) {
201  return parameter(i);
202  }
203  }
204 
205  throw NotAvailable(
206  __FILE__, __LINE__, __func__,
207  std::string("The block (") + instanceName() + ":" + moduleName() +
208  ") does not have parameter \"" + name + "\"");
209 }

Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), ProGe::NetlistGenerator::addFUExternalPortsToNetlist(), PlatformIntegrator::copyProgeBlockToNetlist(), SOPCBuilderFileGenerator::writeGenerics(), and IPXactFileGenerator::writeProjectFiles().

◆ parameter() [3/3]

const Parameter & ProGe::BaseNetlistBlock::parameter

Definition at line 236 of file BaseNetlistBlock.cc.

236  {
237  if (index >= parameterCount()) {
238  throw OutOfRange(__FILE__, __LINE__, __func__);
239  }
240 
241  return parameters_.at(index);
242 }

◆ parentBlock() [1/2]

NetlistBlock & ProGe::NetlistBlock::parentBlock ( ) const
overridevirtual

Returns the parent .

Returns
The parent .
Exceptions
InstanceNotFoundIf the does not have a parent .

Reimplemented from ProGe::BaseNetlistBlock.

Definition at line 126 of file NetlistBlock.cc.

126  {
127  if (!hasParentBlock()) {
128  const string procName = "NetlistBlock::parentBlock";
129  throw InstanceNotFound(__FILE__, __LINE__, procName);
130  }
131 
132  // todo: fix parentblock may not be NetlistBlock.
133  return *dynamic_cast<const NetlistBlock*>(
135 }

References ProGe::BaseNetlistBlock::hasParentBlock(), and ProGe::BaseNetlistBlock::parentBlock().

Referenced by DefaultDecoderGenerator::addGlockPortToDecoder(), DefaultDecoderGenerator::addLockReqPortToDecoder(), and DefaultICDecoderGenerator::generateDebuggerCode().

Here is the call graph for this function:

◆ parentBlock() [2/2]

virtual NetlistBlock& ProGe::NetlistBlock::parentBlock ( )
overridevirtual

Reimplemented from ProGe::BaseNetlistBlock.

◆ port() [1/4]

NetlistPort * ProGe::NetlistBlock::port ( const std::string &  portName,
bool  partialMatch = true 
)
virtual

◆ port() [2/4]

const NetlistPort * ProGe::BaseNetlistBlock::port

Returns a port that matches (partially) the given name.

Returns
The matching port. If not found, returns nullptr.

Definition at line 317 of file BaseNetlistBlock.cc.

317  {
318  return findPort(portName, false, partialMatch);
319 }

◆ port() [3/4]

NetlistPort & ProGe::BaseNetlistBlock::port

Definition at line 322 of file BaseNetlistBlock.cc.

322  {
323  return *ports_.at(index);
324 }

◆ port() [4/4]

const NetlistPort & ProGe::BaseNetlistBlock::port

Definition at line 253 of file BaseNetlistBlock.cc.

253  {
254  return *ports_.at(index);
255 }

◆ portCount()

size_t ProGe::BaseNetlistBlock::portCount

◆ removePort() [1/2]

void ProGe::NetlistBlock::removePort ( NetlistPort port)

◆ removePort() [2/2]

void ProGe::BaseNetlistBlock::removePort

Removes the given port from the block.

After call the port is parent block reference is set to nullptr.

Definition at line 494 of file BaseNetlistBlock.cc.

494  {
495  assert(
496  &port->parentBlock() == this &&
497  "Attempted to remove a port the block does not have.");
498 
500  if (this->hasParentBlock()) {
502  }
504  port->setParent(nullptr);
505 }

◆ setParameter() [1/2]

void ProGe::BaseNetlistBlock::setParameter

Adds parameter to the block overwriting the existing one by name.

Definition at line 532 of file BaseNetlistBlock.cc.

532  {
533  for (Parameter& p : parameters_) {
534  if (p.name() == param.name()) {
535  p = param;
536  return;
537  }
538  }
539  parameters_.push_back(param);
540 }

◆ setParameter() [2/2]

void ProGe::NetlistBlock::setParameter ( const std::string &  name,
const std::string &  type,
const std::string &  value 
)

◆ shallowCopy()

NetlistBlock * ProGe::NetlistBlock::shallowCopy ( const std::string &  instanceName) const

Copies the block without its children or internal connections - leaving only the outer portion of the block.

Parameters
instanceNameNew instance name for the copy
Returns
Pointer to the netlist copy

Definition at line 161 of file NetlistBlock.cc.

161  {
162  NetlistBlock* block =
163  new NetlistBlock(this->moduleName(), instanceName, NULL);
164 
165  for (size_t i = 0; i < this->parameterCount(); i++) {
166  block->setParameter(this->parameter(i));
167  }
168  for (size_t i = 0; i < netlist().parameterCount(); i++) {
169  block->netlist().setParameter(this->netlist().parameter(i));
170  }
171  // Copy ports while preserving their insertion order.
172  std::map<std::string, NetlistPort*> copiedPorts;
173  for (size_t i = 0; i < portCount(); i++) {
174  NetlistPort* copiedPort = nullptr;
175  copiedPort = BaseNetlistBlock::port(i).copyTo(*block);
176  copiedPorts.insert({{copiedPort->name(), copiedPort}});
177  }
178  for (size_t i = 0; i < portGroupCount(); i++) {
179  const NetlistPortGroup* portGrp = &portGroup(i);
180  // Cloning to copy original class type, but clear ports as they are
181  // already created and added to the new block.
182  NetlistPortGroup* newGroup = portGrp->clone();
183  newGroup->clear();
184  for (auto port : *portGrp) {
185  newGroup->addPort(*copiedPorts.at(port->name()));
186  }
187  block->addPortGroup(newGroup);
188  }
189 
190  for (size_t i = 0; i < packageCount(); i++) {
191  block->addPackage(this->package(i));
192  }
193 
194  return block;
195 }

References addPackage(), ProGe::NetlistPortGroup::addPort(), addPortGroup(), ProGe::NetlistPortGroup::clear(), ProGe::NetlistPortGroup::clone(), ProGe::NetlistPort::copyTo(), ProGe::BaseNetlistBlock::moduleName(), ProGe::NetlistPort::name(), netlist(), ProGe::BaseNetlistBlock::netlist(), NetlistBlock(), ProGe::BaseNetlistBlock::package(), ProGe::BaseNetlistBlock::packageCount(), ProGe::BaseNetlistBlock::parameter(), ProGe::Netlist::parameter(), ProGe::BaseNetlistBlock::parameterCount(), ProGe::Netlist::parameterCount(), port(), ProGe::BaseNetlistBlock::port(), ProGe::BaseNetlistBlock::portCount(), ProGe::BaseNetlistBlock::portGroup(), ProGe::BaseNetlistBlock::portGroupCount(), setParameter(), and ProGe::Netlist::setParameter().

Referenced by PlatformIntegrator::copyProgeBlockToNetlist().

Here is the call graph for this function:

◆ subBlock()

NetlistBlock & ProGe::NetlistBlock::subBlock ( size_t  index)
overridevirtual

Returns a sub by the given index.

Parameters
indexThe index.
Returns
The sub .
Exceptions
OutOfRangeIf the given index is negative or not smaller than the number of sub blocks.

Reimplemented from ProGe::BaseNetlistBlock.

Definition at line 110 of file NetlistBlock.cc.

110  {
111  if (index >= subBlockCount()) {
112  throw OutOfRange(__FILE__, __LINE__, __func__);
113  }
114 
115  // todo check for and throw wrong subblass
116  return *dynamic_cast<NetlistBlock*>(&BaseNetlistBlock::subBlock(index));
117 }

References __func__, ProGe::BaseNetlistBlock::subBlock(), and ProGe::BaseNetlistBlock::subBlockCount().

Referenced by FUGen::FUGen(), and DefaultICDecoderGenerator::generateDebuggerCode().

Here is the call graph for this function:

◆ subBlockCount()

size_t ProGe::BaseNetlistBlock::subBlockCount

◆ write()

void ProGe::NetlistBlock::write ( const Path targetBaseDir,
HDL  targetLang = VHDL 
) const
overridevirtual

Writes self if non-empty and calls write() function of each sub block.

Reimplemented from ProGe::BaseNetlistBlock.

Definition at line 201 of file NetlistBlock.cc.

201  {
202  if (netlist().hasConnections()) {
203  NetlistWriter* writer;
204  std::string topLevelDir = "";
205  if (targetLang == ProGe::VHDL) {
206  writer = new VHDLNetlistWriter(*this);
207  topLevelDir = targetBaseDir.string() +
209  } else if (targetLang == ProGe::Verilog) {
210  writer = new VerilogNetlistWriter(*this);
211  topLevelDir = targetBaseDir.string() +
213  } else {
214  assert(false && "Unsupported HDL.");
215  }
216 
217  if (!FileSystem::fileExists(topLevelDir)) {
218  bool directoryCreated = FileSystem::createDirectory(topLevelDir);
219  if (!directoryCreated) {
220  std::string errorMsg =
221  "Unable to create directory " + topLevelDir + ".";
222  throw IOException(__FILE__, __LINE__, __func__, errorMsg);
223  }
224  }
225 
226  writer->write(topLevelDir);
227  delete writer;
228  }
229 
230  BaseNetlistBlock::write(targetBaseDir, targetLang);
231 }

References __func__, assert, FileSystem::createDirectory(), FileSystem::DIRECTORY_SEPARATOR, FileSystem::fileExists(), ProGe::BaseNetlistBlock::netlist(), ProGe::Verilog, ProGe::VHDL, ProGe::NetlistWriter::write(), and ProGe::BaseNetlistBlock::write().

Referenced by ProGe::ProcessorGenerator::generateProcessor().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
ProGe::BaseNetlistBlock::addPort
NetlistPort * addPort(NetlistPort *port)
Definition: BaseNetlistBlock.cc:467
ProGe::BaseNetlistBlock::name
const std::string name() const
Definition: BaseNetlistBlock.cc:145
ProGe::NetlistBlock::netlist
virtual const Netlist & netlist() const
Definition: BaseNetlistBlock.cc:348
ProGe::BaseNetlistBlock::NetlistPortGroup
friend class NetlistPortGroup
Definition: BaseNetlistBlock.hh:62
ProGe::Netlist::unregisterPort
void unregisterPort(NetlistPort &port)
Definition: Netlist.cc:342
ProGe::NetlistPort::parentBlock
const BaseNetlistBlock & parentBlock() const
Definition: NetlistPort.cc:400
FileSystem::createDirectory
static bool createDirectory(const std::string &path)
Definition: FileSystem.cc:400
ProGe::Verilog
@ Verilog
Verilog.
Definition: ProGeTypes.hh:42
ProGe::BaseNetlistBlock::parameterCount
virtual size_t parameterCount() const
Definition: BaseNetlistBlock.cc:231
OutOfRange
Definition: Exception.hh:320
ProGe::NetlistPortGroup::portAt
const NetlistPort & portAt(size_t index) const
Definition: NetlistPortGroup.cc:83
ProGe::BaseNetlistBlock::instanceName
const std::string & instanceName() const
Definition: BaseNetlistBlock.cc:135
ProGe::NetlistBlock::setParameter
void setParameter(const std::string &name, const std::string &type, const std::string &value)
Definition: NetlistBlock.cc:89
ProGe::NetlistPortGroup::setParent
void setParent(BaseNetlistBlock *newParent)
Definition: NetlistPortGroup.cc:150
ProGe::BaseNetlistBlock::package
virtual const std::string & package(size_t idx) const
Definition: BaseNetlistBlock.cc:699
ProGe::BaseNetlistBlock::subBlocks_
BlockContainerType subBlocks_
The sub blocks of this netlist block.
Definition: BaseNetlistBlock.hh:176
ProGe::NetlistBlock::parentBlock
virtual const NetlistBlock & parentBlock() const override
Definition: NetlistBlock.cc:126
ProGe::BaseNetlistBlock::Parameter
friend class Parameter
Definition: BaseNetlistBlock.hh:63
ProGe::BaseNetlistBlock::netlist
virtual const Netlist & netlist() const
Definition: BaseNetlistBlock.cc:348
ProGe::BaseNetlistBlock::parentBlock
virtual const BaseNetlistBlock & parentBlock() const
Definition: BaseNetlistBlock.cc:358
ProGe::NetlistBlock::portCount
virtual size_t portCount() const
Definition: BaseNetlistBlock.cc:248
NotAvailable
Definition: Exception.hh:728
ProGe::BaseNetlistBlock::netlist_
Netlist * netlist_
The netlist of the block.
Definition: BaseNetlistBlock.hh:184
ProGe::BaseNetlistBlock::portGroupCount
virtual size_t portGroupCount() const
Definition: BaseNetlistBlock.cc:327
ProGe::BaseNetlistBlock::hasParentBlock
virtual bool hasParentBlock() const
Definition: BaseNetlistBlock.cc:353
assert
#define assert(condition)
Definition: Application.hh:86
ProGe::BaseNetlistBlock::parent_
BaseNetlistBlock * parent_
The reference to parent block of this block.
Definition: BaseNetlistBlock.hh:174
ProGe::Netlist::parameterCount
size_t parameterCount() const
Definition: Netlist.cc:422
ProGe::NetlistPort::copyTo
NetlistPort * copyTo(BaseNetlistBlock &newParent, std::string newName="") const
Definition: NetlistPort.cc:231
ProGe::VHDL
@ VHDL
VHDL.
Definition: ProGeTypes.hh:41
ProGe::BaseNetlistBlock::setParent
virtual void setParent(BaseNetlistBlock *parent)
Definition: BaseNetlistBlock.cc:707
ProGe::BaseNetlistBlock::parameter
virtual const Parameter & parameter(const std::string &name) const
Definition: BaseNetlistBlock.cc:198
THROW_EXCEPTION
#define THROW_EXCEPTION(exceptionType, message)
Exception wrapper macro that automatically includes file name, line number and function name where th...
Definition: Exception.hh:39
ContainerTools::removeValueIfExists
static bool removeValueIfExists(ContainerType &aContainer, const ElementType &aKey)
ProGe::BaseNetlistBlock::ports_
PortContainerType ports_
The ports of the block.
Definition: BaseNetlistBlock.hh:180
ProGe::BaseNetlistBlock::portCount
virtual size_t portCount() const
Definition: BaseNetlistBlock.cc:248
ProGe::BaseNetlistBlock::BaseNetlistBlock
BaseNetlistBlock()
Definition: BaseNetlistBlock.cc:53
ProGe::Parameter::name
const TCEString & name() const
Definition: Parameter.cc:133
ProGe::BaseNetlistBlock::packageCount
virtual size_t packageCount() const
Definition: BaseNetlistBlock.cc:694
__func__
#define __func__
Definition: Application.hh:67
ProGe::BaseNetlistBlock::addPackage
void addPackage(const std::string &packageName)
Definition: BaseNetlistBlock.cc:687
ProGe::BaseNetlistBlock::findPort
NetlistPort * findPort(const std::string &portName, bool recursiveSearch=false, bool partialMatch=true) const
Definition: BaseNetlistBlock.cc:574
ProGe::NetlistPort::hasParentBlock
bool hasParentBlock() const
Definition: NetlistPort.cc:390
ProGe::BaseNetlistBlock::portGroup
virtual const NetlistPortGroup & portGroup(size_t index) const
Definition: BaseNetlistBlock.cc:332
ProGe::BaseNetlistBlock::portGroups_
PortGroupContainerType portGroups_
The ports of the block.
Definition: BaseNetlistBlock.hh:182
ProGe::BaseNetlistBlock::instanceName_
std::string instanceName_
The instance name of the block.
Definition: BaseNetlistBlock.hh:186
ProGe::NetlistPort::name
std::string name() const
Definition: NetlistPort.cc:283
FileSystem::DIRECTORY_SEPARATOR
static const std::string DIRECTORY_SEPARATOR
Definition: FileSystem.hh:189
ProGe::NetlistPort::setParent
void setParent(BaseNetlistBlock *parent)
Definition: NetlistPort.cc:439
ProGe::Netlist::registerPort
size_t registerPort(NetlistPort &port)
Definition: Netlist.cc:309
FileSystem::fileExists
static bool fileExists(const std::string fileName)
ObjectAlreadyExists
Definition: Exception.hh:1002
ProGe::Netlist::parameter
Parameter parameter(size_t index) const
Definition: Netlist.cc:434
ProGe::BaseNetlistBlock::parameters_
ParameterContainerType parameters_
The parameters of the block.
Definition: BaseNetlistBlock.hh:178
ProGe::NetlistPortGroup::portCount
size_t portCount() const
Definition: NetlistPortGroup.cc:78
ProGe::BaseNetlistBlock::moduleName
const std::string & moduleName() const
Definition: BaseNetlistBlock.cc:140
ContainerTools::containsValue
static bool containsValue(const ContainerType &aContainer, const ElementType &aKey)
ProGe::BaseNetlistBlock::packages_
std::vector< std::string > packages_
The referenced packages by the module.
Definition: BaseNetlistBlock.hh:190
ProGe::BaseNetlistBlock::subBlock
virtual const BaseNetlistBlock & subBlock(size_t index) const
Definition: BaseNetlistBlock.cc:155
ProGe::BaseNetlistBlock::setInstanceName
void setInstanceName(const std::string &name)
Definition: BaseNetlistBlock.cc:379
IOException
Definition: Exception.hh:130
ProGe::NetlistBlock::subBlock
NetlistBlock & subBlock(size_t index) override
Definition: NetlistBlock.cc:110
ProGe::NetlistBlock::NetlistBlock
NetlistBlock(const std::string &moduleName, const std::string &instanceName, BaseNetlistBlock *parent=NULL)
Definition: NetlistBlock.cc:68
ProGe::NetlistBlock::port
virtual NetlistPort * port(const std::string &portName, bool partialMatch=true)
Definition: NetlistBlock.cc:97
ProGe::BaseNetlistBlock::NetlistPort
friend class NetlistPort
Definition: BaseNetlistBlock.hh:61
InstanceNotFound
Definition: Exception.hh:304
ProGe::BaseNetlistBlock::subBlockCount
virtual size_t subBlockCount() const
Definition: BaseNetlistBlock.cc:150
ProGe::BaseNetlistBlock::port
virtual const NetlistPort & port(size_t index) const
Definition: BaseNetlistBlock.cc:253
ProGe::BaseNetlistBlock::write
virtual void write(const Path &targetBaseDir, HDL targetLang=VHDL) const override
Definition: BaseNetlistBlock.cc:614
ProGe::NetlistTools::getUniqueInstanceName
static std::string getUniqueInstanceName(const BaseNetlistBlock &within, const std::string &basename)
Definition: NetlistTools.cc:155