3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-05-08 16:25:49 +00:00

Selective boolopt

This commit is contained in:
Alain Dargelas 2024-11-25 15:08:42 -08:00
parent e9b0f73cb3
commit c32d0a412c
8 changed files with 297 additions and 36 deletions

View file

@ -17,8 +17,6 @@
*
*/
#ifdef VERIFIC_LINEFILE_INCLUDES_LOOPS
#include <stack>
/*
This Visitor decorates the AST with a loop ID attribute for all outer for loops.
All AST nodes contained within the subtree of an outer for-loop
@ -41,7 +39,7 @@ class DecorateLoopsVisitor : public VeriVisitor
// We increase the loop count when we enter a new set of imbricated loops,
// That way we have a loop index for the outermost loop as we want to identify and group
// logic generated by imbricated loops
outerLoopId++;
outerLoopId = node.Linefile();
}
loopStack.push((VeriLoop *)&node);
}
@ -58,7 +56,7 @@ class DecorateLoopsVisitor : public VeriVisitor
if (loopStack.size()) {
if (loopStack.top() == (VeriLoop *)&node) {
loopStack.pop();
std::cout << "Loop out: " << (VeriFor *)&node << std::endl;
// std::cout << "Loop out: " << (VeriFor *)&node << std::endl;
return;
}
Verific::linefile_type linefile = (Verific::linefile_type)node.Linefile();
@ -73,6 +71,6 @@ class DecorateLoopsVisitor : public VeriVisitor
private:
std::stack<VeriLoop *> loopStack;
uint32_t outerLoopId = 0;
linefile_type outerLoopId = nullptr;
};
#endif