Check.cc (9475:736909f5c13b) | Check.cc (9542:683991c46ac8) |
---|---|
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 | 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); | 114 pkt->senderState = new SenderState(m_address, req->getSize()); |
116 117 if (port->sendTimingReq(pkt)) { 118 DPRINTF(RubyTest, "successfully initiated prefetch.\n"); 119 } else { 120 // If the packet did not issue, must delete | 115 116 if (port->sendTimingReq(pkt)) { 117 DPRINTF(RubyTest, "successfully initiated prefetch.\n"); 118 } else { 119 // If the packet did not issue, must delete |
121 SenderState* senderState = safe_cast<SenderState*>(pkt->senderState); 122 pkt->senderState = senderState->saved; 123 delete senderState; | 120 delete pkt->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 | 121 delete pkt->req; 122 delete pkt; 123 124 DPRINTF(RubyTest, 125 "prefetch initiation failed because Port was busy.\n"); 126 } 127} 128 --- 14 unchanged lines hidden (view full) --- 143 Packet::Command cmd; 144 145 cmd = MemCmd::FlushReq; 146 147 PacketPtr pkt = new Packet(req, cmd); 148 149 // push the subblock onto the sender state. The sequencer will 150 // update the subblock on the return |
154 pkt->senderState = 155 new SenderState(m_address, req->getSize(), pkt->senderState); | 151 pkt->senderState = new SenderState(m_address, req->getSize()); |
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 | 152 153 if (port->sendTimingReq(pkt)) { 154 DPRINTF(RubyTest, "initiating Flush - successful\n"); 155 } 156} 157 158void 159Check::initiateAction() --- 29 unchanged lines hidden (view full) --- 189 *writeData = m_value + m_store_count; 190 pkt->dataDynamic(writeData); 191 192 DPRINTF(RubyTest, "data 0x%x check 0x%x\n", 193 *(pkt->getPtr<uint8_t>()), *writeData); 194 195 // push the subblock onto the sender state. The sequencer will 196 // update the subblock on the return |
201 pkt->senderState = 202 new SenderState(writeAddr, req->getSize(), pkt->senderState); | 197 pkt->senderState = new SenderState(writeAddr, req->getSize()); |
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 | 198 199 if (port->sendTimingReq(pkt)) { 200 DPRINTF(RubyTest, "initiating action - successful\n"); 201 DPRINTF(RubyTest, "status before action update: %s\n", 202 (TesterStatus_to_string(m_status)).c_str()); 203 m_status = TesterStatus_Action_Pending; 204 } else { 205 // If the packet did not issue, must delete 206 // Note: No need to delete the data, the packet destructor 207 // will delete it |
213 SenderState* senderState = safe_cast<SenderState*>(pkt->senderState); 214 pkt->senderState = senderState->saved; 215 delete senderState; | 208 delete pkt->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 | 209 delete pkt->req; 210 delete pkt; 211 212 DPRINTF(RubyTest, "failed to initiate action - sequencer not ready\n"); 213 } 214 215 DPRINTF(RubyTest, "status after action update: %s\n", 216 (TesterStatus_to_string(m_status)).c_str()); --- 21 unchanged lines hidden (view full) --- 238 239 req->setThreadContext(index, 0); 240 PacketPtr pkt = new Packet(req, MemCmd::ReadReq); 241 uint8_t *dataArray = new uint8_t[CHECK_SIZE]; 242 pkt->dataDynamicArray(dataArray); 243 244 // push the subblock onto the sender state. The sequencer will 245 // update the subblock on the return |
253 pkt->senderState = 254 new SenderState(m_address, req->getSize(), pkt->senderState); | 246 pkt->senderState = new SenderState(m_address, req->getSize()); |
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 | 247 248 if (port->sendTimingReq(pkt)) { 249 DPRINTF(RubyTest, "initiating check - successful\n"); 250 DPRINTF(RubyTest, "status before check update: %s\n", 251 TesterStatus_to_string(m_status).c_str()); 252 m_status = TesterStatus_Check_Pending; 253 } else { 254 // If the packet did not issue, must delete 255 // Note: No need to delete the data, the packet destructor 256 // will delete it |
265 SenderState* senderState = safe_cast<SenderState*>(pkt->senderState); 266 pkt->senderState = senderState->saved; 267 delete senderState; | 257 delete pkt->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 --- | 258 delete pkt->req; 259 delete pkt; 260 261 DPRINTF(RubyTest, "failed to initiate check - cpu port not ready\n"); 262 } 263 264 DPRINTF(RubyTest, "status after check update: %s\n", 265 TesterStatus_to_string(m_status).c_str()); --- 111 unchanged lines hidden --- |