port.hh (2657:b119b774656b) port.hh (2661:2fe54b1abfa7)
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;

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

69 */
70class Port
71{
72 private:
73
74 /** Descriptive name (for DPRINTF output) */
75 const std::string portName;
76
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;

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

69 */
70class Port
71{
72 private:
73
74 /** Descriptive name (for DPRINTF output) */
75 const std::string portName;
76
77 /** A pointer to the peer port. Ports always come in pairs, that way they
78 can use a standardized interface to communicate between different
79 memory objects. */
80 Port *peer;
81
77 public:
78
79 /**
80 * Constructor.
81 *
82 * @param _name Port name for DPRINTF output. Should include name
83 * of memory system object to which the port belongs.
84 */
85 Port(const std::string &_name)
82 public:
83
84 /**
85 * Constructor.
86 *
87 * @param _name Port name for DPRINTF output. Should include name
88 * of memory system object to which the port belongs.
89 */
90 Port(const std::string &_name)
86 : portName(_name)
91 : portName(_name), peer(NULL)
87 { }
88
89 /** Return port name (for DPRINTF). */
90 const std::string &name() const { return portName; }
91
92 virtual ~Port() {};
93
94 // mey be better to use subclasses & RTTI?
95 /** Holds the ports status. Currently just that a range recomputation needs
96 * to be done. */
97 enum Status {
98 RangeChange
99 };
100
92 { }
93
94 /** Return port name (for DPRINTF). */
95 const std::string &name() const { return portName; }
96
97 virtual ~Port() {};
98
99 // mey be better to use subclasses & RTTI?
100 /** Holds the ports status. Currently just that a range recomputation needs
101 * to be done. */
102 enum Status {
103 RangeChange
104 };
105
101 private:
102
103 /** A pointer to the peer port. Ports always come in pairs, that way they
104 can use a standardized interface to communicate between different
105 memory objects. */
106 Port *peer;
107
108 public:
109
110 /** Function to set the pointer for the peer port.
111 @todo should be called by the configuration stuff (python).
112 */
113 void setPeer(Port *port);
114
115 /** Function to set the pointer for the peer port.
116 @todo should be called by the configuration stuff (python).
117 */

--- 151 unchanged lines hidden ---
106 /** Function to set the pointer for the peer port.
107 @todo should be called by the configuration stuff (python).
108 */
109 void setPeer(Port *port);
110
111 /** Function to set the pointer for the peer port.
112 @todo should be called by the configuration stuff (python).
113 */

--- 151 unchanged lines hidden ---