Altera Mentor Verification IP Altera Edition AMBA AXI4-St Manuale Utente Pagina 83

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 231
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 82
VHDL API Overview
Access Transaction Record
Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3
83
April 2014
Access Transaction Record
Each BFM API has procedures that can access a complete or partially complete Transaction
Record. The set*() and get*() procedures are used in a test program to set and get information
from the transaction record.
set*()
Example 7-9 shows the master test program calling the set_byte_type() procedure to set the first
byte_type in the transaction.
Example 7-9. Master Test Program set_byte_type() Procedure
-- 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));
-- Set the first byte_type in the transfer.
set_byte_type(AXI4STREAM_DATA_BYTE, 0, trans, bfm_index,
axi4stream_tr_if_0(bfm_index));
In the above example, the bfm_index specifies the actual master BFM.
get*()
Example 7-10 shows the slave test program calling the get_byte_type() procedure to get the first
data byte_type of a transaction.
Example 7-10. Slave Test Program get_byte_type() Procedure
-- Define a local variable trans to hold the transaction record.
variable trans: integer;
-- Define a local variable to hold the transaction byte type
variable byte_type: integer;
-- Create a slave transaction
create_slave_transaction(trans, bfm_index,
axi4stream_tr_if_0(bfm_index));
-- Get the first byte_type of a transaction.
get_byte_type(byte_type, 0, trans, bfm_index,
axi4stream_tr_if_0(bfm_index));
In the above example, the bfm_index specifies the actual slave BFM.
Vedere la pagina 82
1 2 ... 78 79 80 81 82 83 84 85 86 87 88 ... 230 231

Commenti su questo manuale

Nessun commento