tport.hh (5606:6da7a58b0bc8) tport.hh (5740:983b71bfc1bd)
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

80 void processSendEvent();
81
82 /**
83 * This class is used to implemented sendTiming() with a delay. When
84 * a delay is requested a the event is scheduled if it isn't already.
85 * When the event time expires it attempts to send the packet.
86 * If it cannot, the packet sent when recvRetry() is called.
87 **/
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

80 void processSendEvent();
81
82 /**
83 * This class is used to implemented sendTiming() with a delay. When
84 * a delay is requested a the event is scheduled if it isn't already.
85 * When the event time expires it attempts to send the packet.
86 * If it cannot, the packet sent when recvRetry() is called.
87 **/
88 typedef EventWrapper<SimpleTimingPort, &SimpleTimingPort::processSendEvent>
89 SendEvent;
90
91 Event *sendEvent;
92
93 /** If we need to drain, keep the drain event around until we're done
94 * here.*/
95 Event *drainEvent;
96
97 /** Remember whether we're awaiting a retry from the bus. */
98 bool waitingOnRetry;

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

150 /**
151 * Simple ports generally don't care about any status
152 * changes... can always override this in cases where that's not
153 * true. */
154 virtual void recvStatusChange(Status status) { }
155
156
157 public:
88 Event *sendEvent;
89
90 /** If we need to drain, keep the drain event around until we're done
91 * here.*/
92 Event *drainEvent;
93
94 /** Remember whether we're awaiting a retry from the bus. */
95 bool waitingOnRetry;

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

147 /**
148 * Simple ports generally don't care about any status
149 * changes... can always override this in cases where that's not
150 * true. */
151 virtual void recvStatusChange(Status status) { }
152
153
154 public:
155 SimpleTimingPort(std::string pname, MemObject *_owner);
156 ~SimpleTimingPort();
158
157
159 SimpleTimingPort(std::string pname, MemObject *_owner)
160 : Port(pname, _owner),
161 sendEvent(new SendEvent(this)),
162 drainEvent(NULL),
163 waitingOnRetry(false)
164 {}
165
166 ~SimpleTimingPort() { delete sendEvent; }
167
168 /** Hook for draining timing accesses from the system. The
169 * associated SimObject's drain() functions should be implemented
170 * something like this when this class is used:
171 \code
172 PioDevice::drain(Event *de)
173 {
174 unsigned int count;
175 count = SimpleTimingPort->drain(de);

--- 12 unchanged lines hidden ---
158 /** Hook for draining timing accesses from the system. The
159 * associated SimObject's drain() functions should be implemented
160 * something like this when this class is used:
161 \code
162 PioDevice::drain(Event *de)
163 {
164 unsigned int count;
165 count = SimpleTimingPort->drain(de);

--- 12 unchanged lines hidden ---