0

I know we can override a generic/parameter in Verilog/SystemVerilog using vsim's option -GMYPARAM=VALUE.

This doesn't work for a localparam and the use of localparam in the module to prevent the change of the value isn't allowed.

mymod #(
  localparam A = 0  // not allowed
)(
...
);

Is there a way to override a localparam of a module or an instance from the tcl?

Alexis
  • 2,136
  • 2
  • 19
  • 47

1 Answers1

1

Normally the only way to override a localparam is by changing it to a parameter. But Modelsim has a vopt switch that global converts all localparam to parameters for the -G option. You can look it up in the ModelSim/Questa Reference Manual

dave_59
  • 39,096
  • 3
  • 24
  • 63