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

Subversion Repositories openhmc

[/] [openhmc/] [trunk/] [openHMC/] [sim/] [UVC/] [cag_rgm/] [sv/] [cag_rgm_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 CAG_RGM_ENV_SV
41
`define CAG_RGM_ENV_SV
42
 
43
class cag_rgm_env extends uvm_env;
44
 
45
        uvm_active_passive_enum is_active = UVM_ACTIVE;
46
 
47
    `uvm_component_utils_begin(cag_rgm_env)
48
        `uvm_field_enum(uvm_active_passive_enum, is_active, UVM_DEFAULT)
49
    `uvm_component_utils_end
50
 
51
        cag_rgm_sequencer sequencer;
52
 
53
        cag_rgm_monitor tx_monitor;
54
        cag_rgm_monitor rx_monitor;
55
 
56
        function new(string name="cag_rgm_env", uvm_component parent);
57
                super.new(name,parent);
58
        endfunction : new
59
 
60
        function void build();
61
                super.build();
62
 
63
                if(is_active == UVM_ACTIVE)
64
                        sequencer = cag_rgm_sequencer::type_id::create("sequencer",this);
65
 
66
                tx_monitor = cag_rgm_monitor::type_id::create("tx_monitor",this);
67
                rx_monitor = cag_rgm_monitor::type_id::create("rx_monitor",this);
68
 
69
        endfunction : build
70
 
71
        function void connect();
72
                if(is_active == UVM_ACTIVE) begin
73
                        rx_monitor.collected_port.connect(sequencer.resp_port);
74
                end
75
        endfunction : connect
76
 
77
        function void set_rf(cag_rgm_register_file rf);
78
                if(is_active == UVM_ACTIVE)
79
                        sequencer.set_rf(rf);
80
        endfunction : set_rf
81
 
82
endclass : cag_rgm_env
83
 
84
`endif // CAG_RGM_ENV_SV

powered by: WebSVN 2.1.0

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