Check.cc (8932:1b2c17565ac8) Check.cc (8949:3fa1ee293096)
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

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

103 flags.set(Request::PF_EXCLUSIVE);
104 }
105
106 // Prefetches are assumed to be 0 sized
107 Request *req = new Request(m_address.getAddress(), 0, flags,
108 m_tester_ptr->masterId(), curTick(), m_pc.getAddress());
109 req->setThreadContext(index, 0);
110
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

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

103 flags.set(Request::PF_EXCLUSIVE);
104 }
105
106 // Prefetches are assumed to be 0 sized
107 Request *req = new Request(m_address.getAddress(), 0, flags,
108 m_tester_ptr->masterId(), curTick(), m_pc.getAddress());
109 req->setThreadContext(index, 0);
110
111 PacketPtr pkt = new Packet(req, cmd, port->idx);
111 PacketPtr pkt = new Packet(req, cmd);
112
113 // push the subblock onto the sender state. The sequencer will
114 // update the subblock on the return
115 pkt->senderState =
116 new SenderState(m_address, req->getSize(), pkt->senderState);
117
118 if (port->sendTiming(pkt)) {
119 DPRINTF(RubyTest, "successfully initiated prefetch.\n");

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

144
145 Request *req = new Request(m_address.getAddress(), CHECK_SIZE, flags,
146 m_tester_ptr->masterId(), curTick(), m_pc.getAddress());
147
148 Packet::Command cmd;
149
150 cmd = MemCmd::FlushReq;
151
112
113 // push the subblock onto the sender state. The sequencer will
114 // update the subblock on the return
115 pkt->senderState =
116 new SenderState(m_address, req->getSize(), pkt->senderState);
117
118 if (port->sendTiming(pkt)) {
119 DPRINTF(RubyTest, "successfully initiated prefetch.\n");

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

144
145 Request *req = new Request(m_address.getAddress(), CHECK_SIZE, flags,
146 m_tester_ptr->masterId(), curTick(), m_pc.getAddress());
147
148 Packet::Command cmd;
149
150 cmd = MemCmd::FlushReq;
151
152 PacketPtr pkt = new Packet(req, cmd, port->idx);
152 PacketPtr pkt = new Packet(req, cmd);
153
154 // push the subblock onto the sender state. The sequencer will
155 // update the subblock on the return
156 pkt->senderState =
157 new SenderState(m_address, req->getSize(), pkt->senderState);
158
159 if (port->sendTiming(pkt)) {
160 DPRINTF(RubyTest, "initiating Flush - successful\n");

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

186
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
153
154 // push the subblock onto the sender state. The sequencer will
155 // update the subblock on the return
156 pkt->senderState =
157 new SenderState(m_address, req->getSize(), pkt->senderState);
158
159 if (port->sendTiming(pkt)) {
160 DPRINTF(RubyTest, "initiating Flush - successful\n");

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

186
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, port->idx);
194 PacketPtr pkt = new Packet(req, cmd);
195 uint8_t* writeData = new uint8_t;
196 *writeData = m_value + m_store_count;
197 pkt->dataDynamic(writeData);
198
199 DPRINTF(RubyTest, "data 0x%x check 0x%x\n",
200 *(pkt->getPtr<uint8_t>()), *writeData);
201
202 // push the subblock onto the sender state. The sequencer will

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

243 flags.set(Request::INST_FETCH);
244 }
245
246 // Checks are sized depending on the number of bytes written
247 Request *req = new Request(m_address.getAddress(), CHECK_SIZE, flags,
248 m_tester_ptr->masterId(), curTick(), m_pc.getAddress());
249
250 req->setThreadContext(index, 0);
195 uint8_t* writeData = new uint8_t;
196 *writeData = m_value + m_store_count;
197 pkt->dataDynamic(writeData);
198
199 DPRINTF(RubyTest, "data 0x%x check 0x%x\n",
200 *(pkt->getPtr<uint8_t>()), *writeData);
201
202 // push the subblock onto the sender state. The sequencer will

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

243 flags.set(Request::INST_FETCH);
244 }
245
246 // Checks are sized depending on the number of bytes written
247 Request *req = new Request(m_address.getAddress(), CHECK_SIZE, flags,
248 m_tester_ptr->masterId(), curTick(), m_pc.getAddress());
249
250 req->setThreadContext(index, 0);
251 PacketPtr pkt = new Packet(req, MemCmd::ReadReq, port->idx);
251 PacketPtr pkt = new Packet(req, MemCmd::ReadReq);
252 uint8_t* dataArray = new uint8_t[CHECK_SIZE];
253 pkt->dataDynamicArray(dataArray);
254
255 // push the subblock onto the sender state. The sequencer will
256 // update the subblock on the return
257 pkt->senderState =
258 new SenderState(m_address, req->getSize(), pkt->senderState);
259

--- 133 unchanged lines hidden ---
252 uint8_t* dataArray = new uint8_t[CHECK_SIZE];
253 pkt->dataDynamicArray(dataArray);
254
255 // push the subblock onto the sender state. The sequencer will
256 // update the subblock on the return
257 pkt->senderState =
258 new SenderState(m_address, req->getSize(), pkt->senderState);
259

--- 133 unchanged lines hidden ---