Assigning signals stored in a string

Hi,

I have a scenario where I have multiple memory banks and each of these banks have a signal indexed by the bank #(mem_xlpe) which needs to be assigned with a value of 1 from my sequence. Instead of explicitly defining the signals for every project I though of using a for loop and $sformat to generate signal hierarchy and then assigning it with the value of interest. But the issue here is, through string lpe_path gets assigned with the right hierarchy, the value is not applied to the actual interface signal. Any thought on how this can be achieved?

for (int idx = 0; idx<`NUM_LMEM_BANKS; idx++) begin
$sformat(lpe_path, “m_env.vif.mem_%0dlpe”,idx);
lpe_path = 1’b1;
end

Thanks,
Rick

In reply to rikb2014:
You cannot use strings in place of variable identifiers. The only mechanisms are through C VPI code, or tool specific commands that are essentially built-in VPI routines.

But since you are already using the UVM, the Register Abstraction Layer (RAL) also has VPI code written to do this for you in what is called “backdoor access”.