clang-format remaining sources. No functional change.

This commit is contained in:
Wilson Snyder
2020-04-15 07:58:34 -04:00
parent 1b94e3b0e2
commit f3308d236b
85 changed files with 14640 additions and 13099 deletions
+153 -127
View File
@@ -26,50 +26,49 @@
#include <list>
//######################################################################
// ProtectLib top-level visitor
class ProtectVisitor : public AstNVisitor {
private:
AstVFile* m_vfilep; // DPI-enabled Verilog wrapper
AstCFile* m_cfilep; // C implementation of DPI functions
private:
AstVFile* m_vfilep; // DPI-enabled Verilog wrapper
AstCFile* m_cfilep; // C implementation of DPI functions
// Verilog text blocks
AstTextBlock* m_modPortsp; // Module port list
AstTextBlock* m_comboPortsp; // Combo function port list
AstTextBlock* m_seqPortsp; // Sequential function port list
AstTextBlock* m_modPortsp; // Module port list
AstTextBlock* m_comboPortsp; // Combo function port list
AstTextBlock* m_seqPortsp; // Sequential function port list
AstTextBlock* m_comboIgnorePortsp; // Combo ignore function port list
AstTextBlock* m_comboDeclsp; // Combo signal declaration list
AstTextBlock* m_seqDeclsp; // Sequential signal declaration list
AstTextBlock* m_tmpDeclsp; // Temporary signal declaration list
AstTextBlock* m_hashValuep; // CPP hash value
AstTextBlock* m_comboParamsp; // Combo function parameter list
AstTextBlock* m_clkSensp; // Clock sensitivity list
AstTextBlock* m_comboIgnoreParamsp; // Combo ignore parameter list
AstTextBlock* m_seqParamsp; // Sequential parameter list
AstTextBlock* m_nbAssignsp; // Non-blocking assignment list
AstTextBlock* m_seqAssignsp; // Sequential assignment list
AstTextBlock* m_comboAssignsp; // Combo assignment list
AstTextBlock* m_comboDeclsp; // Combo signal declaration list
AstTextBlock* m_seqDeclsp; // Sequential signal declaration list
AstTextBlock* m_tmpDeclsp; // Temporary signal declaration list
AstTextBlock* m_hashValuep; // CPP hash value
AstTextBlock* m_comboParamsp; // Combo function parameter list
AstTextBlock* m_clkSensp; // Clock sensitivity list
AstTextBlock* m_comboIgnoreParamsp; // Combo ignore parameter list
AstTextBlock* m_seqParamsp; // Sequential parameter list
AstTextBlock* m_nbAssignsp; // Non-blocking assignment list
AstTextBlock* m_seqAssignsp; // Sequential assignment list
AstTextBlock* m_comboAssignsp; // Combo assignment list
// C text blocks
AstTextBlock* m_cHashValuep; // CPP hash value
AstTextBlock* m_cComboParamsp; // Combo function parameter list
AstTextBlock* m_cComboInsp; // Combo input copy list
AstTextBlock* m_cComboOutsp; // Combo output copy list
AstTextBlock* m_cSeqParamsp; // Sequential parameter list
AstTextBlock* m_cSeqClksp; // Sequential clock copy list
AstTextBlock* m_cSeqOutsp; // Sequential output copy list
AstTextBlock* m_cIgnoreParamsp; // Combo ignore parameter list
AstTextBlock* m_cHashValuep; // CPP hash value
AstTextBlock* m_cComboParamsp; // Combo function parameter list
AstTextBlock* m_cComboInsp; // Combo input copy list
AstTextBlock* m_cComboOutsp; // Combo output copy list
AstTextBlock* m_cSeqParamsp; // Sequential parameter list
AstTextBlock* m_cSeqClksp; // Sequential clock copy list
AstTextBlock* m_cSeqOutsp; // Sequential output copy list
AstTextBlock* m_cIgnoreParamsp; // Combo ignore parameter list
string m_libName;
string m_topName;
bool m_foundTop; // Have seen the top module
bool m_foundTop; // Have seen the top module
// VISITORS
virtual void visit(AstNetlist* nodep) VL_OVERRIDE {
m_vfilep = new AstVFile(nodep->fileline(),
v3Global.opt.makeDir()+"/"+m_libName+".sv");
m_vfilep
= new AstVFile(nodep->fileline(), v3Global.opt.makeDir() + "/" + m_libName + ".sv");
nodep->addFilesp(m_vfilep);
m_cfilep = new AstCFile(nodep->fileline(),
v3Global.opt.makeDir()+"/"+m_libName+".cpp");
m_cfilep
= new AstCFile(nodep->fileline(), v3Global.opt.makeDir() + "/" + m_libName + ".cpp");
nodep->addFilesp(m_cfilep);
iterateChildren(nodep);
}
@@ -87,8 +86,8 @@ class ProtectVisitor : public AstNVisitor {
iterateChildren(nodep);
V3Hash hash = V3Hashed::uncachedHash(m_cfilep);
m_hashValuep->addText(fl, cvtToStr(hash.fullValue())+";\n");
m_cHashValuep->addText(fl, cvtToStr(hash.fullValue())+"U;\n");
m_hashValuep->addText(fl, cvtToStr(hash.fullValue()) + ";\n");
m_cHashValuep->addText(fl, cvtToStr(hash.fullValue()) + "U;\n");
m_foundTop = true;
}
@@ -127,47 +126,55 @@ class ProtectVisitor : public AstNVisitor {
// Comments
AstTextBlock* txtp = new AstTextBlock(fl);
addComment(txtp, fl, "Wrapper module for DPI protected library");
addComment(txtp, fl, "This module requires lib"+m_libName+
".a or lib"+m_libName+".so to work");
addComment(txtp, fl, "See instructions in your simulator for how"
addComment(txtp, fl,
"This module requires lib" + m_libName + ".a or lib" + m_libName
+ ".so to work");
addComment(txtp, fl,
"See instructions in your simulator for how"
" to use DPI libraries\n");
// Module declaration
m_modPortsp = new AstTextBlock(fl, "module "+m_libName+" (\n", false, true);
m_modPortsp = new AstTextBlock(fl, "module " + m_libName + " (\n", false, true);
txtp->addNodep(m_modPortsp);
txtp->addText(fl, ");\n\n");
// DPI declarations
hashComment(txtp, fl);
txtp->addText(fl, "import \"DPI-C\" function void "+
m_libName+"_protectlib_check_hash(int protectlib_hash__V);\n\n");
txtp->addText(fl, "import \"DPI-C\" function void " + m_libName
+ "_protectlib_check_hash(int protectlib_hash__V);\n\n");
initialComment(txtp, fl);
txtp->addText(fl, "import \"DPI-C\" function chandle "+
m_libName+"_protectlib_create(string scope__V);\n\n");
txtp->addText(fl, "import \"DPI-C\" function chandle " + m_libName
+ "_protectlib_create(string scope__V);\n\n");
comboComment(txtp, fl);
m_comboPortsp = new AstTextBlock(fl, "import \"DPI-C\" function longint "+
m_libName+"_protectlib_combo_update "
"(\n", false, true);
m_comboPortsp = new AstTextBlock(fl,
"import \"DPI-C\" function longint " + m_libName
+ "_protectlib_combo_update "
"(\n",
false, true);
m_comboPortsp->addText(fl, "chandle handle__V\n");
txtp->addNodep(m_comboPortsp);
txtp->addText(fl, ");\n\n");
seqComment(txtp, fl);
m_seqPortsp = new AstTextBlock(fl, "import \"DPI-C\" function longint "+
m_libName+"_protectlib_seq_update"
"(\n", false, true);
m_seqPortsp = new AstTextBlock(fl,
"import \"DPI-C\" function longint " + m_libName
+ "_protectlib_seq_update"
"(\n",
false, true);
m_seqPortsp->addText(fl, "chandle handle__V\n");
txtp->addNodep(m_seqPortsp);
txtp->addText(fl, ");\n\n");
comboIgnoreComment(txtp, fl);
m_comboIgnorePortsp = new AstTextBlock(fl, "import \"DPI-C\" function void "+
m_libName+"_protectlib_combo_ignore"
"(\n", false, true);
m_comboIgnorePortsp = new AstTextBlock(fl,
"import \"DPI-C\" function void " + m_libName
+ "_protectlib_combo_ignore"
"(\n",
false, true);
m_comboIgnorePortsp->addText(fl, "chandle handle__V\n");
txtp->addNodep(m_comboIgnorePortsp);
txtp->addText(fl, ");\n\n");
finalComment(txtp, fl);
txtp->addText(fl, "import \"DPI-C\" function void "+
m_libName+"_protectlib_final(chandle handle__V);\n\n");
txtp->addText(fl, "import \"DPI-C\" function void " + m_libName
+ "_protectlib_final(chandle handle__V);\n\n");
// Local variables
txtp->addText(fl, "chandle handle__V;\n\n");
@@ -189,16 +196,18 @@ class ProtectVisitor : public AstNVisitor {
// Initial
txtp->addText(fl, "initial begin\n");
txtp->addText(fl, m_libName+"_protectlib_check_hash(protectlib_hash__V);\n");
txtp->addText(fl, "handle__V = "+m_libName+"_protectlib_create"
"($sformatf(\"%m\"));\n");
txtp->addText(fl, m_libName + "_protectlib_check_hash(protectlib_hash__V);\n");
txtp->addText(fl, "handle__V = " + m_libName
+ "_protectlib_create"
"($sformatf(\"%m\"));\n");
txtp->addText(fl, "end\n\n");
// Combinatorial process
addComment(txtp, fl, "Combinatorialy evaluate changes to inputs");
m_comboParamsp = new AstTextBlock(fl, "always @(*) begin\n"
"last_combo_seqnum__V = "+
m_libName+"_protectlib_combo_update(\n",
m_comboParamsp = new AstTextBlock(fl,
"always @(*) begin\n"
"last_combo_seqnum__V = "
+ m_libName + "_protectlib_combo_update(\n",
false, true);
m_comboParamsp->addText(fl, "handle__V\n");
txtp->addNodep(m_comboParamsp);
@@ -210,14 +219,13 @@ class ProtectVisitor : public AstNVisitor {
m_clkSensp = new AstTextBlock(fl, "always @(", false, true);
txtp->addNodep(m_clkSensp);
txtp->addText(fl, ") begin\n");
m_comboIgnoreParamsp = new AstTextBlock(fl, m_libName+"_protectlib_combo_ignore(\n",
false, true);
m_comboIgnoreParamsp
= new AstTextBlock(fl, m_libName + "_protectlib_combo_ignore(\n", false, true);
m_comboIgnoreParamsp->addText(fl, "handle__V\n");
txtp->addNodep(m_comboIgnoreParamsp);
txtp->addText(fl, ");\n");
m_seqParamsp = new AstTextBlock(fl, "last_seq_seqnum__V <= "+m_libName+
"_protectlib_seq_update(\n",
false, true);
m_seqParamsp = new AstTextBlock(
fl, "last_seq_seqnum__V <= " + m_libName + "_protectlib_seq_update(\n", false, true);
m_seqParamsp->addText(fl, "handle__V\n");
txtp->addNodep(m_seqParamsp);
txtp->addText(fl, ");\n");
@@ -229,7 +237,7 @@ class ProtectVisitor : public AstNVisitor {
addComment(txtp, fl, "Select between combinatorial and sequential results");
txtp->addText(fl, "always @(*) begin\n");
m_seqAssignsp = new AstTextBlock(fl, "if (last_seq_seqnum__V > "
"last_combo_seqnum__V) begin\n");
"last_combo_seqnum__V) begin\n");
txtp->addNodep(m_seqAssignsp);
m_comboAssignsp = new AstTextBlock(fl, "end else begin\n");
txtp->addNodep(m_comboAssignsp);
@@ -237,15 +245,17 @@ class ProtectVisitor : public AstNVisitor {
txtp->addText(fl, "end\n\n");
// Final
txtp->addText(fl, "final "+m_libName+"_protectlib_final(handle__V);\n\n");
txtp->addText(fl, "final " + m_libName + "_protectlib_final(handle__V);\n\n");
txtp->addText(fl, "endmodule\n");
m_vfilep->tblockp(txtp);
}
void castPtr(FileLine* fl, AstTextBlock* txtp) {
txtp->addText(fl, m_topName+"_container* handlep__V = "
"static_cast<"+m_topName+"_container*>(vhandlep__V);\n");
txtp->addText(fl, m_topName
+ "_container* handlep__V = "
"static_cast<"
+ m_topName + "_container*>(vhandlep__V);\n");
}
void createCppFile(FileLine* fl) {
@@ -254,18 +264,18 @@ class ProtectVisitor : public AstNVisitor {
addComment(txtp, fl, "Wrapper functions for DPI protected library\n");
// Includes
txtp->addText(fl, "#include \""+m_topName+".h\"\n");
txtp->addText(fl, "#include \"" + m_topName + ".h\"\n");
txtp->addText(fl, "#include \"verilated_dpi.h\"\n\n");
txtp->addText(fl, "#include <cstdio>\n");
txtp->addText(fl, "#include <cstdlib>\n\n");
// Verilated module plus sequence number
addComment(txtp, fl, "Container class to house verilated object and sequence number");
txtp->addText(fl, "class "+m_topName+"_container: public "+m_topName+" {\n");
txtp->addText(fl, "class " + m_topName + "_container: public " + m_topName + " {\n");
txtp->addText(fl, "public:\n");
txtp->addText(fl, "long long m_seqnum;\n");
txtp->addText(fl, m_topName+"_container(const char* scopep__V):\n");
txtp->addText(fl, m_topName+"(scopep__V) {}\n");
txtp->addText(fl, m_topName + "_container(const char* scopep__V):\n");
txtp->addText(fl, m_topName + "(scopep__V) {}\n");
txtp->addText(fl, "};\n\n");
// Extern C
@@ -273,31 +283,32 @@ class ProtectVisitor : public AstNVisitor {
// Hash check
hashComment(txtp, fl);
txtp->addText(fl, "void "+m_libName+"_protectlib_check_hash"
"(int protectlib_hash__V) {\n");
txtp->addText(fl, "void " + m_libName
+ "_protectlib_check_hash"
"(int protectlib_hash__V) {\n");
m_cHashValuep = new AstTextBlock(fl, "int expected_hash__V = ");
txtp->addNodep(m_cHashValuep);
txtp->addText(fl, "if (protectlib_hash__V != expected_hash__V) {\n");
txtp->addText(fl, "fprintf(stderr, \"%%Error: cannot use "+m_libName+" library, "
"Verliog (%u) and library (%u) hash values do not "
"agree\\n\", protectlib_hash__V, expected_hash__V);\n");
txtp->addText(fl, "fprintf(stderr, \"%%Error: cannot use " + m_libName
+ " library, "
"Verliog (%u) and library (%u) hash values do not "
"agree\\n\", protectlib_hash__V, expected_hash__V);\n");
txtp->addText(fl, "exit(EXIT_FAILURE);\n");
txtp->addText(fl, "}\n");
txtp->addText(fl, "}\n\n");
// Initial
initialComment(txtp, fl);
txtp->addText(fl, "void* "+m_libName+"_protectlib_create"
" (const char* scopep__V) {\n");
txtp->addText(fl, m_topName+"_container* handlep__V = "
"new "+m_topName+"_container(scopep__V);\n");
txtp->addText(fl, "void* " + m_libName + "_protectlib_create(const char* scopep__V) {\n");
txtp->addText(fl, m_topName + "_container* handlep__V = new " + m_topName
+ "_container(scopep__V);\n");
txtp->addText(fl, "return handlep__V;\n");
txtp->addText(fl, "}\n\n");
// Updates
comboComment(txtp, fl);
m_cComboParamsp = new AstTextBlock(fl, "long long "+m_libName+"_protectlib_combo_update(\n",
false, true);
m_cComboParamsp = new AstTextBlock(
fl, "long long " + m_libName + "_protectlib_combo_update(\n", false, true);
m_cComboParamsp->addText(fl, "void* vhandlep__V\n");
txtp->addNodep(m_cComboParamsp);
txtp->addText(fl, ")\n");
@@ -310,8 +321,8 @@ class ProtectVisitor : public AstNVisitor {
txtp->addText(fl, "}\n\n");
seqComment(txtp, fl);
m_cSeqParamsp = new AstTextBlock(fl, "long long "+m_libName+"_protectlib_seq_update(\n",
false, true);
m_cSeqParamsp = new AstTextBlock(
fl, "long long " + m_libName + "_protectlib_seq_update(\n", false, true);
m_cSeqParamsp->addText(fl, "void* vhandlep__V\n");
txtp->addNodep(m_cSeqParamsp);
txtp->addText(fl, ")\n");
@@ -324,8 +335,8 @@ class ProtectVisitor : public AstNVisitor {
txtp->addText(fl, "}\n\n");
comboIgnoreComment(txtp, fl);
m_cIgnoreParamsp = new AstTextBlock(fl, "void "+m_libName+"_protectlib_combo_ignore(\n",
false, true);
m_cIgnoreParamsp = new AstTextBlock(
fl, "void " + m_libName + "_protectlib_combo_ignore(\n", false, true);
m_cIgnoreParamsp->addText(fl, "void* vhandlep__V\n");
txtp->addNodep(m_cIgnoreParamsp);
txtp->addText(fl, ")\n");
@@ -333,7 +344,7 @@ class ProtectVisitor : public AstNVisitor {
// Final
finalComment(txtp, fl);
txtp->addText(fl, "void "+m_libName+"_protectlib_final(void* vhandlep__V) {\n");
txtp->addText(fl, "void " + m_libName + "_protectlib_final(void* vhandlep__V) {\n");
castPtr(fl, txtp);
txtp->addText(fl, "handlep__V->final();\n");
txtp->addText(fl, "delete handlep__V;\n");
@@ -346,11 +357,11 @@ class ProtectVisitor : public AstNVisitor {
virtual void visit(AstVar* nodep) VL_OVERRIDE {
if (!nodep->isIO()) return;
if (VN_IS(nodep->dtypep(), UnpackArrayDType)) {
nodep->v3error("Unsupported: unpacked arrays with protect-lib on "<<nodep->prettyNameQ());
nodep->v3error("Unsupported: unpacked arrays with protect-lib on "
<< nodep->prettyNameQ());
}
if (nodep->direction() == VDirection::INPUT) {
if (nodep->isUsedClock()
|| nodep->attrClocker() == VVarAttrClocker::CLOCKER_YES) {
if (nodep->isUsedClock() || nodep->attrClocker() == VVarAttrClocker::CLOCKER_YES) {
handleClock(nodep);
} else {
handleDataInput(nodep);
@@ -358,8 +369,8 @@ class ProtectVisitor : public AstNVisitor {
} else if (nodep->direction() == VDirection::OUTPUT) {
handleOutput(nodep);
} else {
nodep->v3error("Unsupported: protect-lib port direction: "<<
nodep->direction().ascii());
nodep->v3error(
"Unsupported: protect-lib port direction: " << nodep->direction().ascii());
}
}
@@ -369,18 +380,18 @@ class ProtectVisitor : public AstNVisitor {
string frstmt;
bool useSetWSvlv = V3Task::dpiToInternalFrStmt(varp, varp->name(), frstmt);
if (useSetWSvlv) {
return frstmt+" handlep__V->"+varp->name()+", "+varp->name()+");\n";
return frstmt + " handlep__V->" + varp->name() + ", " + varp->name() + ");\n";
}
return "handlep__V->"+varp->name()+" = "+frstmt+";\n";
return "handlep__V->" + varp->name() + " = " + frstmt + ";\n";
}
void handleClock(AstVar* varp) {
FileLine* fl = varp->fileline();
handleInput(varp);
m_seqPortsp->addNodep(varp->cloneTree(false));
m_seqParamsp->addText(fl, varp->name()+"\n");
m_clkSensp->addText(fl, "edge("+varp->name()+")");
m_cSeqParamsp->addText(fl, varp->dpiArgType(true, false)+"\n");
m_seqParamsp->addText(fl, varp->name() + "\n");
m_clkSensp->addText(fl, "edge(" + varp->name() + ")");
m_cSeqParamsp->addText(fl, varp->dpiArgType(true, false) + "\n");
m_cSeqClksp->addText(fl, cInputConnection(varp));
}
@@ -388,61 +399,76 @@ class ProtectVisitor : public AstNVisitor {
FileLine* fl = varp->fileline();
handleInput(varp);
m_comboPortsp->addNodep(varp->cloneTree(false));
m_comboParamsp->addText(fl, varp->name()+"\n");
m_comboParamsp->addText(fl, varp->name() + "\n");
m_comboIgnorePortsp->addNodep(varp->cloneTree(false));
m_comboIgnoreParamsp->addText(fl, varp->name()+"\n");
m_cComboParamsp->addText(fl, varp->dpiArgType(true, false)+"\n");
m_comboIgnoreParamsp->addText(fl, varp->name() + "\n");
m_cComboParamsp->addText(fl, varp->dpiArgType(true, false) + "\n");
m_cComboInsp->addText(fl, cInputConnection(varp));
m_cIgnoreParamsp->addText(fl, varp->dpiArgType(true, false)+"\n");
m_cIgnoreParamsp->addText(fl, varp->dpiArgType(true, false) + "\n");
}
void handleInput(AstVar* varp) {
m_modPortsp->addNodep(varp->cloneTree(false));
}
void handleInput(AstVar* varp) { m_modPortsp->addNodep(varp->cloneTree(false)); }
void handleOutput(AstVar* varp) {
FileLine* fl = varp->fileline();
m_modPortsp->addNodep(varp->cloneTree(false));
m_comboPortsp->addNodep(varp->cloneTree(false));
m_comboParamsp->addText(fl, varp->name()+"_combo__V\n");
m_comboParamsp->addText(fl, varp->name() + "_combo__V\n");
m_seqPortsp->addNodep(varp->cloneTree(false));
m_seqParamsp->addText(fl, varp->name()+"_tmp__V\n");
m_seqParamsp->addText(fl, varp->name() + "_tmp__V\n");
AstNodeDType* comboDtypep = varp->dtypep()->cloneTree(false);
m_comboDeclsp->addNodep(comboDtypep);
m_comboDeclsp->addText(fl, " "+varp->name()+"_combo__V;\n");
m_comboDeclsp->addText(fl, " " + varp->name() + "_combo__V;\n");
AstNodeDType* seqDtypep = varp->dtypep()->cloneTree(false);
m_seqDeclsp->addNodep(seqDtypep);
m_seqDeclsp->addText(fl, " "+varp->name()+"_seq__V;\n");
m_seqDeclsp->addText(fl, " " + varp->name() + "_seq__V;\n");
AstNodeDType* tmpDtypep = varp->dtypep()->cloneTree(false);
m_tmpDeclsp->addNodep(tmpDtypep);
m_tmpDeclsp->addText(fl, " "+varp->name()+"_tmp__V;\n");
m_tmpDeclsp->addText(fl, " " + varp->name() + "_tmp__V;\n");
m_nbAssignsp->addText(fl, varp->name()+"_seq__V <= "+varp->name()+"_tmp__V;\n");
m_seqAssignsp->addText(fl, varp->name()+" = "+varp->name()+"_seq__V;\n");
m_comboAssignsp->addText(fl, varp->name()+" = "+varp->name()+"_combo__V;\n");
m_cComboParamsp->addText(fl, varp->dpiArgType(true, false)+"\n");
m_nbAssignsp->addText(fl, varp->name() + "_seq__V <= " + varp->name() + "_tmp__V;\n");
m_seqAssignsp->addText(fl, varp->name() + " = " + varp->name() + "_seq__V;\n");
m_comboAssignsp->addText(fl, varp->name() + " = " + varp->name() + "_combo__V;\n");
m_cComboParamsp->addText(fl, varp->dpiArgType(true, false) + "\n");
m_cComboOutsp->addText(fl,
V3Task::assignInternalToDpi(varp, true, "", "", "handlep__V->"));
m_cSeqParamsp->addText(fl, varp->dpiArgType(true, false)+"\n");
m_cSeqParamsp->addText(fl, varp->dpiArgType(true, false) + "\n");
m_cSeqOutsp->addText(fl, V3Task::assignInternalToDpi(varp, true, "", "", "handlep__V->"));
}
public:
explicit ProtectVisitor(AstNode* nodep):
m_vfilep(NULL), m_cfilep(NULL), m_modPortsp(NULL),
m_comboPortsp(NULL), m_seqPortsp(NULL), m_comboIgnorePortsp(NULL), m_comboDeclsp(NULL),
m_seqDeclsp(NULL), m_tmpDeclsp(NULL), m_hashValuep(NULL),
m_comboParamsp(NULL),
m_clkSensp(NULL),
m_comboIgnoreParamsp(NULL), m_seqParamsp(NULL), m_nbAssignsp(NULL), m_seqAssignsp(NULL),
m_comboAssignsp(NULL), m_cHashValuep(NULL), m_cComboParamsp(NULL), m_cComboInsp(NULL),
m_cComboOutsp(NULL), m_cSeqParamsp(NULL), m_cSeqClksp(NULL), m_cSeqOutsp(NULL),
m_cIgnoreParamsp(NULL), m_libName(v3Global.opt.protectLib()),
m_topName(v3Global.opt.prefix()), m_foundTop(false)
{
public:
explicit ProtectVisitor(AstNode* nodep)
: m_vfilep(NULL)
, m_cfilep(NULL)
, m_modPortsp(NULL)
, m_comboPortsp(NULL)
, m_seqPortsp(NULL)
, m_comboIgnorePortsp(NULL)
, m_comboDeclsp(NULL)
, m_seqDeclsp(NULL)
, m_tmpDeclsp(NULL)
, m_hashValuep(NULL)
, m_comboParamsp(NULL)
, m_clkSensp(NULL)
, m_comboIgnoreParamsp(NULL)
, m_seqParamsp(NULL)
, m_nbAssignsp(NULL)
, m_seqAssignsp(NULL)
, m_comboAssignsp(NULL)
, m_cHashValuep(NULL)
, m_cComboParamsp(NULL)
, m_cComboInsp(NULL)
, m_cComboOutsp(NULL)
, m_cSeqParamsp(NULL)
, m_cSeqClksp(NULL)
, m_cSeqOutsp(NULL)
, m_cIgnoreParamsp(NULL)
, m_libName(v3Global.opt.protectLib())
, m_topName(v3Global.opt.prefix())
, m_foundTop(false) {
iterate(nodep);
}
};