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

Subversion Repositories openhmc

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

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 MODULE_MON
41
`define MODULE_MON
42
class hmc_module_mon extends uvm_monitor;
43
        //-- Basic Module monitor
44
        hmc_packet packet;
45
 
46
 
47
        covergroup hmc_pkt_cg;
48
                option.per_instance = 1;
49
                HMC_PACKET_LENGTH : coverpoint packet.packet_length{
50
                        illegal_bins zero_flit_pkt = {0};
51
                        bins pkt_length[] = {[1:9]};
52
                }
53
                HMC_COMMAND: coverpoint packet.command {
54
                        bins requests[] = {
55
                                HMC_WRITE_16,
56
                                HMC_WRITE_32,
57
                                HMC_WRITE_48,
58
                                HMC_WRITE_64,
59
                                HMC_WRITE_80,
60
                                HMC_WRITE_96,
61
                                HMC_WRITE_112,
62
                                HMC_WRITE_128,
63
 
64
                                HMC_MODE_WRITE,
65
                                HMC_BIT_WRITE,
66
                                HMC_DUAL_8B_ADDI,
67
                                HMC_SINGLE_16B_ADDI,
68
 
69
                                HMC_POSTED_WRITE_16,
70
                                HMC_POSTED_WRITE_32,
71
                                HMC_POSTED_WRITE_48,
72
                                HMC_POSTED_WRITE_64,
73
                                HMC_POSTED_WRITE_80,
74
                                HMC_POSTED_WRITE_96,
75
                                HMC_POSTED_WRITE_112,
76
                                HMC_POSTED_WRITE_128,
77
                                HMC_POSTED_BIT_WRIT,
78
 
79
                                HMC_POSTED_BIT_WRIT,
80
                                HMC_POSTED_DUAL_8B_ADDI,
81
                                HMC_POSTED_SINGLE_16B_ADDI,
82
 
83
                                HMC_MODE_READ,
84
                                HMC_READ_16,
85
                                HMC_READ_32,
86
                                HMC_READ_48,
87
                                HMC_READ_64,
88
                                HMC_READ_80,
89
                                HMC_READ_96,
90
                                HMC_READ_112,
91
                                HMC_READ_128};
92
 
93
                        bins response[] = {
94
                                HMC_READ_RESPONSE,
95
                                HMC_WRITE_RESPONSE,
96
                                HMC_MODE_READ_RESPONSE,
97
                                HMC_MODE_WRITE_RESPONSE,
98
                                HMC_ERROR_RESPONSE
99
                        };
100
 
101
                        illegal_bins n_used = default;
102
                }
103
                FLIT_DELAY: coverpoint packet.flit_delay{
104
                        bins zero_delay = {0};
105
                        bins small_delay = {[1:3]};
106
                        bins big_delay = {[4:20]};
107
                        bins huge_delay = {[21:$]};
108
                }
109
                FLIT_DELAY_COMMAND : cross HMC_COMMAND, FLIT_DELAY;
110
 
111
        endgroup
112
 
113
        uvm_analysis_port #(hmc_packet) item_collected_port;
114
        int req_rcvd = 0;
115
        int rsp_rcvd = 0;
116
 
117
 
118
        `uvm_component_utils(hmc_module_mon)
119
        function new ( string name = "hmc_module_mon", uvm_component parent );
120
                super.new(name, parent);
121
                item_collected_port = new("item_collected_port", this);
122
        endfunction : new
123
 
124 15 juko
 
125 12 juko
        function void build_phase(uvm_phase phase);
126
                super.build_phase(phase);
127
        endfunction : build_phase
128
 
129
 
130
endclass
131
 
132
`endif

powered by: WebSVN 2.1.0

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