This example describes a 64-bit x 8-bit synchronous, true dual-port RAM design with any combination of independent read or write operations in the same clock cycle in Verilog HDL. The design unit dynamically switches between read and write operations with the write enable input of the respective port. Synthesis tools are able to detect RAM designs in the HDL code and automatically infer the
altdpram megafunctions depending on the target device architecture.
Figure 1. True Dual-Port RAM with a Single Clock Top-Level Diagram
Download the files used in this example:
The use of this design is governed by, and subject to, the terms and conditions of the Altera Hardware Reference Design License Agreement.
Table 1 lists the ports of the true dual-port RAM with a single clock design.
|Table 1. True Dual-Port RAM with a Single Clock Port Listing|
||Input||8-bit data inputs of port A and port B|
||Input||6-bit address inputs of port A and port B|
||Input||Write enable inputs of port A and port B|
8-bit data outputs of port A and port B
Design Examples Disclaimer
These design examples may only be used within Altera Corporation devices and remain the property of Altera. They are being provided on an “as-is” basis and as an accommodation; therefore, all warranties, representations, or guarantees of any kind (whether express, implied, or statutory) including, without limitation, warranties of merchantability, non-infringement, or fitness for a particular purpose, are specifically disclaimed. Altera expressly does not recommend, suggest, or require that these examples be used in combination with any other product not provided by Altera.