It was previously possible to override global parameters on a
per-instance basis. This could be dangerous when using positional
parameter bindings, hiding oversupplied parameters.
}
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();
--- /dev/null
+read_verilog -sv <<EOF
+parameter P = 1;
+module example(
+ output integer out
+);
+ assign out = P;
+endmodule
+module top(
+ output integer out
+);
+ example #(2) e1(out);
+endmodule
+EOF
+
+logger -expect error "Can't find object for defparam" 1
+hierarchy