HI,
I have a code like this.
class reg_class;
int DWIDTH;
endclass
module tb;
string param = "DWIDTH";
reg_class u_reg_class;
initial begin
u_reg_class = new();
u_reg_class.param = 30;
$display("%d",u_reg_class.param);
//u_reg_class.$sformatf("%s",parma) = 30;
//$display("%d",u_reg_class.$sformatf("%s",param));
end
endmodule
I want to access that class variable.
I have tried commented lines also but not useful, giving an error like “Character immediately after a period(‘.’) does not start an identifier”
So the question is how can i access those class variable with internal module variable.