gem5  v19.0.0.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  * Authors: Gabe Black
28  */
29 
30 #ifndef __ARCH_ARM_FASTMODEL_CORTEXA76_EVS_HH__
31 #define __ARCH_ARM_FASTMODEL_CORTEXA76_EVS_HH__
32 
33 #include <memory>
34 
38 #include "mem/port_proxy.hh"
39 #include "params/FastModelScxEvsCortexA76x1.hh"
40 #include "params/FastModelScxEvsCortexA76x2.hh"
41 #include "params/FastModelScxEvsCortexA76x3.hh"
42 #include "params/FastModelScxEvsCortexA76x4.hh"
43 #include "scx_evs_CortexA76x1.h"
44 #include "scx_evs_CortexA76x2.h"
45 #include "scx_evs_CortexA76x3.h"
46 #include "scx_evs_CortexA76x4.h"
50 
51 namespace FastModel
52 {
53 
54 class CortexA76Cluster;
55 
56 template <class Types>
57 class ScxEvsCortexA76 : public Types::Base
58 {
59  private:
60  static const int CoreCount = Types::CoreCount;
61  using Base = typename Types::Base;
62  using Params = typename Types::Params;
63 
65 
67 
69  64, svp_gicv3_comms::gicv3_comms_fw_if,
70  svp_gicv3_comms::gicv3_comms_bw_if, 1,
72 
75 
85 
90 
91  void sendFunc(PacketPtr pkt);
92 
93  void clockChangeHandler();
94 
95  const Params &params;
96 
97  public:
98  ScxEvsCortexA76(const sc_core::sc_module_name &mod_name, const Params &p);
99 
100  void before_end_of_elaboration() override;
101  Port &gem5_getPort(const std::string &if_name, int idx) override;
102 
103  void
105  {
106  Base::end_of_elaboration();
107  Base::start_of_simulation();
108  }
109  void start_of_simulation() override {}
110 };
111 
113 {
114  using Base = scx_evs_CortexA76x1;
115  using Params = FastModelScxEvsCortexA76x1Params;
116  static const int CoreCount = 1;
117 };
119 extern template class ScxEvsCortexA76<ScxEvsCortexA76x1Types>;
120 
122 {
123  using Base = scx_evs_CortexA76x2;
124  using Params = FastModelScxEvsCortexA76x2Params;
125  static const int CoreCount = 2;
126 };
128 extern template class ScxEvsCortexA76<ScxEvsCortexA76x2Types>;
129 
131 {
132  using Base = scx_evs_CortexA76x3;
133  using Params = FastModelScxEvsCortexA76x3Params;
134  static const int CoreCount = 3;
135 };
137 extern template class ScxEvsCortexA76<ScxEvsCortexA76x3Types>;
138 
140 {
141  using Base = scx_evs_CortexA76x4;
142  using Params = FastModelScxEvsCortexA76x4Params;
143  static const int CoreCount = 4;
144 };
146 extern template class ScxEvsCortexA76<ScxEvsCortexA76x4Types>;
147 
148 } // namespace FastModel
149 
150 #endif // __ARCH_ARM_FASTMODEL_CORTEXA76_EVS_HH__
typename Types::Params Params
Definition: evs.hh:62
Ports are used to interface objects to each other.
Definition: port.hh:60
std::vector< std::unique_ptr< SignalReceiver > > cntpsirq
Definition: evs.hh:78
const Params & params
Definition: evs.hh:95
scx_evs_CortexA76x3 Base
Definition: evs.hh:132
FastModelScxEvsCortexA76x4Params Params
Definition: evs.hh:142
sc_core::sc_event clockChanged
Definition: evs.hh:86
ClockRateControlInitiatorSocket clockRateControl
Definition: evs.hh:66
FastModelScxEvsCortexA76x2Params Params
Definition: evs.hh:124
static const int CoreCount
Definition: evs.hh:60
sc_core::sc_attribute< CortexA76Cluster * > gem5CpuCluster
Definition: evs.hh:88
typename Types::Base Base
Definition: evs.hh:61
std::vector< std::unique_ptr< SignalReceiver > > commirq
Definition: evs.hh:80
std::vector< std::unique_ptr< SignalReceiver > > pmuirq
Definition: evs.hh:82
Port & gem5_getPort(const std::string &if_name, int idx) override
Definition: evs.cc:142
sc_core::sc_attribute< PortProxy::SendFunctionalFunc > sendFunctional
Definition: evs.hh:89
STL vector class.
Definition: stl.hh:40
PortProxy Object Declaration.
sc_core::sc_attribute< Tick > clockPeriod
Definition: evs.hh:87
FastModelScxEvsCortexA76x3Params Params
Definition: evs.hh:133
std::vector< std::unique_ptr< SignalReceiver > > cnthvirq
Definition: evs.hh:77
AmbaInitiator amba
Definition: evs.hh:73
void end_of_elaboration() override
Definition: evs.hh:104
scx_evs_CortexA76x1 Base
Definition: evs.hh:114
ScxEvsCortexA76(const sc_core::sc_module_name &mod_name, const Params &p)
Definition: evs.cc:50
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Definition: packet.hh:255
scx_evs_CortexA76x4 Base
Definition: evs.hh:141
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
std::vector< std::unique_ptr< SignalReceiver > > vcpumntirq
Definition: evs.hh:83
void sendFunc(PacketPtr pkt)
Definition: evs.cc:100
void clockChangeHandler()
Definition: evs.cc:44
SC_HAS_PROCESS(ScxEvsCortexA76)
void before_end_of_elaboration() override
Definition: evs.cc:110
std::vector< std::unique_ptr< SignalReceiver > > ctidbgirq
Definition: evs.hh:81
void start_of_simulation() override
Definition: evs.hh:109
std::vector< std::unique_ptr< SignalReceiver > > cntpnsirq
Definition: evs.hh:84
std::vector< std::unique_ptr< SignalReceiver > > cnthpirq
Definition: evs.hh:76
scx_evs_CortexA76x2 Base
Definition: evs.hh:123
Bitfield< 0 > p
FastModelScxEvsCortexA76x1Params Params
Definition: evs.hh:115
std::vector< std::unique_ptr< TlmGicTarget > > redist
Definition: evs.hh:74
std::vector< std::unique_ptr< SignalReceiver > > cntvirq
Definition: evs.hh:79

Generated on Fri Feb 28 2020 16:26:56 for gem5 by doxygen 1.8.13