RubyPort.hh (6893:9cdf9b65d946) RubyPort.hh (6899:f8057af86bf7)
1
2/*
3 * Copyright (c) 2009 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

147 return id;
148 }
149
150 int m_version;
151 AbstractController* m_controller;
152 MessageBuffer* m_mandatory_q_ptr;
153 PioPort* pio_port;
154
1
2/*
3 * Copyright (c) 2009 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

147 return id;
148 }
149
150 int m_version;
151 AbstractController* m_controller;
152 MessageBuffer* m_mandatory_q_ptr;
153 PioPort* pio_port;
154
155private:
156 static uint16_t m_num_ports;
157 uint16_t m_port_id;
158 uint64_t m_request_cnt;
159
155 //
156 // The pending request map is protected so that the Sequencer can access it.
157 // This is a temporary fix until the libruby inteface is cleaned
158 //
160 struct RequestCookie {
161 Packet *pkt;
162 M5Port *m5Port;
163 RequestCookie(Packet *p, M5Port *m5p)
164 : pkt(p), m5Port(m5p)
165 {}
166 };
167
168 typedef std::map<int64_t, RequestCookie*> RequestMap;
169 static RequestMap pending_cpu_requests;
159 struct RequestCookie {
160 Packet *pkt;
161 M5Port *m5Port;
162 RequestCookie(Packet *p, M5Port *m5p)
163 : pkt(p), m5Port(m5p)
164 {}
165 };
166
167 typedef std::map<int64_t, RequestCookie*> RequestMap;
168 static RequestMap pending_cpu_requests;
169
170private:
171 static uint16_t m_num_ports;
172 uint16_t m_port_id;
173 uint64_t m_request_cnt;
174
170 static void ruby_hit_callback(int64_t req_id);
171
172 M5Port* physMemPort;
173
174 PhysicalMemory* physmem;
175};
176
177#endif
175 static void ruby_hit_callback(int64_t req_id);
176
177 M5Port* physMemPort;
178
179 PhysicalMemory* physmem;
180};
181
182#endif