Systemverilog slave test program, E slave test program, refer to, Systemverilog slave test – Altera Mentor Verification IP Altera Edition AMBA AXI4-Stream User Manual

Page 211: Program

Advertising
background image

SystemVerilog Master and Slave Test Programs

SystemVerilog Slave Test Program

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

211

April 2014

end
else
begin
trans.set_byte_type(AXI4STREAM_DATA_BYTE, ((j*byte_count)+k));
end
end
bfm.execute_transfer(trans, j, last);
end
end

#100
$finish();
end
endmodule

SystemVerilog Slave Test Program

The example code in this section is a simplified AXI4-Stream slave that illustrates how you
can use the mgc_axi4stream_slave BFM.

//
*************************************************************************
****
//
// Copyright 2007-2013 Mentor Graphics Corporation
// All Rights Reserved.
//
// THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS
THE PROPERTY OF
// MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS SUBJECT TO LICENSE
TERMS.
//
//
*************************************************************************
****

/*
This is a simple example of an AXI4STREAM Slave to demonstrate the
mgc_axi4stream_slave BFM usage.
*/

import mgc_axi4stream_pkg::*;

module slave_test_program #(int AXI4_ID_WIDTH = 18, int AXI4_USER_WIDTH =
8, int AXI4_DEST_WIDTH = 18, int AXI4_DATA_WIDTH = 1024)
(
mgc_axi4stream_slave bfm
);

/////////////////////////////////////////////////
// Code user could edit according to requirements
/////////////////////////////////////////////////

Advertising