gem5  v22.1.0.0
evs.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_EVS_HH__
29 #define __ARCH_ARM_FASTMODEL_CORTEXA76_EVS_HH__
30 
31 #include <memory>
32 
38 #include "dev/reset_port.hh"
39 #include "mem/port_proxy.hh"
40 #include "params/FastModelScxEvsCortexA76x1.hh"
41 #include "params/FastModelScxEvsCortexA76x2.hh"
42 #include "params/FastModelScxEvsCortexA76x3.hh"
43 #include "params/FastModelScxEvsCortexA76x4.hh"
44 #include "scx_evs_CortexA76x1.h"
45 #include "scx_evs_CortexA76x2.h"
46 #include "scx_evs_CortexA76x3.h"
47 #include "scx_evs_CortexA76x4.h"
51 
52 namespace gem5
53 {
54 
55 GEM5_DEPRECATED_NAMESPACE(FastModel, fastmodel);
56 namespace fastmodel
57 {
58 
59 class CortexA76Cluster;
60 
61 template <class Types>
63 {
64  private:
65  static const int CoreCount = Types::CoreCount;
66  using Base = typename Types::Base;
67  using Params = typename Types::Params;
68 
70 
73 
75  64, svp_gicv3_comms::gicv3_comms_fw_if,
76  svp_gicv3_comms::gicv3_comms_bw_if, 1,
78 
79  template <typename T>
80  using SignalInitiator = amba_pv::signal_master_port<T>;
81 
84 
97 
99 
101 
103 
105 
106  const Params &params;
107 
108  public:
109  ScxEvsCortexA76(const Params &p) : ScxEvsCortexA76(p.name.c_str(), p) {}
110  ScxEvsCortexA76(const sc_core::sc_module_name &mod_name, const Params &p);
111 
112  void before_end_of_elaboration() override;
113  Port &gem5_getPort(const std::string &if_name, int idx) override;
114 
115  void
117  {
118  Base::end_of_elaboration();
119  Base::start_of_simulation();
120  }
121  void start_of_simulation() override {}
122 
123  void sendFunc(PacketPtr pkt) override;
124 
125  void setClkPeriod(Tick clk_period) override;
126 
127  void setSysCounterFrq(uint64_t sys_counter_frq) override;
128 
129  void setCluster(SimObject *cluster) override;
130 
131  void setResetAddr(int core, Addr addr, bool secure) override;
132 
133  void requestReset();
134 };
135 
137 {
138  using Base = scx_evs_CortexA76x1;
139  using Params = FastModelScxEvsCortexA76x1Params;
140  static const int CoreCount = 1;
141 };
143 extern template class ScxEvsCortexA76<ScxEvsCortexA76x1Types>;
144 
146 {
147  using Base = scx_evs_CortexA76x2;
148  using Params = FastModelScxEvsCortexA76x2Params;
149  static const int CoreCount = 2;
150 };
152 extern template class ScxEvsCortexA76<ScxEvsCortexA76x2Types>;
153 
155 {
156  using Base = scx_evs_CortexA76x3;
157  using Params = FastModelScxEvsCortexA76x3Params;
158  static const int CoreCount = 3;
159 };
161 extern template class ScxEvsCortexA76<ScxEvsCortexA76x3Types>;
162 
164 {
165  using Base = scx_evs_CortexA76x4;
166  using Params = FastModelScxEvsCortexA76x4Params;
167  static const int CoreCount = 4;
168 };
170 extern template class ScxEvsCortexA76<ScxEvsCortexA76x4Types>;
171 
172 } // namespace fastmodel
173 } // namespace gem5
174 
175 #endif // __ARCH_ARM_FASTMODEL_CORTEXA76_EVS_HH__
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
Ports are used to interface objects to each other.
Definition: port.hh:62
Abstract superclass for simulation objects.
Definition: sim_object.hh:148
std::vector< std::unique_ptr< SignalReceiver > > cntvirq
Definition: evs.hh:88
void start_of_simulation() override
Definition: evs.hh:121
typename Types::Base Base
Definition: evs.hh:66
amba_pv::signal_master_port< T > SignalInitiator
Definition: evs.hh:80
std::vector< std::unique_ptr< SignalReceiver > > cntpnsirq
Definition: evs.hh:93
std::vector< std::unique_ptr< SignalReceiver > > pmuirq
Definition: evs.hh:91
void setResetAddr(int core, Addr addr, bool secure) override
Definition: evs.cc:68
std::vector< std::unique_ptr< SignalInitiator< uint64_t > > > rvbaraddr
Definition: evs.hh:94
static const int CoreCount
Definition: evs.hh:65
void setCluster(SimObject *cluster) override
Definition: evs.cc:60
void end_of_elaboration() override
Definition: evs.hh:116
std::vector< std::unique_ptr< TlmGicTarget > > redist
Definition: evs.hh:83
std::vector< std::unique_ptr< SignalSender > > poweron_reset
Definition: evs.hh:96
CortexA76Cluster * gem5CpuCluster
Definition: evs.hh:104
std::vector< std::unique_ptr< SignalReceiver > > cnthpirq
Definition: evs.hh:85
std::vector< std::unique_ptr< SignalReceiver > > ctidbgirq
Definition: evs.hh:90
std::vector< std::unique_ptr< SignalSender > > core_reset
Definition: evs.hh:95
std::vector< std::unique_ptr< SignalReceiver > > cnthvirq
Definition: evs.hh:86
void before_end_of_elaboration() override
Definition: evs.cc:155
typename Types::Params Params
Definition: evs.hh:67
ClockRateControlInitiatorSocket clockRateControl
Definition: evs.hh:71
ClockRateControlInitiatorSocket periphClockRateControl
Definition: evs.hh:72
ScxEvsCortexA76(const Params &p)
Definition: evs.hh:109
ResetResponsePort< ScxEvsCortexA76 > model_reset
Definition: evs.hh:102
void setClkPeriod(Tick clk_period) override
Definition: evs.cc:46
void sendFunc(PacketPtr pkt) override
Definition: evs.cc:145
std::vector< std::unique_ptr< SignalReceiver > > cntpsirq
Definition: evs.hh:87
std::vector< std::unique_ptr< SignalReceiver > > vcpumntirq
Definition: evs.hh:92
std::vector< std::unique_ptr< SignalReceiver > > commirq
Definition: evs.hh:89
Port & gem5_getPort(const std::string &if_name, int idx) override
Definition: evs.cc:185
void setSysCounterFrq(uint64_t sys_counter_frq) override
Definition: evs.cc:53
STL vector class.
Definition: stl.hh:37
Bitfield< 54 > p
Definition: pagetable.hh:70
Bitfield< 3 > addr
Definition: types.hh:84
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
uint64_t Tick
Tick count type.
Definition: types.hh:58
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
@ SC_ONE_OR_MORE_BOUND
Definition: sc_port.hh:69
PortProxy Object Declaration.
FastModelScxEvsCortexA76x1Params Params
Definition: evs.hh:139
FastModelScxEvsCortexA76x2Params Params
Definition: evs.hh:148
FastModelScxEvsCortexA76x3Params Params
Definition: evs.hh:157
FastModelScxEvsCortexA76x4Params Params
Definition: evs.hh:166
const std::string & name()
Definition: trace.cc:49

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