Deleted Added
sdiff udiff text old ( 13245:c666c5d4996b ) new ( 13273:af60ddcf2a32 )
full compact
1/*
2 * Copyright 2018 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

--- 16 unchanged lines hidden (view full) ---

25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#ifndef __SYSTEMC_EXT_CORE_SC_PORT_HH__
31#define __SYSTEMC_EXT_CORE_SC_PORT_HH__
32
33#include <typeinfo>
34#include <vector>
35
36#include "../utils/sc_report_handler.hh"
37#include "sc_module.hh" // for sc_gen_unique_name
38#include "sc_object.hh"
39
40namespace sc_gem5
41{

--- 62 unchanged lines hidden (view full) ---

104 private:
105 friend class ::sc_gem5::Port;
106 friend class ::sc_gem5::Kernel;
107
108 virtual sc_interface *_gem5Interface(int n) const = 0;
109 virtual void _gem5AddInterface(sc_interface *i) = 0;
110
111 ::sc_gem5::Port *_gem5Port;
112 virtual const char *_ifTypeName() const = 0;
113};
114
115template <class IF>
116class sc_port_b : public sc_port_base
117{
118 public:
119 void operator () (IF &i) { bind(i); }
120 void operator () (sc_port_b<IF> &p) { bind(p); }

--- 86 unchanged lines hidden (view full) ---

207 void
208 _gem5AddInterface(sc_interface *i)
209 {
210 IF *interface = dynamic_cast<IF *>(i);
211 sc_assert(interface);
212 _interfaces.push_back(interface);
213 }
214
215 const char *_ifTypeName() const { return typeid(IF).name(); }
216
217 // Disabled
218 sc_port_b() {}
219 sc_port_b(const sc_port_b<IF> &) {}
220 sc_port_b<IF> &operator = (const sc_port_b<IF> &) { return *this; }
221};
222
223template <class IF, int N=1, sc_port_policy P=SC_ONE_OR_MORE_BOUND>
224class sc_port : public sc_port_b<IF>

--- 57 unchanged lines hidden ---