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 |
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 ENVIRONMENT
|
| 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 |
|
|
class uart_env extends uvm_env;
|
| 23 |
|
|
|
| 24 |
|
|
uart_agent agent;
|
| 25 |
|
|
|
| 26 |
|
|
uart_scoreboard scbd;
|
| 27 |
|
|
|
| 28 |
|
|
`uvm_component_utils(uart_env)
|
| 29 |
|
|
|
| 30 |
|
|
function new (string name,uvm_component parent);
|
| 31 |
|
|
super.new(name,parent);
|
| 32 |
|
|
endfunction:new
|
| 33 |
|
|
|
| 34 |
|
|
extern function void build_phase (uvm_phase phase);
|
| 35 |
|
|
|
| 36 |
|
|
extern function void connect_phase (uvm_phase phase);
|
| 37 |
|
|
endclass:uart_env
|
| 38 |
|
|
|
| 39 |
|
|
function void uart_env::build_phase (uvm_phase phase);
|
| 40 |
|
|
super.build_phase(phase);
|
| 41 |
|
|
agent = uart_agent::type_id::create("agent",this);
|
| 42 |
|
|
scbd = uart_scoreboard::type_id::create("uart_scoreboard",this);
|
| 43 |
|
|
|
| 44 |
|
|
endfunction:build_phase
|
| 45 |
|
|
|
| 46 |
|
|
function void uart_env::connect_phase (uvm_phase phase);
|
| 47 |
|
|
super.connect_phase(phase);
|
| 48 |
|
|
|
| 49 |
|
|
agent.drv_port.connect(scbd.scbd_drv);
|
| 50 |
|
|
agent.mon_port.connect(scbd.scbd_mon);
|
| 51 |
|
|
|
| 52 |
|
|
endfunction:connect_phase
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.