URL
https://opencores.org/ocsvn/uart2bus_testbench/uart2bus_testbench/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
3 |
HanySalah |
//-------------------------------------------------------------------------------------------------
|
2 |
2 |
HanySalah |
//
|
3 |
|
|
// UART2BUS VERIFICATION
|
4 |
|
|
//
|
5 |
3 |
HanySalah |
//-------------------------------------------------------------------------------------------------
|
6 |
2 |
HanySalah |
// CREATOR : HANY SALAH
|
7 |
|
|
// PROJECT : UART2BUS UVM TEST BENCH
|
8 |
|
|
// UNIT : INTERFACE
|
9 |
3 |
HanySalah |
//-------------------------------------------------------------------------------------------------
|
10 |
2 |
HanySalah |
// TITLE : UART Arbiter
|
11 |
3 |
HanySalah |
// DESCRIPTION: THIS BFM ACT AS ARBITER CONNECTED TO THE DUT. ITS DUTY IS ONLY TO GIVE THE DUT THE
|
12 |
|
|
// BUS GRANT OR NOT.
|
13 |
|
|
//-------------------------------------------------------------------------------------------------
|
14 |
2 |
HanySalah |
// LOG DETAILS
|
15 |
|
|
//-------------
|
16 |
|
|
// VERSION NAME DATE DESCRIPTION
|
17 |
|
|
// 1 HANY SALAH 29122015 FILE CREATION
|
18 |
3 |
HanySalah |
// 2 HANY SALAH 12022016 ENHANCE BLOCK DESCRIPTION & ADD COMMENTS
|
19 |
|
|
//-------------------------------------------------------------------------------------------------
|
20 |
|
|
// ALL COPYRIGHTS ARE RESERVED FOR THE PRODUCER ONLY .THIS FILE IS PRODUCED FOR OPENCORES MEMBERS
|
21 |
|
|
// ONLY AND IT IS PROHIBTED TO USE THIS MATERIAL WITHOUT THE CREATOR'S PERMISSION
|
22 |
|
|
//-------------------------------------------------------------------------------------------------
|
23 |
2 |
HanySalah |
interface uart_arbiter (input bit clock,
|
24 |
|
|
input bit reset);
|
25 |
|
|
|
26 |
3 |
HanySalah |
//-------------------------------------------------------------------------------------------------
|
27 |
2 |
HanySalah |
//
|
28 |
3 |
HanySalah |
// Bus Control Signals
|
29 |
2 |
HanySalah |
//
|
30 |
3 |
HanySalah |
//-------------------------------------------------------------------------------------------------
|
31 |
2 |
HanySalah |
|
32 |
|
|
logic int_req; // Request Internal Bus Access
|
33 |
|
|
logic int_gnt; // Grant Internal Bus Access
|
34 |
|
|
|
35 |
3 |
HanySalah |
//-------------------------------------------------------------------------------------------------
|
36 |
2 |
HanySalah |
//
|
37 |
3 |
HanySalah |
// Arbiter Control Signals
|
38 |
2 |
HanySalah |
//
|
39 |
3 |
HanySalah |
//-------------------------------------------------------------------------------------------------
|
40 |
2 |
HanySalah |
|
41 |
3 |
HanySalah |
// When this routine is called, it wait the request signal activation to give the bus grant to
|
42 |
|
|
// the DUT.
|
43 |
2 |
HanySalah |
task accept_req ();
|
44 |
|
|
wait (int_req);
|
45 |
|
|
int_gnt = 1'b1;
|
46 |
|
|
endtask:accept_req
|
47 |
|
|
|
48 |
3 |
HanySalah |
// When this routine is called, it wait the request signal activation and then declain the
|
49 |
|
|
// the request buy set int_gnt to zero.
|
50 |
2 |
HanySalah |
task declain_req ();
|
51 |
|
|
wait (int_req);
|
52 |
|
|
int_gnt = 1'b0;
|
53 |
|
|
endtask:declain_req
|
54 |
|
|
|
55 |
|
|
endinterface:uart_arbiter
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.