In reply to Pooja.balachandran: You can go through the examples given in: Systemverilog Dynamic Array - Verification Guide