Altera Mentor Verification IP Altera Edition AMBA AXI4-St Uživatelský manuál Strana 26

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 231
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 25
Mentor Verification IP AE AMBA AXI4-Stream User Guide, V10.3
26
SystemVerilog API Overview
Executing Transactions
April 2014
Example 2-4. Master BFM Test Program Transaction Creation
// Define a variable trans of type axi4stream_transaction to hold
// master transaction record
axi4stream_transaction trans;
...
// Create master transaction with 10 transfers
trans = bfm.create_master_transaction(10);
Example 2-5 shows a slave BFM test program creating a slave transaction.
Example 2-5. Slave BFM Test Program Transaction Creation
// Define a variable trans of type axi4stream_transaction to hold
// slave transaction record
axi4stream_transaction trans;
...
// Create a slave transaction
trans = bfm.create_slave_transaction();
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 tasks that push transactions into the
BFM internal transaction queues. Figure 2-1 on page 21 illustrates the internal BFM structure.
execute_transaction()
If the DUT is a slave, then the execute_transaction() task is called in the master BFM test
program. Example 2-6 shows a master test program executing a master transaction.
Example 2-6. Master Test Program Transaction Execution
// Define a variable trans of type axi4stream_transaction to hold the
// master transaction record.
axi4stream_transaction trans;
...
// Create a master transaction with 10 transfers.
trans = bfm.create_master_transaction(10);
...
// By default the execution of a transaction will block.
bfm.execute_transaction(trans);
Zobrazit stránku 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 230 231

Komentáře k této Příručce

Žádné komentáře