Accessing localparams in bind modules

I am writing a coverage module which has some of the signals in the RTL module as inputs. There are signals with a localparam in their signal definition.

How do i use the localparam’s defined inside the RTL in the Coverage module ?

In reply to diptishe:

It depends how you want to “use” the localparams. You can either use upward references, path them down just as if you had actually instantiated the module in your RTL.

module RTL_model();
  localparam W = 8;
  localparam X = 9;
  bit [W-1:0] signal='hab;
endmodule
module coverage_model #(int WW) (input [WW-1:0] sig);
  initial $strobe("%m signal: %h, X: %0d",sig,RTL_model.X); // RTL_model.X is an upward reference.
endmodule
module top;
  RTL_model dut();
  bind dut coverage_model#(.WW(W)) b(.sig(signal));
endmodule

note that the connections you make in your bind instance or from the perspective of the target scope.