Deleted Added
sdiff udiff text old ( 5314:e902f12a3af1 ) new ( 5476:758c2413765a )
full compact
1/*
2 * Copyright (c) 2002-2005 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;

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

68 * have to be created.
69 *
70 * Recv accesor functions are being called from the peer interface.
71 * Send accessor functions are being called from the device the port is
72 * associated with, and it will call the peer recv. accessor function.
73 */
74class Port
75{
76 private:
77
78 /** Descriptive name (for DPRINTF output) */
79 mutable std::string portName;
80
81 /** A pointer to the peer port. Ports always come in pairs, that way they
82 can use a standardized interface to communicate between different
83 memory objects. */
84 Port *peer;
85

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

98 * @param _owner Pointer to the MemObject that owns this port.
99 * Will not necessarily be set.
100 */
101 Port(const std::string &_name, MemObject *_owner = NULL);
102
103 /** Return port name (for DPRINTF). */
104 const std::string &name() const { return portName; }
105
106 virtual ~Port() {};
107
108 // mey be better to use subclasses & RTTI?
109 /** Holds the ports status. Currently just that a range recomputation needs
110 * to be done. */
111 enum Status {
112 RangeChange
113 };
114

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

126
127 /** Function to return the owner of this port. */
128 MemObject *getOwner() { return owner; }
129
130 /** Inform the peer port to delete itself and notify it's owner about it's
131 * demise. */
132 void removeConn();
133
134 virtual bool isDefaultPort() { return false; }
135
136 protected:
137
138 /** These functions are protected because they should only be
139 * called by a peer port, never directly by any outside object. */
140
141 /** Called to recive a timing call from the peer port. */
142 virtual bool recvTiming(PacketPtr pkt) = 0;
143

--- 159 unchanged lines hidden ---