Altera Mentor Verification IP Altera Edition AMBA AXI4-St Manuel d'utilisateur Page 81

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 231
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 80
VHDL API Overview
Executing Transactions
Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3
81
April 2014
Example 7-4 shows a master BFM test program creating a master transaction with a packet
length of 10 transfers.
Example 7-4. Master BFM Test Program Transaction Creation
-- Define a local variable trans to hold the transaction record.
variable trans: integer;
-- Create a master transaction of 10 transfers.
create_master_transaction(10, trans, bfm_index,
axi4stream_tr_if_0(bfm_index));
Example 7-5 shows a slave BFM test program creating a slave transaction.
Example 7-5. Slave BFM Test Program Transaction Creation
-- Define a local variable trans to hold the transaction record.
variable trans: integer;
-- Create a slave transaction.
create_slave_transaction(trans, bfm_index,axi4stream_tr_if_0(bfm_index));
In the above example, the bfm_index specifies the actual BFM.
Executing Transactions
Executing a transaction in a master/slave BFM test program initiates the transaction onto the
protocol signals. Each master/slave BFM API has execution procedures that push transactions
into the BFM internal transaction queues. Figure 7-1 on page 76 illustrates the internal BFM
structure.
execute_transaction()
If the DUT is a slave, then the execute_transaction() procedure is called in the master BFM test
program. Example 7-6 shows a master test program executing a master transaction.
Example 7-6. Master Test Program Transaction Execution
-- Define a local variable trans to hold the transaction record.
variable trans: integer;
...
-- Create a master transaction with 10 transfers.
create_master_transaction(10, trans, bfm_index,
axi4stream_tr_if_0(bfm_index));
...
-- By default the execution of a transaction will block.
execute_transaction(trans, bfm_index, axi4stream_tr_if_0(bfm_index));
Vue de la page 80
1 2 ... 76 77 78 79 80 81 82 83 84 85 86 ... 230 231

Commentaires sur ces manuels

Pas de commentaire