Internals: Move array definitions to AstArrayDType instead of under AstVars.

Prep work for more complicated data types.
This commit is contained in:
Wilson Snyder
2009-11-04 22:31:53 -05:00
parent db2c6820ee
commit 700c1f836d
35 changed files with 435 additions and 454 deletions
+3 -3
View File
@@ -84,8 +84,8 @@ private:
virtual void visit(AstVar* nodep, AstNUser*) {
nodep->iterateChildren(*this);
if (nodep->arraysp() && nodep->isIO()) {
nodep->v3error("Arrayed variables may not be inputs nor outputs");
if (nodep->isIO() && !nodep->dtypep()->castBasicDType()) {
nodep->v3error("Unsupported: Inputs and outputs must be simple data types; no arrays");
}
if (m_ftaskp) nodep->funcLocal(true);
if (nodep->isSigModPublic()) {
@@ -124,7 +124,7 @@ private:
// Make a new temp wire
string newvarname = "__Vsenitemexpr"+cvtToStr(++m_senitemCvtNum);
AstVar* newvarp = new AstVar (sensp->fileline(), AstVarType::MODULETEMP, newvarname,
AstVar::LogicPacked(), 1);
AstLogicPacked(), 1);
// We can't just add under the module, because we may be inside a generate, begin, etc.
// We know a SenItem should be under a SenTree/Always etc, we we'll just hunt upwards
AstNode* addwherep = nodep; // Add to this element's next