Altera RapidIO MegaCore Function Manuale Utente Pagina 170

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 198
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 169
7–8 Chapter 7: Testbenches
RapidIO MegaCore Function August 2014 Altera Corporation
User Guide
NREAD Transactions
The next set of transactions tested are
NREAD
s. The DUT sends a group of
NREAD
transactions to the sister_rio module by cycling the read burst size from 8 to
MAX_READ_BYTES
in increments of 8 bytes. For each iteration, the
rw_addr_data
task is
called. This task is defined in the bfm_io_read_master instance of the Avalon-MM
master BFM. The task performs the read request packets across the I/O Avalon-MM
Slave Read interface. The read transaction across the Avalon-MM interface is
translated into a RapidIO
NREAD
request packets. The values of the
rd_address
,
rd_byteenable
, and
rd_burstcount
parameters determine the values for the
rdsize
,
wdptr
and
xamsbs
fields in the header of the RapidIO packet.
The
NREAD
request packets are received by the DUT and are translated into
Avalon-MM read transactions that are presented across the sister_rio module‘s I/O
master Avalon-MM interface. An instance of avalon_bfm_slave, the BFM for an
Avalon-MM slave, is driven by this interface. The read operations are checked and
data is returned by calling the task,
write_readdata
. This task drives the
data
and
read
datavalid
control signals on the Avalon-MM master read port of the DUT.
The returned data is expected at the DUT’s I/O Avalon-MM slave interface. The
rw_data
task is called and it captures the read data. This task is defined inside the
instance of bfm_io_read_master. The read data and the expected value are then
compared to ensure that they are equal.
Doorbell Transactions
To test
DOORBELL
messages, the
doorbell
interrupts must be enabled. To enable
interrupts, the testbench sets the lower three bits in the
Doorbell
Interrupt
Enable
register located at address
0x0000_0020
. The test also programs the DUT to store all of
the successful and unsuccessful
DOORBELL
messages in the Tx Completion FIFO.
For more information, refer to Table 6–65 on page 6–29.
Next, the test pushes eight
DOORBELL
messages to the transmit
DOORBELL
Message FIFO
of the DUT. The test increments the message payload for each transaction, which
occurs when the
rw_addr_data
task (defined in the bfm_drbell_s_master instance) is
invoked with a
‘WRITE
operation to the
TX
doorbell
register at offset
0x0000_000C
.
This action programs the 16-bit message, an incrementing payload in this example, as
well as the
DESTINATION_ID
0x55
for an 8-bit device ID or
0x5555
for a 16-bit device
ID—which is used in the
DOORBELL
transaction packet.
To verify that the
DOORBELL
request packets have been sent, the test waits for the
drbell_s_irq
signal to be asserted. The test then reads the
Tx
Doorbell
Completion
register (refer to Table 6–63 on page 6–28). This register provides the
DOORBELL
messages that have been added to the Tx Completion FIFO. Eight successfully
completed
DOORBELL
messages should appear in that FIFO and each one should be
accessible by reading the
Tx Doorbell
Completion
register eight times in succession.
To perform this verification, the test invokes the
rw_data
task defined in the instance
bfm_drbell_s_master.
If you created the DUT with Doorbell Rx enable turned on and with Doorbell Tx
enable turned off, the doorbell test programs the sister_rio module to send eight
DOORBELL
messages to the DUT. The test verifies that all eight
DOORBELL
messages were
received by the DUT. The test calls the
rw_addr_data
task defined in the instance
sister_bfm_drbell_s_master. The task performs a write to the
Tx
Doorbell
register
Vedere la pagina 169
1 2 ... 165 166 167 168 169 170 171 172 173 174 175 ... 197 198

Commenti su questo manuale

Nessun commento