3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 17:15:33 +00:00

Remember global declarations and defines accross read_verilog calls

This commit is contained in:
Clifford Wolf 2016-11-15 12:42:43 +01:00
parent a2206180d6
commit a926a6afc2
6 changed files with 23 additions and 8 deletions

View file

@ -306,6 +306,8 @@ RTLIL::Design::~Design()
delete it->second;
for (auto n : verilog_packages)
delete n;
for (auto n : verilog_globals)
delete n;
}
RTLIL::ObjRange<RTLIL::Module*> RTLIL::Design::modules()

View file

@ -793,7 +793,8 @@ struct RTLIL::Design
int refcount_modules_;
dict<RTLIL::IdString, RTLIL::Module*> modules_;
std::vector<AST::AstNode*> verilog_packages;
std::vector<AST::AstNode*> verilog_packages, verilog_globals;
dict<std::string, std::pair<std::string, bool>> verilog_defines;
std::vector<RTLIL::Selection> selection_stack;
dict<RTLIL::IdString, RTLIL::Selection> selection_vars;