In reply to watashi:
$psprintf need to be placed in an procedural bock for it to work. E.g. initial/function/task. While macro expansion works at probably compile/elaboration. This cannot be used!
UVM code also does not implement type_name/get_type_name() for parameterized classes. Refer `uvm_*_param_utils() macro for this. Either use your macros without String argument, in that case type_name based override will not be possible(same as UVM code) for parameterized class.
You could try using define in place of parameters and use below code, from UVM base class, and see if it works.. This basically converts anything to a string. Not sure of order for define and "S" as which will be resolved first.
`define m_uvm_component_registry_internal(T,S) \
typedef uvm_component_registry #(T,`"S`") type_id; \
static function type_id get_type(); \
return type_id::get(); \
endfunction \
If this does not work, then you are better without string argument to uvm_object_registry class.
`define m_uvm_object_registry_param(T) \
typedef uvm_object_registry #(T) type_id; \
static function type_id get_type(); \
return type_id::get(); \
endfunction \
virtual function uvm_object_wrapper get_object_type(); \
return type_id::get(); \
endfunction