Altera SerialLite II IP Core User Manual

Page 96

Advertising
background image

5–10

Chapter 5: Testbench

Testbench Components Description

SerialLite II MegaCore Function

January 2014

Altera Corporation

User Guide

The first byte of each generated packet is a sequential identifier (id) that seeds the
LFSR. Every time the send_packet task is called, the agen id is incremented by one.

The module operates in one of two modes: data port or priority port. When in priority
port mode, the Atlantic dav signal is ignored for all but the first transfer of a packet.

There can be multiple agen instantiations (for data and priority port, DUT and
SISTER), depending on the DUT’s chosen parameters.

AGEN Tasks

This sections defines the AGEN tasks.

– send_packet(addr,size[31:0],err)

send_packet

is the main AGEN task. It causes a packet of a specified size and

destined for a particular address to be transmitted. The err bit may also be assigned a
value. The data is based on a LFSR.

Figure 5–1

describes the send_packet task fields.

– ipg(min[31:0],max[31:0])

If the gap task is called, successive packets are separated by a a random number of
idle cycles.

– gap(prob[31:0],min[31:0],max[31:0])

Table 5–1. send_packet Task Field Description

Field Location

in Task

Field

Valid Values

Description

1

addr

0 to 0xFF (data)

0 to 0xF (priority)

Set to 0.

2

size

0 to 0xFFFF_FFFF (bytes)

The size field sets the size, in bytes, of the current packet
being sent by this task.

3

err

1'b0 or 1'b1

The err field determines whether an Atlantic error is
asserted at the end of a packet when eop is asserted. You
can optionally set it to 1'b1 to set the error flag for that
packet.

Table 5–2. gap Task Field Description

Field Location

in Task

Field

Valid Values

Description

1

min

0 to 0xFFFF_FFFF
(cycles)

The min field sets the minimum value, in Atlantic clock
cycles, for a random gap between two packets.

2

max

0 to 0xFFFF_FFFF
(cycles)

The max field sets the maximum value, in Atlantic clock
cycles, for a random gap between two packets.

A max field greater than or equal to the min field is required.
When max==min, no gap occurs.

Advertising