Altera Mentor Verification IP Altera Edition AMBA AXI3/4T Manual de usuario Pagina 183

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 783
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 182
SystemVerilog Tutorials
Verifying a Master DUT
Mentor VIP AE AXI3/4 User Guide, V10.2b
165
September 2013
The Slave BFM helper function set_read_data() then fills a complete read data bus width of
data into the Slave BFM data_words[] array. At this point a read data phase is executed on to
the read data channel if the slave_mode setting is AXI_PHASE_SLAVE, otherwise it executes a
complete read data burst only when the Slave BFM data_words[] array contains a complete
burst of read data.
Example 6-29. handle_read
// Task : handle_read
// This method reads data from memory and send read data/response
// either at burst or phase level depending upon slave working
// mode.
task automatic handle_read(input axi_transaction read_trans);
addr_t addr[];
bit [7:0] mem_data[];
set_read_data_valid_delay(read_trans);
for(int i = 0; bfm.get_read_addr(read_trans, i, addr); i++)
begin
mem_data = new[addr.size()];
for (int j = 0; j < addr.size(); j++)
mem_data[j] = do_byte_read(addr[j]);
bfm.set_read_data(read_trans, i, addr, mem_data);
if (slave_mode == AXI_PHASE_SLAVE)
bfm.execute_read_data_phase(read_trans, i);
end
if (slave_mode == AXI_TRANSACTION_SLAVE)
bfm.execute_read_data_burst(read_trans);
endtask
The processing of write transactions in the Slave Test Program works in a similar way as that
described for read transactions. Processing a write transaction requires both a process_write
task and a handle_write task.
The main difference is that the write transaction handling gets the write data burst and stores it
in the Slave Test Program internal memory depending on the slave_mode setting, adhering to
the state of the write strobes signal WSTRB. There is also an additional write response phase that
is required for the AXI3 write channel.
Vista de pagina 182
1 2 ... 178 179 180 181 182 183 184 185 186 187 188 ... 782 783

Comentarios a estos manuales

Sin comentarios