typedef enum {A,B,C,D,E,F,G,H,I,J} color;
class balls#(NUM=10);
rand color q1[$]; //declared a bounded queue with 10 elements of enum type
endclass
module top();
balls#(10) b= new();
initial begin
$display ("#############");
repeat (5) begin
b.randomize();
$display ("%p", b.q1);
end
$display ("#############");
end
endmodule
Hi, Please let me know what am I doing wrong in the above code I’m simply trying to print the queue of enum type color.
My queue is not getting printed with enum values instead I am getting all null queues : shown below
#############
'{}
'{}
'{}
'{}
'{}
#############