Altera HyperTransport MegaCore Function User Manual

Page 25

Advertising
background image

Chapter 2: Getting Started

2–17

Example Simulation and Compilation

© November 2009

Altera Corporation

HyperTransport MegaCore Function User Guide

1

The file ht_top.vo is the IP functional simulation model corresponding to the ht_top.v
variation file included the this directory.

The test vectors consist of the following files:

input_ht_vector.dat

output_ht_vector.dat

input_ui_vector.dat

output_ui_vector.dat

When you simulate your design, the top module in the simulation file ht_top_tb.v
reads the input vectors at startup and drives them as test vectors to ht_top.vo. It
compares the outputs from ht_top.vo to the output vectors. If the simulation module
detects a mismatch, it displays an error and the simulation stops. If all of the vectors
match, the simulation displays a message indicating that the test passed. The test
vectors are described in

“About the Test Vectors” on page 2–18

.

1

The following simulation examples use an IP functional simulation model generated
with the Quartus II software version 9.1. When simulating your design, you must use
the simulation library files supplied with the version of the Quartus II software you
used to create the IP functional simulation model for your MegaCore function
variation.

Simulating Test Vectors Using ModelSim

To simulate with the test vectors interactively, perform the following steps:

1. Start the ModelSim software by executing the vsim command at a system

command prompt or by using the Windows Start menu.

2. In the Modelsim session, change your working directory to the Modelsim example

project directory <path>/ht/example/modelsim.

3. To map the correct libraries, compile the required files, and load and run the

simulation, type the following command:

do

run.do

r

To simulate with the test vectors without opening a Modelsim session, perform the
following steps:

1. Change your working directory to the ModelSim example project directory

<path>/ht/example/modelsim.

2. To map the correct libraries, compile the required files, and load and run the

simulation, perform one of the following steps:

On a supported Windows platform, double-click run.bat or, if scripting, type
the following command:

run

r

On a supported Linux operating system, at a system command prompt, type
the following command:

./run.sh

r

Advertising