Read burst transaction creation and execution, The code excerpt in, Example 6-4 – Altera Mentor Verification IP Altera Edition AMBA AXI3/4TM User Manual

Page 159

Advertising
background image

SystemVerilog Tutorials

Verifying a Slave DUT

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

141

September 2013

The call to set_write_data_mode(AXI_DATA_WITH_ADDRESS) function configures the write
burst transaction to allow the write address phase and write data burst to start simultaneously
when executed. The write transaction is then executed onto the protocol signals.

Example 6-4. Write Burst Transaction Creation and Execution

// Write data burst length of 7 to start address 16.
trans = bfm.create_write_transaction(16, 7);

trans.set_data_words('hACE0ACE1, 0);
trans.set_data_words('hACE2ACE3, 1);
trans.set_data_words('hACE4ACE5, 2);
trans.set_data_words('hACE6ACE7, 3);
trans.set_data_words('hACE8ACE9, 4);
trans.set_data_words('hACEAACEB, 5);
trans.set_data_words('hACECACED, 6);
trans.set_data_words('hACEEACEF, 7);
for(int i=0; i<8; i++)

trans.set_write_strobes(4'b1111, i);

trans.set_write_data_mode(AXI_DATA_WITH_ADDRESS);
$display ( "@ %t, master_test_program: Writing data burst of length 7 to

start address 16", $time);


bfm.execute_transaction(trans);

In the complete Master Test Program, a subsequent write data burst transaction has lane 0 of the
first data beat of the burst configured to be invalid, by setting the least significant bit of the
write_strobes[0] field to zero.

trans.set_write_strobes(4'b1110, 0);

See

SystemVerilog AXI3 Master BFM Test Program

listing for details.

Read Burst Transaction Creation and Execution

The code excerpt in

Example 6-5

reads the first two data beats from the data burst that has been

previously written into the slave memory. The call to the

create_read_transaction()

function

creates the read burst transaction trans by providing the start address and burst length
arguments. The actual length of the burst on the protocol signals is 1+1=2.

Note

The burst length argument passed to the

create_read_transaction()

function is 1 less than

the number of transfers (beats) in the burst. This aligns the burst length argument value
with the value placed on the ARLEN protocol signals.

Advertising