Line 1... |
Line 1... |
//-----------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
//
|
//
|
// UART2BUS VERIFICATION
|
// UART2BUS VERIFICATION
|
//
|
//
|
//-----------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
// CREATOR : HANY SALAH
|
// CREATOR : HANY SALAH
|
// PROJECT : UART2BUS UVM TEST BENCH
|
// PROJECT : UART2BUS UVM TEST BENCH
|
// UNIT : INTERFACE
|
// UNIT : INTERFACE
|
//-----------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
// TITLE : UART Arbiter
|
// TITLE : UART Arbiter
|
// DESCRIPTION: This
|
// DESCRIPTION: THIS BFM ACT AS ARBITER CONNECTED TO THE DUT. ITS DUTY IS ONLY TO GIVE THE DUT THE
|
//-----------------------------------------------------------------------------
|
// BUS GRANT OR NOT.
|
|
//-------------------------------------------------------------------------------------------------
|
// LOG DETAILS
|
// LOG DETAILS
|
//-------------
|
//-------------
|
// VERSION NAME DATE DESCRIPTION
|
// VERSION NAME DATE DESCRIPTION
|
// 1 HANY SALAH 29122015 FILE CREATION
|
// 1 HANY SALAH 29122015 FILE CREATION
|
//-----------------------------------------------------------------------------
|
// 2 HANY SALAH 12022016 ENHANCE BLOCK DESCRIPTION & ADD COMMENTS
|
// ALL COPYRIGHTS ARE RESERVED FOR THE PRODUCER ONLY .THIS FILE IS PRODUCED FOR
|
//-------------------------------------------------------------------------------------------------
|
// OPENCORES MEMBERS ONLY AND IT IS PROHIBTED TO USE THIS MATERIAL WITHOUT THE
|
// ALL COPYRIGHTS ARE RESERVED FOR THE PRODUCER ONLY .THIS FILE IS PRODUCED FOR OPENCORES MEMBERS
|
// CREATOR'S PERMISSION
|
// ONLY AND IT IS PROHIBTED TO USE THIS MATERIAL WITHOUT THE CREATOR'S PERMISSION
|
//-----------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
interface uart_arbiter (input bit clock,
|
interface uart_arbiter (input bit clock,
|
input bit reset);
|
input bit reset);
|
|
|
//--------------------------------
|
//-------------------------------------------------------------------------------------------------
|
//
|
//
|
// Bus Control Signals
|
// Bus Control Signals
|
//
|
//
|
//--------------------------------
|
//-------------------------------------------------------------------------------------------------
|
|
|
logic int_req; // Request Internal Bus Access
|
logic int_req; // Request Internal Bus Access
|
logic int_gnt; // Grant Internal Bus Access
|
logic int_gnt; // Grant Internal Bus Access
|
|
|
//--------------------------------
|
//-------------------------------------------------------------------------------------------------
|
//
|
//
|
// Arbiter Control Signals
|
// Arbiter Control Signals
|
//
|
//
|
//--------------------------------
|
//-------------------------------------------------------------------------------------------------
|
|
|
|
// When this routine is called, it wait the request signal activation to give the bus grant to
|
|
// the DUT.
|
task accept_req ();
|
task accept_req ();
|
wait (int_req);
|
wait (int_req);
|
int_gnt = 1'b1;
|
int_gnt = 1'b1;
|
endtask:accept_req
|
endtask:accept_req
|
|
|
|
// When this routine is called, it wait the request signal activation and then declain the
|
|
// the request buy set int_gnt to zero.
|
task declain_req ();
|
task declain_req ();
|
wait (int_req);
|
wait (int_req);
|
int_gnt = 1'b0;
|
int_gnt = 1'b0;
|
endtask:declain_req
|
endtask:declain_req
|
|
|