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

Subversion Repositories openhmc

[/] [openhmc/] [trunk/] [openHMC/] [sim/] [UVC/] [hmc_module/] [sv/] [hmc_module_env.sv] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 juko
/*
2
 *                              .--------------. .----------------. .------------.
3
 *                             | .------------. | .--------------. | .----------. |
4
 *                             | | ____  ____ | | | ____    ____ | | |   ______ | |
5
 *                             | ||_   ||   _|| | ||_   \  /   _|| | | .' ___  || |
6
 *       ___  _ __   ___ _ __  | |  | |__| |  | | |  |   \/   |  | | |/ .'   \_|| |
7
 *      / _ \| '_ \ / _ \ '_ \ | |  |  __  |  | | |  | |\  /| |  | | || |       | |
8
 *       (_) | |_) |  __/ | | || | _| |  | |_ | | | _| |_\/_| |_ | | |\ `.___.'\| |
9
 *      \___/| .__/ \___|_| |_|| ||____||____|| | ||_____||_____|| | | `._____.'| |
10
 *           | |               | |            | | |              | | |          | |
11
 *           |_|               | '------------' | '--------------' | '----------' |
12
 *                              '--------------' '----------------' '------------'
13
 *
14
 *  openHMC - An Open Source Hybrid Memory Cube Controller
15
 *  (C) Copyright 2014 Computer Architecture Group - University of Heidelberg
16
 *  www.ziti.uni-heidelberg.de
17
 *  B6, 26
18
 *  68159 Mannheim
19
 *  Germany
20
 *
21
 *  Contact: openhmc@ziti.uni-heidelberg.de
22
 *  http://ra.ziti.uni-heidelberg.de/openhmc
23
 *
24
 *   This source file is free software: you can redistribute it and/or modify
25
 *   it under the terms of the GNU Lesser General Public License as published by
26
 *   the Free Software Foundation, either version 3 of the License, or
27
 *   (at your option) any later version.
28
 *
29
 *   This source file is distributed in the hope that it will be useful,
30
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
31
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
32
 *   GNU Lesser General Public License for more details.
33
 *
34
 *   You should have received a copy of the GNU Lesser General Public License
35
 *   along with this source file.  If not, see .
36
 *
37
 *
38
 */
39
 
40
`ifndef HMC_MODULE_ENV
41
`define HMC_MODULE_ENV
42
class hmc_module_env  extends uvm_env;
43
        //hmc_module_cfg module_cfg;
44
 
45
        hmc_module_mon  axi4_req_mon;
46
        hmc_module_mon  axi4_rsp_mon;
47
 
48
        hmc_module_mon  hmc_req_mon;
49
        hmc_module_mon  hmc_rsp_mon;
50
 
51
 
52
        hmc_module_scb scb;
53
 
54
 
55
 
56
        `uvm_component_utils(hmc_module_env)
57
 
58
 
59
 
60
        function new (string name = "hmc_module_env", uvm_component parent);
61
                super.new(name, parent);
62
        endfunction : new
63
 
64
        virtual function void build_phase(uvm_phase phase);
65
                string inst_name;
66
                super.build_phase(phase);
67
 
68
 
69
 
70
                //-- Additional monitor for AXI4 Stream 2 HMC packet conversion
71
                axi4_req_mon = hmc_module_mon::type_id::create("axi4_req_mon", this);
72
                axi4_rsp_mon = hmc_module_mon::type_id::create("axi4_rsp_mon", this);
73
 
74
                //-- Additional monitor for BFM 2 HMC packet conversion
75
                hmc_req_mon = hmc_module_mon::type_id::create("hmc_req_mon", this);
76
                hmc_rsp_mon = hmc_module_mon::type_id::create("hmc_rsp_mon", this);
77
 
78
                //-- scoreboard
79
                scb = hmc_module_scb::type_id::create("scb", this);
80
 
81
 
82
        endfunction : build_phase
83
 
84
 
85
        function void connect_phase(uvm_phase phase);
86
                super.connect_phase(phase);
87
 
88
                //-- Connect module monitors to scoreboard
89
                axi4_req_mon.item_collected_port.connect(scb.axi4_hmc_req);
90
                axi4_rsp_mon.item_collected_port.connect(scb.axi4_hmc_rsp);
91
 
92
                hmc_req_mon.item_collected_port.connect(scb.hmc_req_port);
93
                hmc_rsp_mon.item_collected_port.connect(scb.hmc_rsp_port);
94
 
95
 
96
 
97
        endfunction : connect_phase
98
 
99
endclass: hmc_module_env
100
`endif

powered by: WebSVN 2.1.0

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