gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
signal_interrupt.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_PROTOCOL_SIGNAL_INTERRUPT_HH__
31 #define __ARCH_ARM_FASTMODEL_PROTOCOL_SIGNAL_INTERRUPT_HH__
32 
33 #include <string>
34 #include <systemc>
35 #include <tlm>
36 
38 
40 {
41  public:
42  virtual ~SignalInterruptFwIf() {}
43  virtual void ppi(uint8_t cpu, uint32_t num, bool state) = 0;
44  virtual void spi(uint32_t num, bool state) = 0;
45 };
46 
48 {
49  public:
50  virtual ~SignalInterruptBwIf() {}
51 };
52 
54 {
55  public:
56  SignalInterruptSlaveBase(const std::string &name) {}
57 };
58 
60  public tlm::tlm_base_initiator_socket<64, SignalInterruptFwIf,
61  SignalInterruptBwIf>
62 {
63  private:
65 
66  public:
69 
70  using Base::bind;
71  using Base::operator();
72 
74  {
75  get_base_export().bind(dummyBwIf);
76  }
77  SignalInterruptInitiatorSocket(const char *name) : Base(name)
78  {
79  get_base_export().bind(dummyBwIf);
80  }
81 
82  const char *
83  kind() const override
84  {
85  return "SignalInterruptInitiatorSocket";
86  }
87 
88  std::type_index
89  get_protocol_types() const override
90  {
91  return typeid(SignalInterruptDummyProtocolType);
92  }
93 };
94 
96  public tlm::tlm_base_target_socket<64, SignalInterruptFwIf,
97  SignalInterruptBwIf>
98 {
99  public:
102 
103  using Base::bind;
104  using Base::operator();
105 
106  using Base::Base;
107 
108  const char *
109  kind() const override
110  {
111  return "SignalInterruptInitiatorSocket";
112  }
113 
114  std::type_index
115  get_protocol_types() const override
116  {
117  return typeid(SignalInterruptDummyProtocolType);
118  }
119 };
120 
121 #endif // __ARCH_ARM_FASTMODEL_PROTOCOL_SIGNAL_INTERRUPT_HH__
tlm::tlm_base_target_socket< 64, SignalInterruptFwIf, SignalInterruptBwIf > Base
const std::string & name()
Definition: trace.cc:54
SignalInterruptSlaveBase(const std::string &name)
std::type_index get_protocol_types() const override
tlm::tlm_base_initiator_socket< 64, SignalInterruptFwIf, SignalInterruptBwIf > Base
std::type_index get_protocol_types() const override
const char * kind() const override
virtual ~SignalInterruptFwIf()
virtual ~SignalInterruptBwIf()
const char * kind() const override
SignalInterruptInitiatorSocket(const char *name)

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