*In reply to chr_sue:
I used the following function (corrected typo from previous one) -
function display_config() ;
uvm_printer printer_knobs;
printer_knobs.mcd = $fopen("CONFIG_OVERRIDE_FILE.txt"); // opening the file
this.print();
$fclose(mcd); // closing the file
endfunction
Compilation errors -
** Error: /local/saurabhc/p65bf6/p65bf6_uvm/p65bf6/model/p65bf6_config.sv(1736): Field/method name (mcd) not in ‘printer_knobs’
** Error (suppressible): /local/saurabhc/p65bf6/p65bf6_uvm/p65bf6/model/p65bf6_config.sv(1738): (vlog-7027) The name (‘mcd’) was not found in the current scope. Please verify the spelling of the name ‘mcd’.
*