sc_port.hh (12938:003057e39b9f) | sc_port.hh (12944:3909a6e6fa6e) |
---|---|
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 --- 43 unchanged lines hidden (view full) --- 52 {} 53 54 void warn_unimpl(const char *func) const; 55 56 protected: 57 // Implementation defined, but depended on by the tests. 58 void bind(sc_interface &); 59 void bind(sc_port_base &); | 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 --- 43 unchanged lines hidden (view full) --- 52 {} 53 54 void warn_unimpl(const char *func) const; 55 56 protected: 57 // Implementation defined, but depended on by the tests. 58 void bind(sc_interface &); 59 void bind(sc_port_base &); |
60 61 // Implementation defined, but depended on by the tests. 62 virtual int vbind(sc_interface &) = 0; 63 virtual int vbind(sc_port_base &) = 0; |
|
60}; 61 62template <class IF> 63class sc_port_b : public sc_port_base 64{ 65 public: 66 void 67 operator () (IF &) --- 77 unchanged lines hidden (view full) --- 145 explicit sc_port_b(int n, sc_port_policy p) : 146 sc_port_base(sc_gen_unique_name("sc_port"), n, p) 147 {} 148 sc_port_b(const char *name, int n, sc_port_policy p) : 149 sc_port_base(name, n, p) 150 {} 151 virtual ~sc_port_b() {} 152 | 64}; 65 66template <class IF> 67class sc_port_b : public sc_port_base 68{ 69 public: 70 void 71 operator () (IF &) --- 77 unchanged lines hidden (view full) --- 149 explicit sc_port_b(int n, sc_port_policy p) : 150 sc_port_base(sc_gen_unique_name("sc_port"), n, p) 151 {} 152 sc_port_b(const char *name, int n, sc_port_policy p) : 153 sc_port_base(name, n, p) 154 {} 155 virtual ~sc_port_b() {} 156 |
157 // Implementation defined, but depended on by the tests. 158 int 159 vbind(sc_interface &) 160 { 161 this->warn_unimpl(__PRETTY_FUNCTION__); 162 return 0; 163 } 164 int 165 vbind(sc_port_base &) 166 { 167 this->warn_unimpl(__PRETTY_FUNCTION__); 168 return 0; 169 } 170 |
|
153 private: 154 // Disabled 155 sc_port_b() {} 156 sc_port_b(const sc_port_b<IF> &) {} 157 sc_port_b<IF> &operator = (const sc_port_b<IF> &) { return *this; } 158}; 159 160template <class IF, int N=1, sc_port_policy P=SC_ONE_OR_MORE_BOUND> --- 58 unchanged lines hidden --- | 171 private: 172 // Disabled 173 sc_port_b() {} 174 sc_port_b(const sc_port_b<IF> &) {} 175 sc_port_b<IF> &operator = (const sc_port_b<IF> &) { return *this; } 176}; 177 178template <class IF, int N=1, sc_port_policy P=SC_ONE_OR_MORE_BOUND> --- 58 unchanged lines hidden --- |