Deleted Added
sdiff udiff text old ( 13819:3c0919b3b601 ) new ( 14189:a363edac6a12 )
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

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

69 void
70 bind(::Port &peer) override
71 {
72 auto *target = dynamic_cast<TargetWrapper *>(&peer);
73 fatal_if(!target, "Attempt to bind TLM initiator socket %s to "
74 "incompatible port %s.", name(), peer.name());
75
76 initiator().bind(target->target());
77 }
78
79 void
80 unbind() override
81 {
82 panic("TLM sockets can't be unbound.");
83 }
84

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

102 Port(_name, _id), _target(t)
103 {}
104
105 void
106 bind(::Port &peer) override
107 {
108 // Ignore attempts to bind a target socket. The initiator will
109 // handle it.
110 }
111
112 void
113 unbind() override
114 {
115 panic("TLM sockets can't be unbound.");
116 }
117
118 private:
119 TargetSocket &_target;
120};
121
122} // namespace sc_gem5
123
124#endif //__SYSTEMC_TLM_PORT_WRAPPER_HH__