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

Subversion Repositories openhmc

[/] [openhmc/] [trunk/] [openHMC/] [sim/] [tb/] [common/] [testlib/] [posted_pkt_test/] [posted_pkt_test_seq.sv] - Blame information for rev 15

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 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
//
41
//
42
// posted_pkt_test sequence
43
//
44
//
45
 
46
 
47
`ifndef posted_pkt_test_SEQ_SV
48
`define posted_pkt_test_SEQ_SV
49
 
50
class posted_pkt_test_seq extends hmc_base_seq;
51
 
52
        rand int iterations;
53
 
54
        constraint iterations_c {
55
                iterations >= 1;
56
                iterations <= 10;
57
        }
58
 
59
        openhmc_init_seq init;
60
        hmc_model_init_seq bfm;
61
        openhmc_check_seq check;
62
        hmc_base_pkt_seq work;
63
 
64
        hmc_big_pkts_seq b_pkt;
65
        hmc_small_pkts_seq s_pkt;
66
 
67
        hmc_big_pkts_hdelay_seq b_h_pkt;
68
        hmc_big_pkts_zdelay_seq b_z_pkt;
69
        hmc_small_pkts_hdelay_seq s_h_pkt;
70
        hmc_small_pkts_zdelay_seq s_z_pkt;
71
 
72
        function new(string name="posted_pkt_test_seq");
73
                super.new(name);
74
        endfunction : new
75
 
76
        `uvm_object_utils(posted_pkt_test_seq)
77
        `uvm_declare_p_sequencer(vseqr)
78
 
79
        virtual task body();
80
 
81
                `uvm_info(get_type_name(), "starting posted_pkt_test_seq", UVM_NONE)
82
 
83
                //-- write your test here
84
 
85
                `uvm_do(bfm)
86
                #1us;
87
        `uvm_do(init)
88
        #1us;
89
                repeat(iterations)
90
                        randcase
91
                                1 : `uvm_do_with(   work,{req_class == POSTED;})
92
                                1 : `uvm_do_with(  b_pkt,{req_class == POSTED;})
93
                                1 : `uvm_do_with(  s_pkt,{req_class == POSTED;})
94
                                1 : `uvm_do_with(b_h_pkt,{req_class == POSTED;})
95
                                1 : `uvm_do_with(s_h_pkt,{req_class == POSTED;})
96
                                1 : `uvm_do_with(b_z_pkt,{req_class == POSTED;})
97
                                1 : `uvm_do_with(s_z_pkt,{req_class == POSTED;})
98
                        endcase
99
 
100
                #1us
101
                `uvm_do(check)
102
 
103
                #1us;
104
                `uvm_info(get_type_name(), "posted_pkt_test_seq done", UVM_NONE)
105
 
106
        endtask : body
107
 
108
endclass : posted_pkt_test_seq
109
 
110
`endif // posted_pkt_test_SEQ_SV

powered by: WebSVN 2.1.0

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