Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
This may not work in all scenario.Time multiplex the RAM access by running the single port RAM at 2x the speed of the logic reading and writing the RAM.
Do you mind to briefly describe your scenario?This may not work in all scenario.
The dual port memory can face any read or write scenario as usual a dual port memory face.Do you mind to briefly describe your scenario?
I've used this technique in FPGA designs where a true dual port couldn't be used due to lack of RAM resources. Large RAM with maximum width where doubling the width would double the amount of RAM blocks used, exceeding the devices block RAM count.This may not work in all scenario.
It appears it will work in all scenario. Only there is a latency of getting read data of writing a data of T/4 clock cycle of the original clock compared to no such latency from a dual port RAM.I've used this technique in FPGA designs where a true dual port couldn't be used due to lack of RAM resources. Large RAM with maximum width where doubling the width would double the amount of RAM blocks used, exceeding the devices block RAM count.
As the RAM is running at 2x the read/write clock frequency of the "dual-port" RAM you can access the RAM twice in one clock period. Both accesses are independent and can be either a read or write access to any address.
A true dual port RAM allows independent accesses to different read or write addresses, so the behavior is the same as the 2x clocked RAM. The main issue is the timing as you now have a half cycle setup/hold in/out of the RAM interface with the 1x read write logic.
So in what specific scenario does this not emulate a true dual port?
You will only see latency differences if you pipeline the read, otherwise what you will see is a read that occurs on a half cycle as the RAM is running at 2x the rest of the logic. In this case a real transparant latch can be used to capture the read data on the first half cycle. A read in the second half cycle will have limited setup time compared to a first half cycle read. Hence my previous comment about tighter timing.It appears it will work in all scenario. Only there is a latency of getting read data of writing a data of T/4 clock cycle of the original clock compared to no such latency from a dual port RAM.
Is there any timing scenario where this will fail compared to actual dual port ram?
How can a real transparant latch can be used to capture the read data on the first half cycle? The latch cannot cause the read data a half cycle to brought back at the beginning of the clock cycle for the same clock cycle.You will only see latency differences if you pipeline the read, otherwise what you will see is a read that occurs on a half cycle as the RAM is running at 2x the rest of the logic. In this case a real transparant latch can be used to capture the read data on the first half cycle. A read in the second half cycle will have limited setup time compared to a first half cycle read. Hence my previous comment about tighter timing.
I don't even have a clue what you meant by the above. The latch is there to hold the data from the first half of a clock cycle to the next rising edge of the clock. You obviously haven't drawn the timing diagram (which I won't do for you). FYI the logic outside the 2x clocked RAM is running on only ONE EDGE OF THE 1X CLOCK.How can a real transparant latch can be used to capture the read data on the first half cycle? The latch cannot cause the read data a half cycle to brought back at the beginning of the clock cycle for the same clock cycle.