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 <vector>
34
35#include "../utils/sc_report_handler.hh"
36#include "sc_module.hh" // for sc_gen_unique_name
37#include "sc_object.hh"
38
39namespace sc_gem5
40{

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

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

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

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

--- 57 unchanged lines hidden ---