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 |
|
|
//
|
41 |
|
|
// axi4_valid_cycle
|
42 |
|
|
//
|
43 |
|
|
|
44 |
|
|
`ifndef AXI4_STREAM_VALID_CYCLE_SV
|
45 |
|
|
`define AXI4_STREAM_VALID_CYCLE_SV
|
46 |
|
|
|
47 |
|
|
class axi4_stream_valid_cycle #(parameter DATA_BYTES = 16, parameter TUSER_WIDTH = 16) extends uvm_sequence_item;
|
48 |
|
|
|
49 |
|
|
rand bit [DATA_BYTES*8-1:0] tdata;
|
50 |
15 |
juko |
rand bit [TUSER_WIDTH-1:0] tuser;
|
51 |
12 |
juko |
rand int unsigned delay = 0;
|
52 |
|
|
|
53 |
|
|
constraint c_packet_delay {
|
54 |
|
|
delay < 20 ;
|
55 |
|
|
}
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
`uvm_object_param_utils_begin(axi4_stream_valid_cycle #(.DATA_BYTES(DATA_BYTES), .TUSER_WIDTH(TUSER_WIDTH)))
|
59 |
|
|
`uvm_field_int(tdata, UVM_ALL_ON | UVM_NOPACK | UVM_HEX)
|
60 |
|
|
`uvm_field_int(tuser, UVM_ALL_ON | UVM_NOPACK | UVM_HEX)
|
61 |
|
|
`uvm_field_int(delay, UVM_DEFAULT | UVM_DEC| UVM_NOPACK)
|
62 |
|
|
`uvm_object_utils_end
|
63 |
|
|
|
64 |
|
|
function new (string name = "axi4_stream_valid_cycle");
|
65 |
|
|
super.new(name);
|
66 |
|
|
endfunction : new
|
67 |
|
|
|
68 |
|
|
endclass : axi4_stream_valid_cycle
|
69 |
|
|
|
70 |
|
|
`endif // AXI4_STREAM_VALID_CYCLE_SV
|
71 |
|
|
|