MAJOR: Add multithreaded model generation.

This commit is contained in:
Wilson Snyder
2018-07-22 20:54:28 -04:00
parent 0070520edb
commit ec8dbbffed
48 changed files with 5949 additions and 71 deletions
+25 -4
View File
@@ -31,6 +31,8 @@
#include "V3Ast.h"
#include "V3File.h"
#include "V3Global.h"
#include "V3Graph.h"
#include "V3PartitionGraph.h" // Just for mtask dumping
//======================================================================
// Special methods
@@ -151,22 +153,26 @@ AstNodeBiop* AstEqWild::newTyped(FileLine* fl, AstNode* lhsp, AstNode* rhsp) {
}
}
AstExecGraph::AstExecGraph(FileLine* fileline)
: AstNode(fileline) {
m_depGraphp = new V3Graph;
}
AstExecGraph::~AstExecGraph() {
delete m_depGraphp; VL_DANGLING(m_depGraphp);
}
bool AstVar::isSigPublic() const {
return (m_sigPublic || (v3Global.opt.allPublic() && !isTemp() && !isGenVar()));
}
bool AstVar::isScQuad() const {
return (isSc() && isQuad() && !isScBv() && !isScBigUint());
}
bool AstVar::isScBv() const {
return ((isSc() && width() >= v3Global.opt.pinsBv()) || m_attrScBv);
}
bool AstVar::isScUint() const {
return ((isSc() && v3Global.opt.pinsScUint() && width() >= 2 && width() <= 64) && !isScBv());
}
bool AstVar::isScBigUint() const {
return ((isSc() && v3Global.opt.pinsScBigUint() && width() >= 65 && width() <= 512) && !isScBv());
}
@@ -441,6 +447,16 @@ AstVar* AstVar::scVarRecurse(AstNode* nodep) {
return NULL;
}
string AstVar::mtasksString() const {
std::ostringstream os;
os<<" all: ";
for (MTaskIdSet::const_iterator it = m_mtaskIds.begin();
it != m_mtaskIds.end(); ++it) {
os<<*it<<" ";
}
return os.str();
}
AstNodeDType* AstNodeDType::dtypeDimensionp(int dimension) {
// dimension passed from AstArraySel::dimension
// Dimension 0 means the VAR itself, 1 is the closest SEL to the AstVar,
@@ -970,6 +986,11 @@ void AstSliceSel::dump(std::ostream& str) {
str<<" decl"<<declRange();
}
}
void AstMTaskBody::dump(std::ostream& str) {
this->AstNode::dump(str);
str<<" ";
m_execMTaskp->dump(str);
}
void AstTypeTable::dump(std::ostream& str) {
this->AstNode::dump(str);
for (int i=0; i<(int)(AstBasicDTypeKwd::_ENUM_MAX); ++i) {