Check.cc (9171:ae88ecf37145) | Check.cc (9208:2451e60d4555) |
---|---|
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 --- 175 unchanged lines hidden (view full) --- 184 // 1 out of 8 chance, issue an atomic rather than a write 185 // if ((random() & 0x7) == 0) { 186 // cmd = MemCmd::SwapReq; 187 // } else { 188 cmd = MemCmd::WriteReq; 189 // } 190 191 PacketPtr pkt = new Packet(req, cmd); | 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 --- 175 unchanged lines hidden (view full) --- 184 // 1 out of 8 chance, issue an atomic rather than a write 185 // if ((random() & 0x7) == 0) { 186 // cmd = MemCmd::SwapReq; 187 // } else { 188 cmd = MemCmd::WriteReq; 189 // } 190 191 PacketPtr pkt = new Packet(req, cmd); |
192 uint8_t* writeData = new uint8_t; | 192 uint8_t *writeData = new uint8_t; |
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 --- 39 unchanged lines hidden (view full) --- 240 } 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); | 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 --- 39 unchanged lines hidden (view full) --- 240 } 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]; | 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)) { --- 44 unchanged lines hidden (view full) --- 301 m_status = TesterStatus_Idle; 302 } 303 DPRINTF(RubyTest, "Action callback return data now %d\n", 304 data->getByte(0)); 305 } else if (m_status == TesterStatus_Check_Pending) { 306 DPRINTF(RubyTest, "Check callback\n"); 307 // Perform load/check 308 for (int byte_number=0; byte_number<CHECK_SIZE; byte_number++) { | 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)) { --- 44 unchanged lines hidden (view full) --- 301 m_status = TesterStatus_Idle; 302 } 303 DPRINTF(RubyTest, "Action callback return data now %d\n", 304 data->getByte(0)); 305 } else if (m_status == TesterStatus_Check_Pending) { 306 DPRINTF(RubyTest, "Check callback\n"); 307 // Perform load/check 308 for (int byte_number=0; byte_number<CHECK_SIZE; byte_number++) { |
309 if (uint8(m_value + byte_number) != data->getByte(byte_number)) { | 309 if (uint8_t(m_value + byte_number) != data->getByte(byte_number)) { |
310 panic("Action/check failure: proc: %d address: %s data: %s " 311 "byte_number: %d m_value+byte_number: %d byte: %d %s" 312 "Time: %d\n", 313 proc, address, data, byte_number, 314 (int)m_value + byte_number, 315 (int)data->getByte(byte_number), *this, 316 g_system_ptr->getTime()); 317 } --- 71 unchanged lines hidden --- | 310 panic("Action/check failure: proc: %d address: %s data: %s " 311 "byte_number: %d m_value+byte_number: %d byte: %d %s" 312 "Time: %d\n", 313 proc, address, data, byte_number, 314 (int)m_value + byte_number, 315 (int)data->getByte(byte_number), *this, 316 g_system_ptr->getTime()); 317 } --- 71 unchanged lines hidden --- |