I have got a memory module which consists of a memory
module memory(clk,rst,addr,data,wrt,rd); reg [7:0] mem [254:0]; I am using this memory module in the execute module and I want to use the memory without replicating it again in the execute module.
module execute(decoded_instr,clk,rst,instr_in); if(instr_in[3:2] == 2'b00) PR = mem[AR]; else if(instr_in[3:2] == 2'b01) DR = mem[AR]; else if(instr_in[3:2] == 2'b10) GR = mem[AR]; One method is to copy the content pointed by the register AR into a temp register in the memory module and use this temp register in the execute module like
temp_AR <= mem[AR]; and tie temp_AR in the execute module and use temp_AR like
PR = temp_AR; My question is, is there a way to perform the same operation using dot operator and access the memory?
Thanks in advance
dataoutput ofmemoryto connect toexecute? If that doesn't work for you, consider whether what you want can actually be physically made with the resources available in your system (FPGA or ASIC). \$\endgroup\$