Check.cc (10563:755b18321206) | Check.cc (10566:c99c8d2a7c31) |
---|---|
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 --- 99 unchanged lines hidden (view full) --- 108 Request *req = new Request(m_address.getAddress(), 0, flags, 109 m_tester_ptr->masterId(), curTick(), m_pc.getAddress()); 110 req->setThreadContext(index, 0); 111 112 PacketPtr pkt = new Packet(req, cmd); 113 // despite the oddity of the 0 size (questionable if this should 114 // even be allowed), a prefetch is still a read and as such needs 115 // a place to store the result | 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 --- 99 unchanged lines hidden (view full) --- 108 Request *req = new Request(m_address.getAddress(), 0, flags, 109 m_tester_ptr->masterId(), curTick(), m_pc.getAddress()); 110 req->setThreadContext(index, 0); 111 112 PacketPtr pkt = new Packet(req, cmd); 113 // despite the oddity of the 0 size (questionable if this should 114 // even be allowed), a prefetch is still a read and as such needs 115 // a place to store the result |
116 uint8_t *data = new uint8_t; | 116 uint8_t *data = new uint8_t[1]; |
117 pkt->dataDynamic(data); 118 119 // push the subblock onto the sender state. The sequencer will 120 // update the subblock on the return 121 pkt->senderState = new SenderState(m_address, req->getSize()); 122 123 if (port->sendTimingReq(pkt)) { 124 DPRINTF(RubyTest, "successfully initiated prefetch.\n"); --- 62 unchanged lines hidden (view full) --- 187 // 1 out of 8 chance, issue an atomic rather than a write 188 // if ((random() & 0x7) == 0) { 189 // cmd = MemCmd::SwapReq; 190 // } else { 191 cmd = MemCmd::WriteReq; 192 // } 193 194 PacketPtr pkt = new Packet(req, cmd); | 117 pkt->dataDynamic(data); 118 119 // push the subblock onto the sender state. The sequencer will 120 // update the subblock on the return 121 pkt->senderState = new SenderState(m_address, req->getSize()); 122 123 if (port->sendTimingReq(pkt)) { 124 DPRINTF(RubyTest, "successfully initiated prefetch.\n"); --- 62 unchanged lines hidden (view full) --- 187 // 1 out of 8 chance, issue an atomic rather than a write 188 // if ((random() & 0x7) == 0) { 189 // cmd = MemCmd::SwapReq; 190 // } else { 191 cmd = MemCmd::WriteReq; 192 // } 193 194 PacketPtr pkt = new Packet(req, cmd); |
195 uint8_t *writeData = new uint8_t; | 195 uint8_t *writeData = new uint8_t[1]; |
196 *writeData = m_value + m_store_count; 197 pkt->dataDynamic(writeData); 198 199 DPRINTF(RubyTest, "data 0x%x check 0x%x\n", 200 *(pkt->getConstPtr<uint8_t>()), *writeData); 201 202 // push the subblock onto the sender state. The sequencer will 203 // update the subblock on the return --- 37 unchanged lines hidden (view full) --- 241 242 // Checks are sized depending on the number of bytes written 243 Request *req = new Request(m_address.getAddress(), CHECK_SIZE, flags, 244 m_tester_ptr->masterId(), curTick(), m_pc.getAddress()); 245 246 req->setThreadContext(index, 0); 247 PacketPtr pkt = new Packet(req, MemCmd::ReadReq); 248 uint8_t *dataArray = new uint8_t[CHECK_SIZE]; | 196 *writeData = m_value + m_store_count; 197 pkt->dataDynamic(writeData); 198 199 DPRINTF(RubyTest, "data 0x%x check 0x%x\n", 200 *(pkt->getConstPtr<uint8_t>()), *writeData); 201 202 // push the subblock onto the sender state. The sequencer will 203 // update the subblock on the return --- 37 unchanged lines hidden (view full) --- 241 242 // Checks are sized depending on the number of bytes written 243 Request *req = new Request(m_address.getAddress(), CHECK_SIZE, flags, 244 m_tester_ptr->masterId(), curTick(), m_pc.getAddress()); 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); | 249 pkt->dataDynamic(dataArray); |
250 251 // push the subblock onto the sender state. The sequencer will 252 // update the subblock on the return 253 pkt->senderState = new SenderState(m_address, req->getSize()); 254 255 if (port->sendTimingReq(pkt)) { 256 DPRINTF(RubyTest, "initiating check - successful\n"); 257 DPRINTF(RubyTest, "status before check update: %s\n", --- 126 unchanged lines hidden --- | 250 251 // push the subblock onto the sender state. The sequencer will 252 // update the subblock on the return 253 pkt->senderState = new SenderState(m_address, req->getSize()); 254 255 if (port->sendTimingReq(pkt)) { 256 DPRINTF(RubyTest, "initiating check - successful\n"); 257 DPRINTF(RubyTest, "status before check update: %s\n", --- 126 unchanged lines hidden --- |