diff options
author | whitequark <whitequark@whitequark.org> | 2021-03-12 01:34:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 01:34:06 +0000 |
commit | 396ad17e06a7b5fa912180540206a6560b54101f (patch) | |
tree | 0cacec7d21e9162d776ec2b9cd0d3369e0f65504 /frontends/ast | |
parent | feff32914bfeefbc7e02cc73639ce3d7ae44d331 (diff) | |
parent | cb9f3b6abfbc769589e5e5ceb2497955a155065c (diff) | |
download | yosys-396ad17e06a7b5fa912180540206a6560b54101f.tar.gz yosys-396ad17e06a7b5fa912180540206a6560b54101f.tar.bz2 yosys-396ad17e06a7b5fa912180540206a6560b54101f.zip |
Merge pull request #2653 from zachjs/global-parameter
verilog: disallow overriding global parameters
Diffstat (limited to 'frontends/ast')
-rw-r--r-- | frontends/ast/ast.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/frontends/ast/ast.cc b/frontends/ast/ast.cc index b601d2e25..06e2e23a8 100644 --- a/frontends/ast/ast.cc +++ b/frontends/ast/ast.cc @@ -1286,6 +1286,8 @@ void AST::process(RTLIL::Design *design, AstNode *ast, bool dump_ast1, bool dump } else { // must be global definition + if ((*it)->type == AST_PARAMETER) + (*it)->type = AST_LOCALPARAM; // cannot be overridden (*it)->simplify(false, false, false, 1, -1, false, false); //process enum/other declarations design->verilog_globals.push_back((*it)->clone()); current_scope.clear(); |