Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/Chimera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,16 @@ static void removeInoutRegisters(Node *head) {
}
}

static void addGenvar(Node *head) {
if (head->type == NodeType::GENVAR_OPT) {
head->getChildren()[0]->setElement("genvar");
}

for (size_t i = 0; i < head->getChildren().size(); i++) {
addGenvar(head->getChildren()[i].get());
}
}

static void generateModules(
int n,
std::unordered_map<std::string, std::unordered_map<std::string, int>> map,
Expand Down Expand Up @@ -1096,6 +1106,7 @@ static void generateModules(
// Prepares for type inference
replaceTypes(m, lastID);
addConstantIDsToParameterList(m, declMap, dirMap);
addGenvar(m);

std::unordered_map<std::string, CanonicalTypes>
idToType; // maps an id to its inferred type
Expand Down