gem5  v20.1.0.0
hsa_packet.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2017 Advanced Micro Devices, Inc.
3  * All rights reserved.
4  *
5  * For use for simulation and test purposes only
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice,
11  * this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived from this
19  * software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  *
33  * Authors: Eric van Tassell
34  */
35 
36 #ifndef __DEV_HSA_HSA_PACKET__
37 #define __DEV_HSA_HSA_PACKET__
38 
39 #define _HSA_PACKET_TYPE_VENDOR_SPECIFIC 0
40 
41 #include <stdint.h>
42 
43 typedef struct hsa_packet_header_s {
44  // TODO: replace with more portable impl based on offset, length
45  uint16_t type:8;
46  uint16_t barrier:1;
47  uint16_t acquire_fence_scope:2;
48  uint16_t release_fence_scope:2;
49  uint16_t reserved:3;
51 
52 //TODO: put an _ in front of these guys to avoud prob with hsa.h for now
53 typedef struct _hsa_dispatch_packet_s {
54  uint16_t header;
55  uint16_t setup;
56  uint16_t workgroup_size_x;
57  uint16_t workgroup_size_y;
58  uint16_t workgroup_size_z;
59  uint16_t reserved0;
60  uint32_t grid_size_x;
61  uint32_t grid_size_y;
62  uint32_t grid_size_z;
65  uint64_t kernel_object;
66  uint64_t kernarg_address;
67  uint64_t reserved1;
70 
72  uint16_t header;
73  uint16_t type;
74  uint32_t reserved0;
75  uint64_t return_address;
76  uint64_t arg[4];
77  uint64_t reserved2;
80 
81 typedef struct _hsa_barrier_and_packet_s {
82  uint16_t header;
83  uint16_t reserved0;
84  uint32_t reserved1;
85  uint64_t dep_signal[5];
86  uint64_t reserved2;
89 
90 typedef struct _hsa_barrier_or_packet_s {
91  uint16_t header;
92  uint16_t reserved0;
93  uint32_t reserved1;
94  uint64_t dep_signal[5];
95  uint64_t reserved2;
98 
99 #endif // __DEV_HSA_HSA_PACKET_HH__
_hsa_agent_dispatch_packet_s
Definition: hsa_packet.hh:71
_hsa_barrier_or_packet_s::dep_signal
uint64_t dep_signal[5]
Definition: hsa_packet.hh:94
_hsa_agent_dispatch_packet_s::header
uint16_t header
Definition: hsa_packet.hh:72
_hsa_dispatch_packet_s::setup
uint16_t setup
Definition: hsa_packet.hh:55
_hsa_barrier_or_packet_s::completion_signal
uint64_t completion_signal
Definition: hsa_packet.hh:96
_hsa_dispatch_packet_s::header
uint16_t header
Definition: hsa_packet.hh:54
_hsa_dispatch_packet_s::completion_signal
uint64_t completion_signal
Definition: hsa_packet.hh:68
_hsa_dispatch_packet_s::grid_size_z
uint32_t grid_size_z
Definition: hsa_packet.hh:62
hsa_packet_header_s::type
uint16_t type
Definition: hsa_packet.hh:45
_hsa_barrier_and_packet_s::reserved2
uint64_t reserved2
Definition: hsa_packet.hh:86
hsa_packet_header_s::reserved
uint16_t reserved
Definition: hsa_packet.hh:49
_hsa_agent_dispatch_packet_s::type
uint16_t type
Definition: hsa_packet.hh:73
_hsa_dispatch_packet_s::grid_size_y
uint32_t grid_size_y
Definition: hsa_packet.hh:61
_hsa_barrier_and_packet_s::reserved1
uint32_t reserved1
Definition: hsa_packet.hh:84
_hsa_dispatch_packet_s::reserved0
uint16_t reserved0
Definition: hsa_packet.hh:59
_hsa_dispatch_packet_s::private_segment_size
uint32_t private_segment_size
Definition: hsa_packet.hh:63
_hsa_agent_dispatch_packet_s::return_address
uint64_t return_address
Definition: hsa_packet.hh:75
_hsa_dispatch_packet_s::grid_size_x
uint32_t grid_size_x
Definition: hsa_packet.hh:60
_hsa_dispatch_packet_s::kernarg_address
uint64_t kernarg_address
Definition: hsa_packet.hh:66
_hsa_dispatch_packet_s::group_segment_size
uint32_t group_segment_size
Definition: hsa_packet.hh:64
_hsa_barrier_and_packet_s::header
uint16_t header
Definition: hsa_packet.hh:82
_hsa_agent_dispatch_packet_s::reserved0
uint32_t reserved0
Definition: hsa_packet.hh:74
hsa_packet_header_s
Definition: hsa_packet.hh:43
_hsa_barrier_and_packet_s::completion_signal
uint64_t completion_signal
Definition: hsa_packet.hh:87
_hsa_barrier_and_packet_s
Definition: hsa_packet.hh:81
_hsa_agent_dispatch_packet_s::completion_signal
uint64_t completion_signal
Definition: hsa_packet.hh:78
_hsa_dispatch_packet_s::reserved1
uint64_t reserved1
Definition: hsa_packet.hh:67
hsa_packet_header_bitfield_t
struct hsa_packet_header_s hsa_packet_header_bitfield_t
_hsa_dispatch_packet_s::workgroup_size_z
uint16_t workgroup_size_z
Definition: hsa_packet.hh:58
_hsa_agent_dispatch_packet_s::reserved2
uint64_t reserved2
Definition: hsa_packet.hh:77
_hsa_dispatch_packet_s::kernel_object
uint64_t kernel_object
Definition: hsa_packet.hh:65
_hsa_dispatch_packet_s::workgroup_size_y
uint16_t workgroup_size_y
Definition: hsa_packet.hh:57
hsa_packet_header_s::acquire_fence_scope
uint16_t acquire_fence_scope
Definition: hsa_packet.hh:47
_hsa_barrier_or_packet_s
Definition: hsa_packet.hh:90
_hsa_barrier_or_packet_s::reserved1
uint32_t reserved1
Definition: hsa_packet.hh:93
_hsa_dispatch_packet_t
struct _hsa_dispatch_packet_s _hsa_dispatch_packet_t
_hsa_barrier_or_packet_s::reserved2
uint64_t reserved2
Definition: hsa_packet.hh:95
_hsa_dispatch_packet_s
Definition: hsa_packet.hh:53
_hsa_dispatch_packet_s::workgroup_size_x
uint16_t workgroup_size_x
Definition: hsa_packet.hh:56
_hsa_barrier_or_packet_s::reserved0
uint16_t reserved0
Definition: hsa_packet.hh:92
_hsa_agent_dispatch_packet_t
struct _hsa_agent_dispatch_packet_s _hsa_agent_dispatch_packet_t
hsa_packet_header_s::release_fence_scope
uint16_t release_fence_scope
Definition: hsa_packet.hh:48
_hsa_barrier_or_packet_t
struct _hsa_barrier_or_packet_s _hsa_barrier_or_packet_t
_hsa_barrier_and_packet_s::reserved0
uint16_t reserved0
Definition: hsa_packet.hh:83
_hsa_barrier_and_packet_t
struct _hsa_barrier_and_packet_s _hsa_barrier_and_packet_t
hsa_packet_header_s::barrier
uint16_t barrier
Definition: hsa_packet.hh:46
_hsa_barrier_or_packet_s::header
uint16_t header
Definition: hsa_packet.hh:91
_hsa_agent_dispatch_packet_s::arg
uint64_t arg[4]
Definition: hsa_packet.hh:76
_hsa_barrier_and_packet_s::dep_signal
uint64_t dep_signal[5]
Definition: hsa_packet.hh:85

Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17