Altera Mentor Verification IP Altera Edition AMBA AXI3/4T Manuel d'utilisateur Page 169

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 783
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 168
SystemVerilog Tutorials
Verifying a Slave DUT
Mentor VIP AE AXI3/4 User Guide, V10.2b
151
September 2013
The read transaction trans is then executed onto the protocol signals by calling the
execute_transaction() function. The read data is obtained by calling the get_data_words(n)
function to get the data_words[n] transaction field value. The result of the read data is
compared with the expected data—and a message displays the transcript.
Example 6-14. Read Burst Transaction Creation and Execution
// Read data burst of length 1 from address 16.
trans = bfm.create_read_transaction(16, 1);
bfm.execute_transaction(trans);
if (trans.get_data_words(0) == 'hACE0ACE1)
$display ( "@ %t, master_test_program: Read correct data (hACE0ACE1) at
address (16)", $time);
else
$display ( "@ %t, master_test_program: Error: Expected data (hACE0ACE1)
at address (16), but got %h", $time, trans.get_data_words(0));
if (trans.get_data_words(1) == 'hACE2ACE3)
$display ( "@ %t, master_test_program: Read correct data (hACE2ACE3) at
address (20)", $time);
else
$display ( "@ %t, master_test_program: Error: Expected data (hACE2ACE3)
at address (20), but got %h", $time, trans.get_data_words(1));
In the complete Master Test Program, a subsequent read transaction is created and executed in a
similar manner to that shown in Example 6-14. See SystemVerilog AXI4 Master BFM Test
Program listing for details.
Outstanding Write BurstTransaction Creation and Execution
The code excerpt in Example 6-6 calls the AXI4Master BFM create_write_transaction()
function to create a write burst transaction trans1 by providing the start address and burst length
arguments. The actual length of the burst on the protocol wires is 3+1=4.
The set_data_words() function is then called four times to set the data_words field of the write
transaction for each beat of the data burst. For this write transaction, all data byte lanes contain
valid data on each beat of the data burst. Calling the set_write_strobes() function sets the
write_strobes fields of the transaction to 4’b1111.
Vue de la page 168
1 2 ... 164 165 166 167 168 169 170 171 172 173 174 ... 782 783

Commentaires sur ces manuels

Pas de commentaire