beautypg.com

Altera Serial Digital Interface (SDI) MegaCore Function User Manual

Page 24

background image

2–10

Chapter 2: Getting Started

Simulating the Design

Serial Digital Interface (SDI) MegaCore Function

February 2013

Altera Corporation

User Guide

For Cyclone IV GX devices, Altera provides two new fixed testbenches in the
simulation\modelsim\

<video standard>\<DPRIO mode>\modelsim directory, where

<video standard>\<DPRIO mode> is trsdi_c4gx\channel_reconfig or
trsdi_c4gx\pll_reconfig

. The testbenches instantiate the design and test the triple

standard mode of operation using Cyclone IV GX devices. The testbenches also
demonstrate the transceiver dynamic reconfiguration with channel and phase-locked
loop (PLL) reconfiguration modes. To use one of these testbenches with the
ModelSim-Altera simulator, follow these steps:

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

simulation\modelsim\

<video standard>\<DPRIO mode>\modelsim\sdi_sim.do.

Edit it to point to your installation of the ModelSim-Altera simulator, and edit the
path:

set QUARTUS_ROOTDIR = C:\altera\\quartus

1

Where <version> is the version of the Quartus II software you are using.

2. Start the ModelSim-Altera simulator.

3. Run sdi_sim.do in the

simulation\modelsim\

<video standard>\<DPRIO mode>\modelsim directory.

This file compiles the design and starts the ModelSim-Altera simulator. A selection
of signals appears on the waveform viewer.

To test the transmitter operation, the testbench generates a reference clock and parallel
video data. The design encodes and serializes this parallel video data. The serial
output is sampled, non-return to zero inverted (NRZI) decoded, descrambled, and
then reconstructed into parallel form. The testbench detects the presence of TRS
tokens (end of active video (EAV) and start of active video (SAV)) in the output to
check the correct operation.

To test the receiver operation, the testbench connects the serial transmitter data to the
receiver input. The testbench checks that the receiver achieves word alignment and
verifies that the extracted LN is correct.

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 about NativeLink, refer to the

Simulating Altera Designs

chapter

in volume 3 of the Quartus II Handbook.

Altera provides the following three Quartus II projects for use with NativeLink in the
ip\altera\sdi\simulation

directory:

HD-SDI in the hdsdi directory

HD-SDI 3 Gbps in the hdsdi_3g directory

HD-SDI dual link in the hdsdi_dual_link directory

Triple standard SDI in the trsdi directory