gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
37 #include "mem/port_proxy.hh"
38 #include "params/FastModelScxEvsCortexA76x1.hh"
39 #include "params/FastModelScxEvsCortexA76x2.hh"
40 #include "params/FastModelScxEvsCortexA76x3.hh"
41 #include "params/FastModelScxEvsCortexA76x4.hh"
42 #include "scx_evs_CortexA76x1.h"
43 #include "scx_evs_CortexA76x2.h"
44 #include "scx_evs_CortexA76x3.h"
45 #include "scx_evs_CortexA76x4.h"
49 
50 namespace FastModel
51 {
52 
53 class CortexA76Cluster;
54 
55 template <class Types>
56 class ScxEvsCortexA76 : public Types::Base, public Iris::BaseCpuEvs
57 {
58  private:
59  static const int CoreCount = Types::CoreCount;
60  using Base = typename Types::Base;
61  using Params = typename Types::Params;
62 
64 
67 
69  64, svp_gicv3_comms::gicv3_comms_fw_if,
70  svp_gicv3_comms::gicv3_comms_bw_if, 1,
72 
75 
85 
87 
88  const Params &params;
89 
90  public:
91  ScxEvsCortexA76(const Params &p) : ScxEvsCortexA76(p.name.c_str(), p) {}
92  ScxEvsCortexA76(const sc_core::sc_module_name &mod_name, const Params &p);
93 
94  void before_end_of_elaboration() override;
95  Port &gem5_getPort(const std::string &if_name, int idx) override;
96 
97  void
98  end_of_elaboration() override
99  {
100  Base::end_of_elaboration();
101  Base::start_of_simulation();
102  }
103  void start_of_simulation() override {}
104 
105  void sendFunc(PacketPtr pkt) override;
106 
107  void setClkPeriod(Tick clk_period) override;
108 
109  void setSysCounterFrq(uint64_t sys_counter_frq) override;
110 
111  void setCluster(SimObject *cluster) override;
112 };
113 
115 {
116  using Base = scx_evs_CortexA76x1;
117  using Params = FastModelScxEvsCortexA76x1Params;
118  static const int CoreCount = 1;
119 };
121 extern template class ScxEvsCortexA76<ScxEvsCortexA76x1Types>;
122 
124 {
125  using Base = scx_evs_CortexA76x2;
126  using Params = FastModelScxEvsCortexA76x2Params;
127  static const int CoreCount = 2;
128 };
130 extern template class ScxEvsCortexA76<ScxEvsCortexA76x2Types>;
131 
133 {
134  using Base = scx_evs_CortexA76x3;
135  using Params = FastModelScxEvsCortexA76x3Params;
136  static const int CoreCount = 3;
137 };
139 extern template class ScxEvsCortexA76<ScxEvsCortexA76x3Types>;
140 
142 {
143  using Base = scx_evs_CortexA76x4;
144  using Params = FastModelScxEvsCortexA76x4Params;
145  static const int CoreCount = 4;
146 };
148 extern template class ScxEvsCortexA76<ScxEvsCortexA76x4Types>;
149 
150 } // namespace FastModel
151 
152 #endif // __ARCH_ARM_FASTMODEL_CORTEXA76_EVS_HH__
FastModel::ScxEvsCortexA76::cnthpirq
std::vector< std::unique_ptr< SignalReceiver > > cnthpirq
Definition: evs.hh:76
FastModel::ScxEvsCortexA76::cntpnsirq
std::vector< std::unique_ptr< SignalReceiver > > cntpnsirq
Definition: evs.hh:84
FastModel::ScxEvsCortexA76::CoreCount
static const int CoreCount
Definition: evs.hh:59
sc_core::SC_ONE_OR_MORE_BOUND
@ SC_ONE_OR_MORE_BOUND
Definition: sc_port.hh:69
FastModel::ScxEvsCortexA76::ctidbgirq
std::vector< std::unique_ptr< SignalReceiver > > ctidbgirq
Definition: evs.hh:81
FastModel::ScxEvsCortexA76::commirq
std::vector< std::unique_ptr< SignalReceiver > > commirq
Definition: evs.hh:80
FastModel::ScxEvsCortexA76::cnthvirq
std::vector< std::unique_ptr< SignalReceiver > > cnthvirq
Definition: evs.hh:77
FastModel::ScxEvsCortexA76::gem5_getPort
Port & gem5_getPort(const std::string &if_name, int idx) override
Definition: evs.cc:141
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:59
FastModel::ScxEvsCortexA76::SC_HAS_PROCESS
SC_HAS_PROCESS(ScxEvsCortexA76)
FastModel::ScxEvsCortexA76x4Types::Base
scx_evs_CortexA76x4 Base
Definition: evs.hh:143
FastModel::ScxEvsCortexA76::periphClockRateControl
ClockRateControlInitiatorSocket periphClockRateControl
Definition: evs.hh:66
FastModel::ScxEvsCortexA76::clockRateControl
ClockRateControlInitiatorSocket clockRateControl
Definition: evs.hh:65
FastModel::ScxEvsCortexA76x1Types::Params
FastModelScxEvsCortexA76x1Params Params
Definition: evs.hh:117
std::vector
STL vector class.
Definition: stl.hh:37
FastModel::ScxEvsCortexA76x4Types
Definition: evs.hh:141
FastModel::ScxEvsCortexA76::setCluster
void setCluster(SimObject *cluster) override
Definition: evs.cc:56
FastModel::ScxEvsCortexA76::start_of_simulation
void start_of_simulation() override
Definition: evs.hh:103
cpu.hh
FastModel::ScxEvsCortexA76::amba
AmbaInitiator amba
Definition: evs.hh:73
sc_event.hh
FastModel::ScxEvsCortexA76x1Types::Base
scx_evs_CortexA76x1 Base
Definition: evs.hh:116
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
FastModel::ScxEvsCortexA76x1Types
Definition: evs.hh:114
port_proxy.hh
FastModel::ScxEvsCortexA76x3Types::Params
FastModelScxEvsCortexA76x3Params Params
Definition: evs.hh:135
FastModel::ScxEvsCortexA76::TlmGicTarget
sc_gem5::TlmTargetBaseWrapper< 64, svp_gicv3_comms::gicv3_comms_fw_if, svp_gicv3_comms::gicv3_comms_bw_if, 1, sc_core::SC_ONE_OR_MORE_BOUND > TlmGicTarget
Definition: evs.hh:71
FastModel::ScxEvsCortexA76::setClkPeriod
void setClkPeriod(Tick clk_period) override
Definition: evs.cc:42
sc_core::sc_module_name
Definition: sc_module_name.hh:41
FastModel::ScxEvsCortexA76::setSysCounterFrq
void setSysCounterFrq(uint64_t sys_counter_frq) override
Definition: evs.cc:49
FastModel::ScxEvsCortexA76x2Types::Params
FastModelScxEvsCortexA76x2Params Params
Definition: evs.hh:126
FastModel::ScxEvsCortexA76::before_end_of_elaboration
void before_end_of_elaboration() override
Definition: evs.cc:111
FastModel::ScxEvsCortexA76::redist
std::vector< std::unique_ptr< TlmGicTarget > > redist
Definition: evs.hh:74
name
const std::string & name()
Definition: trace.cc:48
sc_module.hh
amba_ports.hh
FastModel::ScxEvsCortexA76::Base
typename Types::Base Base
Definition: evs.hh:60
FastModel::ScxEvsCortexA76::sendFunc
void sendFunc(PacketPtr pkt) override
Definition: evs.cc:101
ClockRateControlInitiatorSocket
Definition: exported_clock_rate_control.hh:60
FastModel::ScxEvsCortexA76x3Types::Base
scx_evs_CortexA76x3 Base
Definition: evs.hh:134
FastModel::ScxEvsCortexA76x1Types::CoreCount
static const int CoreCount
Definition: evs.hh:118
FastModel::ScxEvsCortexA76::cntpsirq
std::vector< std::unique_ptr< SignalReceiver > > cntpsirq
Definition: evs.hh:78
FastModel::ScxEvsCortexA76::end_of_elaboration
void end_of_elaboration() override
Definition: evs.hh:98
FastModel::ScxEvsCortexA76
Definition: evs.hh:56
FastModel::ScxEvsCortexA76::vcpumntirq
std::vector< std::unique_ptr< SignalReceiver > > vcpumntirq
Definition: evs.hh:83
FastModel
Definition: amba_from_tlm_bridge.cc:32
sc_gem5::TlmInitiatorBaseWrapper
Definition: tlm_port_wrapper.hh:40
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:258
FastModel::CortexA76Cluster
Definition: cortex_a76.hh:77
FastModel::ScxEvsCortexA76x3Types
Definition: evs.hh:132
exported_clock_rate_control.hh
tlm_port_wrapper.hh
FastModel::ScxEvsCortexA76x4Types::Params
FastModelScxEvsCortexA76x4Params Params
Definition: evs.hh:144
FastModel::ScxEvsCortexA76::params
const Params & params
Definition: evs.hh:88
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
signal_receiver.hh
FastModel::ScxEvsCortexA76x2Types::Base
scx_evs_CortexA76x2 Base
Definition: evs.hh:125
FastModel::ScxEvsCortexA76::Params
typename Types::Params Params
Definition: evs.hh:61
sc_gem5::TlmTargetBaseWrapper
Definition: tlm_port_wrapper.hh:44
FastModel::ScxEvsCortexA76::cntvirq
std::vector< std::unique_ptr< SignalReceiver > > cntvirq
Definition: evs.hh:79
FastModel::ScxEvsCortexA76::pmuirq
std::vector< std::unique_ptr< SignalReceiver > > pmuirq
Definition: evs.hh:82
FastModel::ScxEvsCortexA76x2Types
Definition: evs.hh:123
FastModel::ScxEvsCortexA76::ScxEvsCortexA76
ScxEvsCortexA76(const Params &p)
Definition: evs.hh:91
FastModel::ScxEvsCortexA76::gem5CpuCluster
CortexA76Cluster * gem5CpuCluster
Definition: evs.hh:86
Iris::BaseCpuEvs
Definition: cpu.hh:42
SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:141

Generated on Tue Jun 22 2021 15:28:19 for gem5 by doxygen 1.8.17