Altera_Forum
Honored Contributor
12 years agoChange bus width with a FIFO
Hello,
I have a data source of 64bit @ 156.25Mhz and wish to convert this to 32bit @ 312.5Mhz. I create a Dual Clock FIFO with different widths, invert the 'rdempty' signal and attach it to the 'rdreq' port. This inverted 'rdempty' is also connected to a flip-flop to account for the 1 clock cycle of latency between 'rdreq' and 'rdempty', and becomes the 'data valid' for the 32bit word. The read clock is generated by a PLL from the 156.25Mhz clock. When I try this out, I find that my improvised 'data valid' for the 32bit data does not work and I end up with more than 2x the number of input words. I have tried removing the overflow protection and setting the megafunction to optimise for speed since my clocks are synchronised (http://www.alteraforum.com/forum/archive/index.php/t-6684.html) - but there is no change. The extra data is predictable, which is why I think I have misused the rdempty signal in some way, but from the timing diagrams in the FIFO manual (http://www.altera.co.uk/literature/ug/ug_fifo.pdf) I cannot see why this should not work. What have I done wrong? Is there an example showing the correct way to convert bus widths that I can use? SJ