gem5 v24.0.0.0
Loading...
Searching...
No Matches
dmi.hh
Go to the documentation of this file.
1/*****************************************************************************
2
3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4 more contributor license agreements. See the NOTICE file distributed
5 with this work for additional information regarding copyright ownership.
6 Accellera licenses this file to you under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with the
8 License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 implied. See the License for the specific language governing
16 permissions and limitations under the License.
17
18 *****************************************************************************/
19
20#ifndef __SYSTEMC_EXT_TLM_CORE_2_INTERFACES_DMI_HH__
21#define __SYSTEMC_EXT_TLM_CORE_2_INTERFACES_DMI_HH__
22
25
26namespace tlm
27{
28
30{
31 public:
32 // Enum for indicating the access granted to the initiator.
33 // The initiator uses gp.m_command to indicate it intention (read/write)
34 // The target is allowed to promote DMI_ACCESS_READ or DMI_ACCESS_WRITE
35 // requests to dmi_access_read_write.
36
38 DMI_ACCESS_NONE = 0x00, // no access
39 DMI_ACCESS_READ = 0x01, // read access
40 DMI_ACCESS_WRITE = 0x02, // write access
42 // read/write access
43 };
44
45 tlm_dmi() { init(); }
46
47 void
57
58 unsigned char *get_dmi_ptr() const { return m_dmi_ptr; }
64 bool is_none_allowed() const { return m_dmi_access == DMI_ACCESS_NONE; }
65 bool
67 {
69 }
70 bool
75 bool
80
81 void set_dmi_ptr(unsigned char *p) { m_dmi_ptr = p; }
91
92 private:
93 // If the forward call is successful, the target returns the dmi_ptr,
94 // which must point to the data element corresponding to the
95 // dmi_start_address. The data is organized as a byte array with the
96 // endianness of the target (endianness member of the tlm_dmi struct).
97
98 unsigned char *m_dmi_ptr;
99
100 // The absolute start and end addresses of the DMI region. If the decoder
101 // logic in the interconnect changes the address field e.g. by masking, the
102 // interconnect is responsible to transform the relative address back to an
103 // absolute address again.
104
107
108 // Granted access
109
111
112 // These members define the latency of read/write transactions. The
113 // initiator must initialize these members to zero before requesting a
114 // dmi pointer, because both the interconnect as well as the target can
115 // add to the total transaction latency.
116 // Depending on the 'type' attribute only one, or both of these attributes
117 // will be valid.
118
121};
122
123} // namespace tlm
124
125#endif /* __SYSTEMC_EXT_TLM_CORE_2_INTERFACES_DMI_HH__ */
sc_core::sc_time m_dmi_write_latency
Definition dmi.hh:120
void allow_read()
Definition dmi.hh:88
void set_granted_access(dmi_access_e a)
Definition dmi.hh:86
void init()
Definition dmi.hh:48
unsigned char * get_dmi_ptr() const
Definition dmi.hh:58
sc_dt::uint64 get_start_address() const
Definition dmi.hh:59
bool is_none_allowed() const
Definition dmi.hh:64
sc_core::sc_time get_write_latency() const
Definition dmi.hh:62
sc_dt::uint64 get_end_address() const
Definition dmi.hh:60
sc_dt::uint64 m_dmi_end_address
Definition dmi.hh:106
sc_core::sc_time m_dmi_read_latency
Definition dmi.hh:119
sc_dt::uint64 m_dmi_start_address
Definition dmi.hh:105
void allow_none()
Definition dmi.hh:87
@ DMI_ACCESS_WRITE
Definition dmi.hh:40
@ DMI_ACCESS_NONE
Definition dmi.hh:38
@ DMI_ACCESS_READ_WRITE
Definition dmi.hh:41
@ DMI_ACCESS_READ
Definition dmi.hh:39
dmi_access_e get_granted_access() const
Definition dmi.hh:63
dmi_access_e m_dmi_access
Definition dmi.hh:110
bool is_read_allowed() const
Definition dmi.hh:66
void set_write_latency(sc_core::sc_time t)
Definition dmi.hh:85
void allow_write()
Definition dmi.hh:89
bool is_write_allowed() const
Definition dmi.hh:71
unsigned char * m_dmi_ptr
Definition dmi.hh:98
void set_dmi_ptr(unsigned char *p)
Definition dmi.hh:81
bool is_read_write_allowed() const
Definition dmi.hh:76
sc_core::sc_time get_read_latency() const
Definition dmi.hh:61
void set_start_address(sc_dt::uint64 addr)
Definition dmi.hh:82
void set_end_address(sc_dt::uint64 addr)
Definition dmi.hh:83
tlm_dmi()
Definition dmi.hh:45
void set_read_latency(sc_core::sc_time t)
Definition dmi.hh:84
void allow_read_write()
Definition dmi.hh:90
SwitchingFiber a
const sc_time SC_ZERO_TIME
Definition sc_time.cc:290
uint64_t uint64
Definition sc_nbdefs.hh:172

Generated on Tue Jun 18 2024 16:24:07 for gem5 by doxygen 1.11.0