Simulate with the modelsim simulator – Altera ASI MegaCore Function User Manual

Page 13

Advertising
background image

2–4

Chapter 2: Getting Started

Design Flow

Asynchronous Serial Interface (ASI) MegaCore Function User Guide

January 2014

Altera Corporation

Simulate with the ModelSim Simulator

Altera provides a fixed testbench as an example in the simulation\testbench\
directory. The testbench instantiates the design and tests the ASI operation. To use the
testbench with the ModelSim

®

simulator, follow these steps:

1. In a text editor, open the simulation batch file,

simulation\modelsim\modelsim\asi_sim.bat

, and edit it to point to your

installation of the ModelSim-Altera simulator.

2. Start the ModelSim-Altera simulator.

3. Run asi_sim.bat in the simulation\modelsim\modelsim directory. This file

compiles the design and starts the ModelSim-Altera simulator. A selection of
signals appears on the waveform viewer. The simulation runs automatically,
providing a pass/fail indication on completion.

Simulating in Third-Party Simulation Tools Using NativeLink

You can perform a simulation in a third-party simulation tool from within the
Quartus II software, using NativeLink.

f

For more information on NativeLink, refer to the

Simulating Altera IP in Third-Party

Simulation Tools

chapter in volume 3 of the Quartus II Handbook.

Altera provides a Quartus II project for use with NativeLink in the
ip\asi\simulation\quartus

directory.

To set up simulation in the Quartus II software using NativeLink, follow these steps:

1. On the File menu click Open Project. Browse to the ip\asi\simulation\quartus

directory.

2. Open asi_sim.qpf.

3. Set up the Quartus II NativeLink.

a. On the Assignments menu, click Settings.

b. In the Category list, expand EDA Tool Settings and select Simulation.

c. In Tool name list, select a simulation tool.

1

Check that the absolute path to your third-party simulator executable is set.
On the Tools menu, click Options and select EDA Tools Options.

d. Under NativeLink settings, select Compile test bench and click Test Benches.

e. Click New in the Test Benches dialog box to create a testbench.

Advertising