Deleted Added
sdiff udiff text old ( 9475:736909f5c13b ) new ( 9542:683991c46ac8 )
full compact
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
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

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

106 Request *req = new Request(m_address.getAddress(), 0, flags,
107 m_tester_ptr->masterId(), curTick(), m_pc.getAddress());
108 req->setThreadContext(index, 0);
109
110 PacketPtr pkt = new Packet(req, cmd);
111
112 // push the subblock onto the sender state. The sequencer will
113 // update the subblock on the return
114 pkt->senderState =
115 new SenderState(m_address, req->getSize(), pkt->senderState);
116
117 if (port->sendTimingReq(pkt)) {
118 DPRINTF(RubyTest, "successfully initiated prefetch.\n");
119 } else {
120 // If the packet did not issue, must delete
121 SenderState* senderState = safe_cast<SenderState*>(pkt->senderState);
122 pkt->senderState = senderState->saved;
123 delete senderState;
124 delete pkt->req;
125 delete pkt;
126
127 DPRINTF(RubyTest,
128 "prefetch initiation failed because Port was busy.\n");
129 }
130}
131

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

146 Packet::Command cmd;
147
148 cmd = MemCmd::FlushReq;
149
150 PacketPtr pkt = new Packet(req, cmd);
151
152 // push the subblock onto the sender state. The sequencer will
153 // update the subblock on the return
154 pkt->senderState =
155 new SenderState(m_address, req->getSize(), pkt->senderState);
156
157 if (port->sendTimingReq(pkt)) {
158 DPRINTF(RubyTest, "initiating Flush - successful\n");
159 }
160}
161
162void
163Check::initiateAction()

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

193 *writeData = m_value + m_store_count;
194 pkt->dataDynamic(writeData);
195
196 DPRINTF(RubyTest, "data 0x%x check 0x%x\n",
197 *(pkt->getPtr<uint8_t>()), *writeData);
198
199 // push the subblock onto the sender state. The sequencer will
200 // update the subblock on the return
201 pkt->senderState =
202 new SenderState(writeAddr, req->getSize(), pkt->senderState);
203
204 if (port->sendTimingReq(pkt)) {
205 DPRINTF(RubyTest, "initiating action - successful\n");
206 DPRINTF(RubyTest, "status before action update: %s\n",
207 (TesterStatus_to_string(m_status)).c_str());
208 m_status = TesterStatus_Action_Pending;
209 } else {
210 // If the packet did not issue, must delete
211 // Note: No need to delete the data, the packet destructor
212 // will delete it
213 SenderState* senderState = safe_cast<SenderState*>(pkt->senderState);
214 pkt->senderState = senderState->saved;
215 delete senderState;
216 delete pkt->req;
217 delete pkt;
218
219 DPRINTF(RubyTest, "failed to initiate action - sequencer not ready\n");
220 }
221
222 DPRINTF(RubyTest, "status after action update: %s\n",
223 (TesterStatus_to_string(m_status)).c_str());

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

245
246 req->setThreadContext(index, 0);
247 PacketPtr pkt = new Packet(req, MemCmd::ReadReq);
248 uint8_t *dataArray = new uint8_t[CHECK_SIZE];
249 pkt->dataDynamicArray(dataArray);
250
251 // push the subblock onto the sender state. The sequencer will
252 // update the subblock on the return
253 pkt->senderState =
254 new SenderState(m_address, req->getSize(), pkt->senderState);
255
256 if (port->sendTimingReq(pkt)) {
257 DPRINTF(RubyTest, "initiating check - successful\n");
258 DPRINTF(RubyTest, "status before check update: %s\n",
259 TesterStatus_to_string(m_status).c_str());
260 m_status = TesterStatus_Check_Pending;
261 } else {
262 // If the packet did not issue, must delete
263 // Note: No need to delete the data, the packet destructor
264 // will delete it
265 SenderState* senderState = safe_cast<SenderState*>(pkt->senderState);
266 pkt->senderState = senderState->saved;
267 delete senderState;
268 delete pkt->req;
269 delete pkt;
270
271 DPRINTF(RubyTest, "failed to initiate check - cpu port not ready\n");
272 }
273
274 DPRINTF(RubyTest, "status after check update: %s\n",
275 TesterStatus_to_string(m_status).c_str());

--- 111 unchanged lines hidden ---