Coefficient Reload FIR Filter Design Example v9.1 README File This readme file for the Coefficient Reload Finite Impulse Response (FIR) Filter Design contains information about the design example posted on the Altera Support website: http://www.altera.com/support/examples/exm-index.html Ensure that you have read the information on the design example web page before using the example. This readme file contains the following sections: o Package Contents o Tool Requirements o Quartus II Compilation o ModelSim Simulation Models o Release History o Design Examples Disclaimer o Contacting Altera Package Contents ================ Coefficient Reload FIR Filter Example v9.1 Design files in the zip download include: o coef_reload_tb.v - Testbench file o fir91.v - FIR compiler wrapper file o coef_reload_msim.tcl - Tcl script for running functional simulation using ModelSim? o coef_seq.exe - Windows executable that reorders the coefficients Tool Requirements ================= This design example requires the following software package: o Quartus II 9.1 or later o FIR Compiler v9.1 o ModelSim version 6.3g or later Please contact your local sales representative if you do not have one of these software tools. Description of Design Example ============================= This design example demonstrates how to reload coefficients from a file when using the Altera FIR Compiler IP MegaCore function. FIR Compiler provides the flexibility to change the coefficients at run time. While the FIR Compiler is processing the data with one set of coefficients, you can reload another set without halting core processing. To optimize silicon efficiency, coefficients are not stored in their natural order. This example explains the steps reordering the coefficients using the precompiled executable coef_seq.exe. The filter uses four sets of coefficients: low pass, high pass, band pass, and band reject filters. The first two are parameterized in the IP Toolbench; the latter two must be reloaded at run-time and require reordering in advance. The provided testbench shows you how to set up controls to reload the coefficients to meet the timing requirements. To get more details on the FIR Compiler IP, refer to the FIR Compiler User Guide located at: http://www.altera.com/literature/ug/fircompiler_ug.pdf Quartus II Compilation ====================== To run the compilation for the Coefficient Reload FIR Filter project in Quartus II, perform the following steps: 1. Open Quartus II project: File -> Open Project -> \coef_reload\fir91.qpf 2. Review the FIR Compiler user library setting: Assignments -> Settings -> Category (User Libraries) Browse to the C:\altera\91\ip\fir_compiler\lib in the Library name box. 3. Review FIR Compiler parameters using IP Toolbench: Tools -> MegaWizard Plug-in Manager Select "Edit an existing custom megafunction variation" and choose the FIR intellectual property (IP) block: /coef_reload/fir91.v You can review the parameters by clicking on the "Parameterize" button in IP Toolbench. 4. Regenerate the FIR core files by clicking on the "Generate" button in IP Toolbench. 5. You are ready to compile the design in Quartus II: Processing -> Start Compilation Reorder coefficient with provided C++ program ============================================= 1. Bring up a DOS command line prompt and set the path to your working directory. 2. Type in command line to generate re-ordered coefficients: coef_seq fir91_coef_bandpass.txt fir91_coef_reload_bandpass.txt PAR M4K MSYM 16 2 SGL 1 16 coef_seq fir91_coef_bandreject.txt fir72_coef_reload_bandreject.txt PAR M4K MSYM 16 2 SGL 1 16 Note: For detail of how to set the parameters, please refer to FIR User Guide (ug_fir_compiler.pdf) ModelSim Simulation Models ========================== In IP Toolbench, the option to generate Verilog simulation model is enabled in the "Set Up Simulation" window. The steps to generate the simulation models from IP Toolbench are highlighted in the previous section: "Quartus II Compilation". We will be using these IP Toolbench-generated IP functional simulation models to verify the design in ModelSim. To run the functional simulation for the Coefficient Reload FIR Filter project using ModelSim, perform the following steps: 1. From the ModelSim software click Change Directory (File menu) to the Current Directory. 2. Modify the path in coef_reload_msim.tcl to your working directory 3. To run the ModelSim simulation, click Execute Macro (Tools menu) and select coef_reload_msim.tcl. The TCL script sets up the ModelSim project, compiles the appropriate libraries and design files, runs the simulation, and displays the result in the waveform editor. 4. Compare the reloaded FIR outputs with fir91_coef_bandpass.txt and fir91_coef_bandreject.txt. Release History =============== Version 9.1 December 2009 Update to FIR Compiler v9.1 Version 7.2 November 2007 Update to FIR Compiler v7.2 Version 3.3.1 2004 Initial release 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. Contacting Altera ================= Although we have made every effort to ensure that this design example works correctly, there might be problems that we have not encountered. If you have a question or problem that is not answered by the information provided in this readme file or the example's documentation, please contact your Altera Field Applications Engineer. If you have additional questions that are not answered in the documentation provided with this function, please contact Altera Applications: World-Wide Web: http://www.altera.com http://www.altera.com/mysupport/ Technical Support Hotline: (800) 800-EPLD (U.S.) (408) 544-7000 (Internationally) Copyright (c) 2009 Altera Corporation. All rights reserved.