module tb;
enum {A, B, C, D} state;
initial begin
$display(“Default value of enum variable = %0d”, state);
$display(“Name = %s”, state);
end
endmodule
outputs : Default value of enum variable = 0
# Name = A
module tb;
enum {A=1, B, C, D} state;
initial begin
$display(“Default value of enum variable = %0d”, state);
$display(“Name = %s”, state.name());
end
endmodule
Outputs: Default value of enum variable = 0
# Name =
Hello , Dave why in second code the default value of enumarated varaible is not coming as first value of enum.