TestBencher Pro and Reactive Test Bench Help

7.3 Transaction Manager Overview

7.3 Transaction Manager Overview

Previous topic Next topic  

7.3 Transaction Manager Overview

Previous topic Next topic  

VHDL ONLY: In addition to immediately executing transactions via Apply calls in the template file's sequencer process, TestBencher can generate a transaction manager that maintains a queue of transactions scheduled for future execution. Transactions can be placed in this queue in several ways: using Post calls to add a specific transaction to the queue, using ApplyFile calls to read a list of transactions from a file, or generated randomly using a Transaction Generator. Transaction queues are  currently only supported in VHDL.

tb_transaction_manager_wide

TestBencher automatically generates Transaction Manager and Test Reader code from the transactions included in the project. Attempting to create and maintain this type of code manually is difficult because the code changes each time you add a new transaction type or change the number and types of parameters for a transaction.

Hierarchical TLMs and Transaction Managers

If you create a hierarchical testbench with embedded TLMs (see Section 9.1 Sub-Projects), each project Transaction-Level Model can have it's own transaction manager. Any TLM sequencer can post a transaction to any other TLM's transaction queue. Most commonly, a top-level TLM model will generate test sequences and post them to it's child TLM transaction queues. All calls to transactors can be specified either as relative or fixed path, allowing any transactor to be referenced from anywhere in the project.

Filling up the Transaction Manager Queue:

After the Transaction Manager has been created, you can choose one of the following methods to fill the queue:

Use Post calls in the sequencer process to add transactions to the queue. See Section 7.4: VHDL: TM fill with Post Calls for details on call syntax.

Use an ApplyFile call add a list of transactions stored in a file to the queue. See Section 7.5: VHDL: TM fill from File section for the transaction list file format and call syntax.

Use the Transaction Generator to randomly apply transactions. See Section 7.6: VHDL fill from Random Generator.

Transaction Manager Modes: Popping transactions from the Queue

The Transaction Manager can be run in different modes by calling a SetApplyCallMode function.  By default, the mode is set to looping, in which case transactions are executed when they are available in the queue. There are three modes:

TB_LOOPING - run the next transaction from the queue whenever there are apply calls in the queue.

TB_ONCE - only run the next transaction from queue when the procedure ApplyNextTransaction is called.

TB_SUSPEND - finish running the current transaction and stop reading apply calls from the queue until the apply call mode is changed.

Disabling Transaction Manager Generation:

If you want to create the simplest possible test bench code and your test bench doesn't use transaction manager features (e.g. it doesn't post transactions to a queue), you can disable the generation of transaction manager code:

Right click on the Transaction-Level Model folder and choose Project Generation Properties from the context menu to open the Project Generation Properties dialog.

Project_properties_menu_just_component

Uncheck the Enable Transaction Manager checkbox and press OK to close the dialog.

project_gen_dlg_disable_tm