I am trying to interface a module (let's call it main_module) with a Dual Port Block RAM memory generated by the Xilinx CORE Generator. Both the modules transmit and receive data with each other and run at markedly different clock speeds. In order to cater for the synchronization issues faced in interfacing, I have decided to use an asynchronous FIFO (also generated by the Xilinx CORE Generator). With regards to this I have some confusions:
- How can I efficiently change the assignment of FIFO Read and Write clocks for bi directional communication between the main_module and BRAM? In the memory write mode, the WR_CLK of FIFO would be that of the main_module and the RD_CLK of FIFO would be that of the BRAM module. In the memory read mode, the clocks would be oppositely assigned. Same will be with the DIN and DOUT pins assignment of FIFO. The read and write modes are selected through input signals.
- What about the memory addresses? They would be generated in the main_module and have to be passed to the BRAM. Should synchronization be done for that too? If yes then what would be the most efficient manner for that?