Example 7-2. axi4 transaction definition – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual

Page 208

Advertising
background image

Mentor VIP AE AXI3/4 User Guide, V10.2b

190

VHDL API Overview
Creating Transactions

September 2013

Example 7-2. 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;
axi4_size_e size;
axi4_burst_e burst;
axi4_lock_e lock;
axi4_cache_e cache;
bit [3:0] qos;
bit [((`MAX_AXI4_ID_WIDTH) - 1):0] id;
bit [7:0] burst_length;
bit [((`MAX_AXI4_USER_WIDTH) - 1):0] addr_user;
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[];
bit transaction_done;

...

endclass

Note

The axi4_transaction class code above is shown for information only. Access to each
transaction record during its lifetime is performed via the various set*() and get*()
procedures detailed later in this chapter.

Advertising