Xilinx UG154 manual Customizing the Demonstration Test Bench, Test Case Package, Range

Models: UG154

1 58
Download 58 pages 8.78 Kb
Page 39
Image 39

Demonstration Test Bench

R

Lastly, the signal SnkInFrame is created in the status monitor by inverting SnkOof. This signal is used by the stimulus module to send training. See Appendix C, “Data and Status Monitor Warnings.”

Customizing the Demonstration Test Bench

The demonstration test bench can be used with default settings or customized to observe the behavior of the SPI-4.2 core for different configurations.

The demonstration test bench can be programmed to transmit a range of stimuli by modifying TSCLK_LCK.

Testcase Package—contains constants used by the testcase module

Testcase Module—generates data and status

Sink Calendar Sequence—contains the channel order for the Sink core status

Source Calendar Sequence—contains the channel order for the Source core status

The following sections describe each module, including customization methods and resulting behavior. The module descriptions are applicable to both VHDL and Verilog designs. Language-specific details for VHDL are provided in Appendix A, “VHDL Details.” Language-specific details and source code showing how to further randomize input to the SPI-4.2 core for Verilog are provided in Appendix B, “Verilog Details.”

Test Case Package

The test case package contains a list of constants that define the ways that the cores and demonstration test bench operate. Some of these are user-defined and can be modified, while others are defined when the core is generated. Table 4-10provides test bench constants that can be modified. These constants are modified by regenerating the core in the CORE Generator system.

Table 4-10:Testcase Package User-Defined Constants

Name

Constant

Default Value

Description

Type

(Range)

 

 

 

 

 

 

SNK_CAL_DATA

String

snk_calendar.dat

Contains the name of the file with the Sink

 

 

<filename>

calendar sequence to be programmed.

 

 

 

 

 

 

 

SRC_CAL_DATA

String

src_calendar.dat

Contains the name of the file with the Source

 

 

<filename>

calendar sequence to be programmed.

 

 

 

 

 

 

 

SNK_ALPHA_DATA

Integer

3 <0 - 255>

Sets the number of repetitions of the 20-word

 

 

 

training pattern sent to the Sink core (0 means

 

 

 

don’t send periodic training).

 

 

 

 

SNK_DATA_MAX_T

Integer

4000 <0-65535>

Sets the number of cycles between training

 

 

 

patterns sent to the Sink core (0 means don’t send

 

 

 

periodic training).

 

 

 

 

SPI-4.2 v8.5 Getting Started Guide

www.xilinx.com

39

UG154 March 24, 2008

Page 39
Image 39
Xilinx UG154 Customizing the Demonstration Test Bench, Test Case Package, 10Testcase Package User-Defined Constants, Range