Passing string name as input to macro but internally it represents the actual value. Is that Possible?

In reply to desperadorocks:

Your problem is your uvm_warning/error messages you have **VARIABLE_NAME** when you meant to turn it into a string with "**VARIABLE_NAME**". `` is for building identifiers with macro arguments as parts of it. `" is for build strings with macro arguments as part of it. From your example, it looks like your macro only needs two arguments, with VARIABLE_VALUE used to create both an identifier and a string.

import uvm_pkg::*;
`include "uvm_macros.svh"
 
`define GET_VIF_HDL(VARIABLE_NAME, VARIABLE_VALUE) \
if (!uvm_config_db#(virtual VARIABLE_NAME)::get(.cntxt(null), .inst_name ("*"), .field_name(`"VARIABLE_VALUE`"), .value(VARIABLE_VALUE))) \
   `uvm_warning("CLASS", $sformatf("GET_VIF_HDL: Unable to find the Handle For: VARIABLE_NAME: %s, VARIABLE_NAME: %s!\n", `"VARIABLE_VALUE`", `"VARIABLE_VALUE`")) \
 else \
   `uvm_info("CLASS", $sformatf("GET_VIF_HDL: Received the Handle For: VARIABLE_NAME: %s, VARIABLE_VALUE: %s!\n", `"VARIABLE_NAME`", `"VARIABLE_VALUE`"), UVM_LOW) \
 
interface abc_interface;
    logic what;
endinterface: abc_interface 
 
class simpleclass;
    virtual abc_interface        abc_vif;
 
    function void get_vif();
    `GET_VIF_HDL(abc_interface, abc_vif)
    endfunction: get_vif
endclass: simpleclass
 
module simplertl;
   simpleclass   sc;
   abc_interface abc_if();
 
   initial begin 
     uvm_config_db #(virtual abc_interface)::set(null, "*", "abc_vif", abc_if);
   end
 
   initial begin
      sc = new();
      sc.get_vif();
   end
endmodule: simplertl