Go to the documentation of this file.
69 const std::string& moduleName,
const std::string& instanceName,
90 const std::string& name,
91 const std::string& type,
92 const std::string& value) {
128 const string procName =
"NetlistBlock::parentBlock";
146 const string procName =
"NetlistBlock::parentBlock";
172 std::map<std::string, NetlistPort*> copiedPorts;
173 for (
size_t i = 0; i <
portCount(); i++) {
176 copiedPorts.insert({{copiedPort->
name(), copiedPort}});
184 for (
auto port : *portGrp) {
202 if (
netlist().hasConnections()) {
204 std::string topLevelDir =
"";
207 topLevelDir = targetBaseDir.string() +
211 topLevelDir = targetBaseDir.string() +
214 assert(
false &&
"Unsupported HDL.");
219 if (!directoryCreated) {
220 std::string errorMsg =
221 "Unable to create directory " + topLevelDir +
".";
226 writer->
write(topLevelDir);
const std::string name() const
virtual const Netlist & netlist() const
virtual NetlistPortGroup * clone(bool asMirrored=false) const
virtual void write(const Path &targetBaseDir, HDL targetLang=VHDL) const override
static bool createDirectory(const std::string &path)
virtual size_t parameterCount() const
void setParameter(const std::string &name, const std::string &type, const std::string &value)
virtual const std::string & package(size_t idx) const
virtual const NetlistBlock & parentBlock() const override
virtual const Netlist & netlist() const
virtual const BaseNetlistBlock & parentBlock() const
void addPackage(const std::string &packageName)
virtual size_t portGroupCount() const
virtual bool hasParentBlock() const
#define assert(condition)
size_t parameterCount() const
NetlistPort * copyTo(BaseNetlistBlock &newParent, std::string newName="") const
virtual const Parameter & parameter(const std::string &name) const
virtual size_t portCount() const
virtual size_t packageCount() const
void addPort(NetlistPort &port)
NetlistPort * findPort(const std::string &portName, bool recursiveSearch=false, bool partialMatch=true) const
virtual const NetlistPortGroup & portGroup(size_t index) const
NetlistBlock * shallowCopy(const std::string &instanceName) const
static const std::string DIRECTORY_SEPARATOR
virtual void write(const std::string &dstDirectory)=0
static bool fileExists(const std::string fileName)
Parameter parameter(size_t index) const
void addPortGroup(NetlistPortGroup *portGroup)
HDL
HDLs supported by ProGe.
const std::string & moduleName() const
virtual const BaseNetlistBlock & subBlock(size_t index) const
void setParameter(const std::string &name, const std::string &type, const std::string &value)
NetlistBlock & subBlock(size_t index) override
NetlistBlock(const std::string &moduleName, const std::string &instanceName, BaseNetlistBlock *parent=NULL)
virtual NetlistPort * port(const std::string &portName, bool partialMatch=true)
virtual size_t subBlockCount() const
virtual const NetlistPort & port(size_t index) const
virtual void write(const Path &targetBaseDir, HDL targetLang=VHDL) const override