AHDL: Parameterized RAM with Separate Input & Output Ports (lpm_ram_dq)
This example implements a RAM block with 256 32-bit words. This design fits in 4 FLEX 10K embedded array blocks (EABs), with each EAB containing 8 bits of the total word. This example uses an Include Statement (shown in blue text) to import the contents of the Include File containing the Function Prototype of the lpm_ram_dq function. An Instance Declaration (shown in red text) implements an instance of the function.
For more information on using this example in your project, go to:
ram_dq.tdf
INCLUDE "lpm_ram_dq.inc";
SUBDESIGN ram_dq
(
clk : INPUT;
we : INPUT;
ram_data[31..0] : INPUT;
ram_add[7..0] : INPUT;
data_out[31..0] : OUTPUT;
)
BEGIN
data_out[31..0] = lpm_ram_dq (ram_data[31..0], ram_add[7..0], we, clk, clk)
WITH (LPM_WIDTH=32, LPM_WIDTHAD=8);
END;
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.
|