Accessing RAM instance from multiple modules in Verilog
If you're trying to model how actual hardware would do it, you should: 


Define an interface with the necessary ports (read/write, address, write data, return data)
Add these ports to any unit which wishes to access the ram.
Create an arbitration module which connects to all the other modules with ram interface ports, and let this module arbitrate the requests of all the different modules, access the physical ram, and return the read data to the module which requested it.


If you're just doing this for simulation and you don't care about synthesis, then you can just use a hierarchical reference to a ram block somewhere (simtop.u_ram.wr_data = 0x123). But I think writing it in a synthesizable way as described above is the most clean and logical way to do it.