Create a new project for the testbench, Create the generator and checker files – Altera CRC Compiler User Manual
Page 25

Chapter 3: Functional Description
3–9
Running the Testbench Example
© November 2009
Altera Corporation
Preliminary
The CRC demonstration testbench is supported by the following simulators:
Verilog:
Mentor ModelSim SE and AE, Cadence NCSim, Synopsys VCS and VCS-
MX
VHDL:
Mentor ModelSim SE and AE, Cadence NCSim, and Synopsys VCS-MX.
For up-to-date information on the supported versions of these simulators, reference
the Altera website: www.altera.com.
Create a New Project for the Testbench
Following the steps below, create a Quartus II project in the testbench directory.
1. Choose New Project Wizard (File menu).
2. Click Next in the New Project Wizard Introduction page (the introduction page
does not display if you turned it off previously).
3. In the New Project Wizard: Directory, Name, Top-Level Entity page, enter the
following information:
a. Specify the working directory for your testbench project, which should be the
testbench
directory created in your previous project directory. For example,
this walkthrough uses the directory c:\altera\projects\crc_project\testbench.
b. Specify crcdemo for the name of the project.
The Quartus II software automatically specifies a top-level design entity that
has the same name as the project. This walkthrough assumes the names are the
same.
c. If the directory already exists, a dialog displays that asks what action to take.
Click the Delete the existing project and continue using the New Project
Wizard
and then click OK to continue.
4. The New Project Wizard: Add Files page displays.
a. Select the file crcdemo.v or crcdemo.vhd, depending on the language in which
your MegaCore function was created, and click Add to add the file to your
project.
b. Click Finish to add the file to your project.
Create the Generator and Checker Files
In this section, you create the generator and checker variation files.
1. Open the MegaWizard Plug-In Manager and click Edit an existing custom
megafunction variation
to edit the CRC generator wrapper file crcgen.v or
crcgen.vhd
2. Click Next to display the page from which you select the generator wrapper file,
crcgen.v
or crcgen.vhd, in the testbench directory.
3. After you select the crcgen.v or crcgen.vhd the file, click Next to continue.
1
You can review the parameters, but it is recommended that you don’t
change the settings.