OpenCores
URL https://opencores.org/ocsvn/uart2bus_testbench/uart2bus_testbench/trunk

Subversion Repositories uart2bus_testbench

[/] [uart2bus_testbench/] [trunk/] [tb/] [agent/] [uart_agent.svh] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 HanySalah
//-----------------------------------------------------------------------------
2
//
3
//                             UART2BUS VERIFICATION
4
//
5
//-----------------------------------------------------------------------------
6
// CREATOR    : HANY SALAH
7
// PROJECT    : UART2BUS UVM TEST BENCH
8
// UNIT       : AGENT
9
//-----------------------------------------------------------------------------
10
// TITLE      : UART AGENT
11
// DESCRIPTION: This
12
//-----------------------------------------------------------------------------
13
// LOG DETAILS
14
//-------------
15
// VERSION      NAME        DATE        DESCRIPTION
16
//    1       HANY SALAH    10012016    FILE CREATION
17
//-----------------------------------------------------------------------------
18
// ALL COPYRIGHTS ARE RESERVED FOR THE PRODUCER ONLY .THIS FILE IS PRODUCED FOR
19
// OPENCORES MEMBERS ONLY AND IT IS PROHIBTED TO USE THIS MATERIAL WITHOUT THE
20
// CREATOR'S PERMISSION
21
//-----------------------------------------------------------------------------
22
 
23
class uart_agent extends uvm_agent;
24
 
25
  uart_driver           _drv;
26
 
27
  uvm_sequencer#(uart_transaction) _seq;
28
 
29
  uart_monitor          _mon;
30
 
31
  uvm_analysis_port #(uart_transaction) drv_port;
32
 
33
  uvm_analysis_port #(uart_transaction) mon_port;
34
 
35
  `uvm_component_utils(uart_agent)
36
 
37
  function new (string name,uvm_component parent);
38
    super.new(name,parent);
39
  endfunction:new
40
 
41
 
42
  extern function void build_phase (uvm_phase phase);
43
 
44
  extern function void connect_phase (uvm_phase phase);
45
endclass:uart_agent
46
 
47
function void uart_agent::build_phase (uvm_phase phase);
48
  super.build_phase(phase);
49
  _drv = uart_driver::type_id::create("_drv",this);
50
  _seq = uvm_sequencer#(uart_transaction)::type_id::create("_seq",this);
51
  _mon = uart_monitor::type_id::create("_mon",this);
52
 
53
  drv_port = new ("drv_port",this);
54
  mon_port = new ("mon_port",this);
55
endfunction:build_phase
56
 
57
function void uart_agent::connect_phase (uvm_phase phase);
58
  super.connect_phase(phase);
59
  _drv.seq_item_port.connect(_seq.seq_item_export);
60
 
61
  _drv.drv_scbd_cov.connect(drv_port);
62
 
63
  _mon.mon_scbd.connect(mon_port);
64
endfunction:connect_phase

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.