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 Port::bind(peer);
78 }
79
80 void
81 unbind() override
82 {
83 panic("TLM sockets can't be unbound.");
84 }
85

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

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