verilog reader use override
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
fbe9da3fb7
commit
83d08b5b5c
|
|
@ -1221,7 +1221,7 @@ public:
|
||||||
VerilogNetConcatNameIterator(VerilogNetSeq *nets,
|
VerilogNetConcatNameIterator(VerilogNetSeq *nets,
|
||||||
VerilogModule *module,
|
VerilogModule *module,
|
||||||
VerilogReader *reader);
|
VerilogReader *reader);
|
||||||
virtual ~VerilogNetConcatNameIterator();
|
~VerilogNetConcatNameIterator() override;
|
||||||
bool hasNext() override;
|
bool hasNext() override;
|
||||||
const std::string &next() override;
|
const std::string &next() override;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ public:
|
||||||
const std::string &filename,
|
const std::string &filename,
|
||||||
int line,
|
int line,
|
||||||
VerilogReader *reader);
|
VerilogReader *reader);
|
||||||
virtual ~VerilogModule();
|
~VerilogModule() override;
|
||||||
const std::string &name() { return name_; }
|
const std::string &name() { return name_; }
|
||||||
const char *filename() { return filename_.c_str(); }
|
const char *filename() { return filename_.c_str(); }
|
||||||
VerilogAttrStmtSeq *attrStmts() { return attr_stmts_; }
|
VerilogAttrStmtSeq *attrStmts() { return attr_stmts_; }
|
||||||
|
|
@ -128,10 +128,10 @@ public:
|
||||||
VerilogDclArg *arg,
|
VerilogDclArg *arg,
|
||||||
VerilogAttrStmtSeq *attr_stmts,
|
VerilogAttrStmtSeq *attr_stmts,
|
||||||
int line);
|
int line);
|
||||||
virtual bool isBus() const { return true; }
|
bool isBus() const override { return true; }
|
||||||
int fromIndex() const { return from_index_; }
|
int fromIndex() const { return from_index_; }
|
||||||
int toIndex() const { return to_index_; }
|
int toIndex() const { return to_index_; }
|
||||||
virtual int size() const;
|
int size() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int from_index_;
|
int from_index_;
|
||||||
|
|
@ -161,8 +161,8 @@ public:
|
||||||
VerilogAssign(VerilogNet *lhs,
|
VerilogAssign(VerilogNet *lhs,
|
||||||
VerilogNet *rhs,
|
VerilogNet *rhs,
|
||||||
int line);
|
int line);
|
||||||
virtual ~VerilogAssign();
|
~VerilogAssign() override;
|
||||||
virtual bool isAssign() const { return true; }
|
bool isAssign() const override { return true; }
|
||||||
VerilogNet *lhs() const { return lhs_; }
|
VerilogNet *lhs() const { return lhs_; }
|
||||||
VerilogNet *rhs() const { return rhs_; }
|
VerilogNet *rhs() const { return rhs_; }
|
||||||
|
|
||||||
|
|
@ -177,8 +177,8 @@ public:
|
||||||
VerilogInst(const std::string &inst_name,
|
VerilogInst(const std::string &inst_name,
|
||||||
VerilogAttrStmtSeq *attr_stmts,
|
VerilogAttrStmtSeq *attr_stmts,
|
||||||
const int line);
|
const int line);
|
||||||
virtual ~VerilogInst();
|
~VerilogInst() override;
|
||||||
virtual bool isInstance() const { return true; }
|
bool isInstance() const override { return true; }
|
||||||
const std::string &instanceName() const { return inst_name_; }
|
const std::string &instanceName() const { return inst_name_; }
|
||||||
VerilogAttrStmtSeq *attrStmts() const { return attr_stmts_; }
|
VerilogAttrStmtSeq *attrStmts() const { return attr_stmts_; }
|
||||||
void setInstanceName(const std::string &inst_name);
|
void setInstanceName(const std::string &inst_name);
|
||||||
|
|
@ -196,8 +196,8 @@ public:
|
||||||
VerilogNetSeq *pins,
|
VerilogNetSeq *pins,
|
||||||
VerilogAttrStmtSeq *attr_stmts,
|
VerilogAttrStmtSeq *attr_stmts,
|
||||||
const int line);
|
const int line);
|
||||||
virtual ~VerilogModuleInst();
|
~VerilogModuleInst() override;
|
||||||
virtual bool isModuleInst() const { return true; }
|
bool isModuleInst() const override { return true; }
|
||||||
const std::string &moduleName() const { return module_name_; }
|
const std::string &moduleName() const { return module_name_; }
|
||||||
VerilogNetSeq *pins() const { return pins_; }
|
VerilogNetSeq *pins() const { return pins_; }
|
||||||
bool namedPins();
|
bool namedPins();
|
||||||
|
|
@ -219,7 +219,7 @@ public:
|
||||||
const StringSeq &net_names,
|
const StringSeq &net_names,
|
||||||
VerilogAttrStmtSeq *attr_stmts,
|
VerilogAttrStmtSeq *attr_stmts,
|
||||||
const int line);
|
const int line);
|
||||||
virtual bool isLibertyInst() const { return true; }
|
bool isLibertyInst() const override { return true; }
|
||||||
LibertyCell *cell() const { return cell_; }
|
LibertyCell *cell() const { return cell_; }
|
||||||
const StringSeq &netNames() const { return net_names_; }
|
const StringSeq &netNames() const { return net_names_; }
|
||||||
|
|
||||||
|
|
@ -258,7 +258,7 @@ class VerilogNetNamed : public VerilogNet
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VerilogNetNamed(const std::string &name);
|
VerilogNetNamed(const std::string &name);
|
||||||
virtual ~VerilogNetNamed();
|
~VerilogNetNamed() override;
|
||||||
bool isNamed() const override { return true; }
|
bool isNamed() const override { return true; }
|
||||||
virtual bool isScalar() const = 0;
|
virtual bool isScalar() const = 0;
|
||||||
const std::string &name() const override { return name_; }
|
const std::string &name() const override { return name_; }
|
||||||
|
|
@ -272,10 +272,10 @@ class VerilogNetScalar : public VerilogNetNamed
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VerilogNetScalar(const std::string &name);
|
VerilogNetScalar(const std::string &name);
|
||||||
virtual bool isScalar() const { return true; }
|
bool isScalar() const override { return true; }
|
||||||
virtual int size(VerilogModule *module);
|
int size(VerilogModule *module) override;
|
||||||
virtual VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
||||||
VerilogReader *reader);
|
VerilogReader *reader) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class VerilogNetBitSelect : public VerilogNetNamed
|
class VerilogNetBitSelect : public VerilogNetNamed
|
||||||
|
|
@ -284,10 +284,10 @@ public:
|
||||||
VerilogNetBitSelect(const std::string &name,
|
VerilogNetBitSelect(const std::string &name,
|
||||||
int index);
|
int index);
|
||||||
int index() { return index_; }
|
int index() { return index_; }
|
||||||
virtual bool isScalar() const { return false; }
|
bool isScalar() const override { return false; }
|
||||||
virtual int size(VerilogModule *module);
|
int size(VerilogModule *module) override;
|
||||||
virtual VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
||||||
VerilogReader *reader);
|
VerilogReader *reader) override;
|
||||||
private:
|
private:
|
||||||
int index_;
|
int index_;
|
||||||
};
|
};
|
||||||
|
|
@ -298,10 +298,10 @@ public:
|
||||||
VerilogNetPartSelect(const std::string &name,
|
VerilogNetPartSelect(const std::string &name,
|
||||||
int from_index,
|
int from_index,
|
||||||
int to_index);
|
int to_index);
|
||||||
virtual bool isScalar() const { return false; }
|
bool isScalar() const override { return false; }
|
||||||
virtual int size(VerilogModule *module);
|
int size(VerilogModule *module) override;
|
||||||
virtual VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
||||||
VerilogReader *reader);
|
VerilogReader *reader) override;
|
||||||
int fromIndex() const { return from_index_; }
|
int fromIndex() const { return from_index_; }
|
||||||
int toIndex() const { return to_index_; }
|
int toIndex() const { return to_index_; }
|
||||||
|
|
||||||
|
|
@ -316,10 +316,10 @@ public:
|
||||||
VerilogNetConstant(const std::string *constant,
|
VerilogNetConstant(const std::string *constant,
|
||||||
VerilogReader *reader,
|
VerilogReader *reader,
|
||||||
int line);
|
int line);
|
||||||
virtual ~VerilogNetConstant();
|
~VerilogNetConstant() override;
|
||||||
virtual int size(VerilogModule *module);
|
int size(VerilogModule *module) override;
|
||||||
virtual VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
||||||
VerilogReader *reader);
|
VerilogReader *reader) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void parseConstant(const std::string *constant,
|
void parseConstant(const std::string *constant,
|
||||||
|
|
@ -341,10 +341,10 @@ class VerilogNetConcat : public VerilogNetUnnamed
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VerilogNetConcat(VerilogNetSeq *nets);
|
VerilogNetConcat(VerilogNetSeq *nets);
|
||||||
virtual ~VerilogNetConcat();
|
~VerilogNetConcat() override;
|
||||||
virtual int size(VerilogModule *module);
|
int size(VerilogModule *module) override;
|
||||||
virtual VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
||||||
VerilogReader *reader);
|
VerilogReader *reader) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
VerilogNetSeq *nets_;
|
VerilogNetSeq *nets_;
|
||||||
|
|
@ -355,7 +355,7 @@ class VerilogNetPortRef : public VerilogNetScalar
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VerilogNetPortRef(const std::string &name);
|
VerilogNetPortRef(const std::string &name);
|
||||||
virtual bool isNamedPortRef() { return true; }
|
bool isNamedPortRef() override { return true; }
|
||||||
virtual bool hasNet() = 0;
|
virtual bool hasNet() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -369,12 +369,12 @@ public:
|
||||||
VerilogNetPortRefScalarNet(const std::string &name);
|
VerilogNetPortRefScalarNet(const std::string &name);
|
||||||
VerilogNetPortRefScalarNet(const std::string &name,
|
VerilogNetPortRefScalarNet(const std::string &name,
|
||||||
const std::string &net_name);
|
const std::string &net_name);
|
||||||
virtual bool isScalar() const { return true; }
|
bool isScalar() const override { return true; }
|
||||||
virtual bool isNamedPortRefScalarNet() const { return true; }
|
bool isNamedPortRefScalarNet() const override { return true; }
|
||||||
virtual int size(VerilogModule *module);
|
int size(VerilogModule *module) override;
|
||||||
virtual VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
||||||
VerilogReader *reader);
|
VerilogReader *reader) override;
|
||||||
virtual bool hasNet() { return !net_name_.empty(); }
|
bool hasNet() override { return !net_name_.empty(); }
|
||||||
const std::string &netName() const { return net_name_; }
|
const std::string &netName() const { return net_name_; }
|
||||||
void setNetName(const std::string &net_name) { net_name_ = net_name; }
|
void setNetName(const std::string &net_name) { net_name_ = net_name; }
|
||||||
|
|
||||||
|
|
@ -387,12 +387,12 @@ class VerilogNetPortRefScalar : public VerilogNetPortRef
|
||||||
public:
|
public:
|
||||||
VerilogNetPortRefScalar(const std::string &name,
|
VerilogNetPortRefScalar(const std::string &name,
|
||||||
VerilogNet *net);
|
VerilogNet *net);
|
||||||
virtual ~VerilogNetPortRefScalar();
|
~VerilogNetPortRefScalar() override;
|
||||||
virtual bool isScalar() const { return true; }
|
bool isScalar() const override { return true; }
|
||||||
virtual int size(VerilogModule *module);
|
int size(VerilogModule *module) override;
|
||||||
virtual VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
VerilogNetNameIterator *nameIterator(VerilogModule *module,
|
||||||
VerilogReader *reader);
|
VerilogReader *reader) override;
|
||||||
virtual bool hasNet() { return net_ != nullptr; }
|
bool hasNet() override { return net_ != nullptr; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
VerilogNet *net_;
|
VerilogNet *net_;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue