How to convert the uvm generated instruction sequence to hex code (.hex file )

HI dave,

I am working on microcontroller CPU verification using UVM. CPU will accept only hex code (.hex) instructions.  Once my randomization is completed, the sequence of instruction are getting generated. Now i need to dump it into the flash of CPU to execute independently.

My question is , how can i convert the UVM stimulus into hex code (.hex file ) before going to dump into flash memory???

Please help me out !!!

In reply to Venkatraman Kshatriyan:

Have you considered using Verilog/SV FileIO system functions? Once sequence of instructions is generated, make use of file i/o functions to write into .hex file.