How to call the Perl Script from UVM Testcase

how to call the Perl Script from UVM Testcase.

Below is code i am using but getting the error.

virtual task run_phase(uvm_phase phase);
int mid_data_val = (2**DATA_WIDTH)/4; int mid_high_data_val = 2*(2**DATA_WIDTH)/4;
int high_data_val = 3*(2**`DATA_WIDTH)/4;

    super.run_phase(phase);        
    phase.raise_objection(this);
        $system("test.pl");
        // Write all memories with low range directed data
    ...........

    .....
endtask

Error :-
/bin/sh: test.pl: command not found

Hi,
Did you try to write “perl test.pl” (instead of ‘test.pl’)?

In reply to rupeshblr:

You can also try putting the full path to the file in case you’re running from working directory that’s different from where test.pl exists.

So, if your perl script uses any data written from your simulation, you need to make sure you $flush the files before starting the script.

In reply to sylvainb:

Thanks, its working with perl test.pl

In reply to dave_59:
Thank you Dave