Example Design

Customizing the Test Bench

Simulation Run Time

The default simulation run time is set to only 40 microseconds, which can be easily extended by editing the simulation_run_time constant, set near the top of the demonstration test bench file. For example, from the VHDL file:

----------------------------------------------------------------------

--**** The following value determines the simulations run time ****

----------------------------------------------------------------------

constant simulation_run_time : time := 40000 ns;

The test bench allows the DUT to run until the simulation time is exceeded; after this, Ethernet frames already in the system are allowed to complete cleanly; then the test bench reports the final statistics and end.

Changing Frame Data

The Ethernet Frame Stimulus and Ethernet Frame Checker modules can be set to produce and check different Ethernet frames by changing the parameters sent to them. These parameters are set in the Top-Level Example Design HDL. Editing this file allows a Functional Simulation to immediately use the new settings. However, because these modifications require logical changes, the Implementation Scripts must be re-run on the design before running a Timing Simulation.

Please see the Top-Level Example Design HDL file for information about these frame-type parameters. As an example, the following syntax is taken from the Verilog version of the file and contains the syntax required to configure both the Legacy Ethernet Frame Stimulus and Ethernet Frame Checker modules:

//---------------------------------

//Configure the Legacy frames used in this example design (the

//following parameters can be edited)

//---------------------------------

//Use minimum sized Ethernet frames (64-bytes total length) parameter [10:0] LEGACY_FRAME_LENGTH = 11'd64;

//Set the Destination Address to be AA-BB-CC-DD-EE-FF

parameter

[47:0]

LEGACY_DEST_ADDR

= 48'hFFEEDDCCBBAA;

//

Set the Destination Address to be 00-11-22-33-44-55

parameter

[47:0]

LEGACY_SRC_ADDR

=

48'h554433221100;

//

Do not

use VLAN fields

 

 

parameter

 

LEGACY_HAS_VLAN

=

1'b0;

//

VLAN fields are not used so the following parameter is n/a

parameter [15:0]

LEGACY_VLAN_DATA

=

16'h0000;

//

Use a Generic Type field

 

 

parameter [15:0]

LEGACY_TYPE_FIELD

=

16'h8000;

Ethernet AVB Endpoint User Guide

www.xilinx.com

157

UG492 July 23, 2010

Page 157
Image 157
Xilinx UG492 manual Customizing the Test Bench, Simulation Run Time, Changing Frame Data