I have a situation in which a FIFO can be written by two interfaces: one is the direct FIFO interface (for fast data transfer), another is an interface coming from the Register Map. I need to develop a mux to select between these two interfaces on the basis of a control bit. Both interfaces have different clocks. So, I need to implement CDC as well. Can you please suggest a good approach to implement this?
I´d start with what a design should start: Defining the requirements, like timing, signals ... then drawing a sketch....
Requirments alo are:
* who is the master
* what happens when both interfaces want to write
* what the protocol needs to be, so the receiver can correctly define the data
* what is the master clock
* and so on
one of the great features of a FIFO is handling multiple clock domains; you’re throwing that away. Maybe you could use one FIFO for each clock domain and multiplex the FIFO outputs. Not sure if that would work for your particular situation