sc_port.hh (13053:a7a320144bc1) sc_port.hh (13059:4be5f408e128)
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

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

70 // Implementation defined, but depended on by the tests.
71 void bind(sc_interface &);
72 void bind(sc_port_base &);
73
74 // Implementation defined, but depended on by the tests.
75 virtual int vbind(sc_interface &) = 0;
76 virtual int vbind(sc_port_base &) = 0;
77
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

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

70 // Implementation defined, but depended on by the tests.
71 void bind(sc_interface &);
72 void bind(sc_port_base &);
73
74 // Implementation defined, but depended on by the tests.
75 virtual int vbind(sc_interface &) = 0;
76 virtual int vbind(sc_port_base &) = 0;
77
78 virtual void before_end_of_elaboration() = 0;
79 virtual void end_of_elaboration() = 0;
80 virtual void start_of_simulation() = 0;
81 virtual void end_of_simulation() = 0;
82
78 private:
79 friend class ::sc_gem5::PendingSensitivityPort;
80 friend class ::sc_gem5::Kernel;
81
82 void _gem5Finalize();
83
84 virtual sc_interface *_gem5Interface(int n) const = 0;
85 virtual void _gem5AddInterface(sc_interface *i) = 0;

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

105
106 IF *operator [] (int n) { return _interfaces.at(n); }
107 const IF *operator [] (int n) const { return _interfaces.at(n); }
108
109 sc_interface *get_interface() { return _interfaces.at(0); }
110 const sc_interface *get_interface() const { return _interfaces.at(0); }
111
112 protected:
83 private:
84 friend class ::sc_gem5::PendingSensitivityPort;
85 friend class ::sc_gem5::Kernel;
86
87 void _gem5Finalize();
88
89 virtual sc_interface *_gem5Interface(int n) const = 0;
90 virtual void _gem5AddInterface(sc_interface *i) = 0;

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

110
111 IF *operator [] (int n) { return _interfaces.at(n); }
112 const IF *operator [] (int n) const { return _interfaces.at(n); }
113
114 sc_interface *get_interface() { return _interfaces.at(0); }
115 const sc_interface *get_interface() const { return _interfaces.at(0); }
116
117 protected:
113 virtual void before_end_of_elaboration() {}
114 virtual void end_of_elaboration() {}
115 virtual void start_of_elaboration() {}
116 virtual void end_of_simulation() {}
118 void before_end_of_elaboration() {}
119 void end_of_elaboration() {}
120 void start_of_simulation() {}
121 void end_of_simulation() {}
117
118 explicit sc_port_b(int n, sc_port_policy p) :
119 sc_port_base(sc_gen_unique_name("port"), n, p)
120 {}
121 sc_port_b(const char *name, int n, sc_port_policy p) :
122 sc_port_base(name, n, p)
123 {}
124 virtual ~sc_port_b() {}

--- 98 unchanged lines hidden ---
122
123 explicit sc_port_b(int n, sc_port_policy p) :
124 sc_port_base(sc_gen_unique_name("port"), n, p)
125 {}
126 sc_port_b(const char *name, int n, sc_port_policy p) :
127 sc_port_base(name, n, p)
128 {}
129 virtual ~sc_port_b() {}

--- 98 unchanged lines hidden ---