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 12

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

powered by: WebSVN 2.1.0

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