Axi4-lite transaction definition, Example 2-1. axi4 transaction definition – Altera Mentor Verification IP Altera Edition AMBA AXI4-Lite User Manual

Page 29

Advertising
background image

SystemVerilog API Overview

Creating Transactions

Mentor Verification IP AE AXI4-Lite User Guide, V10.3

29

April 2014

Operational fields define how and when the transaction is transferred. Their content is not
transferred over protocol signals. For example, the operation_mode field controls the
blocking/nonblocking operation of a transaction, but this information is not transferred over the
protocol signals.

AXI4-Lite Transaction Definition

The transaction record exists as a SystemVerilog class definition in each BFM.

Example 2-1

shows the definition of the axi4_transaction class members that form the transaction record.

Example 2-1. AXI4 Transaction Definition

// Global Transaction Class
class axi4_transaction;
// Protocol
axi4_rw_e read_or_write;
bit [((`MAX_AXI4_ADDRESS_WIDTH) - 1):0] addr;
axi4_prot_e prot;
bit [3:0] region; // Not supported in AXI4-Lite
axi4_size_e size; // Not supported in AXI4-Lite
axi4_burst_e burst; // Not supported in AXI4-Lite
axi4_lock_e lock; // Not supported in AXI4-Lite
axi4_cache_e cache; // Not supported in AXI4-Lite
bit [3:0] qos; // Not supported in AXI4-Lite
bit [((`MAX_AXI4_ID_WIDTH) - 1):0] id; // Not supported in AXI4-Lite
bit [7:0] burst_length; // Not supported in AXI4-Lite
bit [((`MAX_AXI4_USER_WIDTH) - 1):0] addr_user; // Not supported in
AXI4-Lite
bit [((((`MAX_AXI4_RDATA_WIDTH > `MAX_AXI4_WDATA_WIDTH) ?
`MAX_AXI4_RDATA_WIDTH : `MAX_AXI4_WDATA_WIDTH)) - 1):0] data_words [];
bit [(((`MAX_AXI4_WDATA_WIDTH / 8)) - 1):0] write_strobes [];
axi4_response_e resp[];
int address_valid_delay;
int data_valid_delay[];
int write_response_valid_delay;
int address_ready_delay;
int data_ready_delay[];
int write_response_ready_delay;

// Housekeeping
bit gen_write_strobes = 1'b1;
axi4_operation_mode_e operation_mode = AXI4_TRANSACTION_BLOCKING;
axi4_write_data_mode_e write_data_mode = AXI4_DATA_AFTER_ADDRESS;
bit data_beat_done[]; // Not supported in AXI4-Lite
bit transaction_done;

...

endclass

Note

This axi4_transaction class code is shown for information only. Access to each
transaction record during its life is performed by various set*() and get*() tasks described
later in this chapter.

Advertising