Creating and Instantiating a Verilog HDL RAM Function for Use with the FPGA Compiler II Software
You can create or modify design files that contain custom megafunction variations of Altera-provided functions. You can then instantiate the custom megafunction variations in a design file for use with the FPGA Compiler II and Quartus II software. This procedure shows only how to instantiate a RAM megafunction using Verilog HDL; however, you can use similar procedures to instantiate other Altera-provided functions.
Open the MegaWizard Plug-In Manager and specify appropriate options for the megafunction you want to instantiate.
The MegaWizard Plug-In Manager generates custom megafunction variations that are based on Altera-provided megafunctions, including library of parameterized modules (LPM) functions, as well as Altera megafunctions.
Refer to the following example to create a Verilog HDL custom megafunction variation of the lpm_ram_dq function:
To prepare the Verilog HDL design for synthesis with the FPGA Compiler II software, you must specify that the tool should treat the design file created in the MegaWizard Plug-In Manager as a black box. The software then makes the correct connections to the ports in the EDIF netlist file (.edf). The Quartus II software reads in the EDIF netlist file as an EDIF Input File (.edf) and processes the instantiated megafunction. If the top-level design file doesn't have a module declaration, the FPGA Compiler II software infers a black box. The MegaWizard Plug-In Manager also generates a file with the extension _bb.v that can be used as an empty module declaration for use as a black box. To treat the design file for the megafunction as a black box, refer to the following example: