gem5  v22.1.0.0
thread_context.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Google, Inc.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met: redistributions of source code must retain the above copyright
7  * notice, this list of conditions and the following disclaimer;
8  * redistributions in binary form must reproduce the above copyright
9  * notice, this list of conditions and the following disclaimer in the
10  * documentation and/or other materials provided with the distribution;
11  * neither the name of the copyright holders nor the names of its
12  * contributors may be used to endorse or promote products derived from
13  * this software without specific prior written permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef __ARCH_ARM_FASTMODEL_CORTEXA76_THREAD_CONTEXT_HH__
29 #define __ARCH_ARM_FASTMODEL_CORTEXA76_THREAD_CONTEXT_HH__
30 
32 
33 namespace gem5
34 {
35 
36 GEM5_DEPRECATED_NAMESPACE(FastModel, fastmodel);
37 namespace fastmodel
38 {
39 
40 // This ThreadContext class translates accesses to state using gem5's native
41 // to the Iris API. This includes extracting and translating register indices.
43 {
44  protected:
52 
53  public:
54  CortexA76TC(gem5::BaseCPU *cpu, int id, System *system,
55  gem5::BaseMMU *mmu, gem5::BaseISA *isa,
56  iris::IrisConnectionInterface *iris_if,
57  const std::string &iris_path);
58 
59  bool translateAddress(Addr &paddr, Addr vaddr) override;
60 
61  void initFromIrisInstance(const ResourceMap &resources) override;
62 
63  RegVal readIntRegFlat(RegIndex idx) const override;
64  void setIntRegFlat(RegIndex idx, RegVal val) override;
65 
66  RegVal readCCRegFlat(RegIndex idx) const override;
67  void setCCRegFlat(RegIndex idx, RegVal val) override;
68 
69  const std::vector<iris::MemorySpaceId> &getBpSpaceIds() const override;
70 };
71 
72 } // namespace fastmodel
73 } // namespace gem5
74 
75 #endif // __ARCH_ARM_FASTMODEL_CORTEXA76_THREAD_CONTEXT_HH__
std::map< std::string, iris::ResourceInfo > ResourceMap
std::map< int, std::string > IdxNameMap
static IdxNameMap intReg32IdxNameMap
static IdxNameMap vecRegIdxNameMap
const std::vector< iris::MemorySpaceId > & getBpSpaceIds() const override
CortexA76TC(gem5::BaseCPU *cpu, int id, System *system, gem5::BaseMMU *mmu, gem5::BaseISA *isa, iris::IrisConnectionInterface *iris_if, const std::string &iris_path)
void setIntRegFlat(RegIndex idx, RegVal val) override
void setCCRegFlat(RegIndex idx, RegVal val) override
RegVal readIntRegFlat(RegIndex idx) const override
static IdxNameMap flattenedIntIdxNameMap
static IdxNameMap intReg64IdxNameMap
void initFromIrisInstance(const ResourceMap &resources) override
static IdxNameMap miscRegIdxNameMap
static std::vector< iris::MemorySpaceId > bpSpaceIds
static IdxNameMap ccRegIdxNameMap
RegVal readCCRegFlat(RegIndex idx) const override
bool translateAddress(Addr &paddr, Addr vaddr) override
Bitfield< 15 > system
Definition: misc.hh:1004
Bitfield< 63 > val
Definition: misc.hh:776
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint16_t RegIndex
Definition: types.hh:176
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
uint64_t RegVal
Definition: types.hh:173
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)

Generated on Wed Dec 21 2022 10:22:24 for gem5 by doxygen 1.9.1