Should we be allowing the following semantic

  • Thread starter parag_paul@hotmail.com
  • Start date
P

parag_paul@hotmail.com

Guest
module top;
class C;
logic [31:0] b1[]= new[100];
endclass

endmodule;

the dynamic array b1 is not even static
 
On Oct 8, 11:42 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com>
wrote:
module top;
class C;
logic [31:0] b1[]= new[100];
endclass

endmodule;

the dynamic array b1 is not even static
It is legal. Since the property is not static, the initializer is
applied when a class object is created. It is effectively a short-
hand for assigning the value at the start of the new() function.
There has been disagreement about whether it is applied before or
after the super.new() call in a derived class.
 

Welcome to EDABoard.com

Sponsor

Back
Top