gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
33namespace gem5
34{
35
36namespace fastmodel
37{
38
39// This ThreadContext class translates accesses to state using gem5's native
40// to the Iris API. This includes extracting and translating register indices.
42{
43 protected:
51
52 public:
55 iris::IrisConnectionInterface *iris_if,
56 const std::string &iris_path);
57
58 bool translateAddress(Addr &paddr, Addr vaddr) override;
59
60 void initFromIrisInstance(const ResourceMap &resources) override;
61
62 RegVal readIntRegFlat(RegIndex idx) const override;
63 void setIntRegFlat(RegIndex idx, RegVal val) override;
64
65 RegVal readCCRegFlat(RegIndex idx) const override;
66 void setCCRegFlat(RegIndex idx, RegVal val) override;
67
68 const std::vector<iris::MemorySpaceId> &getBpSpaceIds() const override;
69};
70
71} // namespace fastmodel
72} // namespace gem5
73
74#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
STL vector class.
Definition stl.hh:37
Bitfield< 15 > system
Definition misc.hh:1032
Bitfield< 63 > val
Definition misc.hh:804
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
uint16_t RegIndex
Definition types.hh:176
uint64_t RegVal
Definition types.hh:173
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147

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