Describe the bug
When instantiating a module where a parameter has a default that depends on definitions from a package with a structured assignment, slang complains that it can't find a symbol only if when the module is instantiated we try to override the parameter value. If I don't use default I don't seem to get this failure so I'm not entirely sure exactly what is happening here, I think it looks like a scoping issue where when resolving my_pkg::CaseA the wrong scope is being used but I may be wrong.
To Reproduce
package my_pkg;
typedef enum logic {
CaseA
} unit_t;
typedef struct {
unit_t val;
} struct_t;
endpackage
module param_top #(
parameter my_pkg::struct_t Param = '{default: my_pkg::CaseA}
);
endmodule
module top;
param_top f(); // elaborates fine
param_top #(.Param('{my_pkg::CaseA})) g(); // reports error: 'my_pkg' is a package, did you mean to use '::' here?
endmodule
Ran with slang file.sv, latest HEAD (71c4be209f98ec1f5b19649a598c4a5c24bb8aab)
Describe the bug When instantiating a module where a parameter has a default that depends on definitions from a package with a structured assignment,
slang
complains that it can't find a symbol only if when the module is instantiated we try to override the parameter value. If I don't usedefault
I don't seem to get this failure so I'm not entirely sure exactly what is happening here, I think it looks like a scoping issue where when resolvingmy_pkg::CaseA
the wrong scope is being used but I may be wrong.To Reproduce
Ran with
slang file.sv
, latest HEAD (71c4be209f98ec1f5b19649a598c4a5c24bb8aab)