sc_port.hh (13245:c666c5d4996b) | sc_port.hh (13273:af60ddcf2a32) |
---|---|
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 | 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> |
|
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; | 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; |
|
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 | 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 |
|
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 --- | 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 --- |