Related to associative array

In reply to chr_sue:
hi
yes
i made task and calling these task in run
one task is controlled by master and other is by slave
this is my write task in master:-

if(cfg.master_slave_select == AXI_MASTER)
begin
for(int j=0;j<=tx.wlen;j++)
begin
@(posedge vif.aclk);
addr=ADDR_Q.pop_back;
strg.mem[addr]=dwdataQ1[j];


this is my read task by slave

if(cfg.master_slave_select == AXI_SLAVE)
begin
for(int i=0;i<=tx.rlen;i++)
begin
@(posedge vif.aclk);
$display("\tQueue_1 size in read data is %0d",RADDR_Q.size());
addrr=RADDR_Q.pop_back();
if(strg.mem.exists(addrr))
$display("memory",mem);
vif.rdata<=strg.mem[addrr];

these are two tasks,write and read. but master and slave can’t see each other as controlled by configuration. so, i amde a separate class visible to both, and i am writing on it
but still slave is not able to get the data