SeriesRequestGenerator.cc (10348:c91b23c72d5e) SeriesRequestGenerator.cc (10566:c99c8d2a7c31)
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * Copyright (c) 2009-2010 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

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

64 bool do_write = (random_mt.random(0, 100) < m_percent_writes);
65 if (do_write) {
66 cmd = MemCmd::WriteReq;
67 } else {
68 cmd = MemCmd::ReadReq;
69 }
70
71 PacketPtr pkt = new Packet(req, cmd);
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * Copyright (c) 2009-2010 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

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

64 bool do_write = (random_mt.random(0, 100) < m_percent_writes);
65 if (do_write) {
66 cmd = MemCmd::WriteReq;
67 } else {
68 cmd = MemCmd::ReadReq;
69 }
70
71 PacketPtr pkt = new Packet(req, cmd);
72 uint8_t* dummyData = new uint8_t;
73 *dummyData = 0;
74 pkt->dataDynamic(dummyData);
72 pkt->allocate();
75
76 if (port->sendTimingReq(pkt)) {
77 DPRINTF(DirectedTest, "initiating request - successful\n");
78 m_status = SeriesRequestGeneratorStatus_Request_Pending;
79 return true;
80 } else {
81 // If the packet did not issue, must delete
82 // Note: No need to delete the data, the packet destructor

--- 34 unchanged lines hidden ---
73
74 if (port->sendTimingReq(pkt)) {
75 DPRINTF(DirectedTest, "initiating request - successful\n");
76 m_status = SeriesRequestGeneratorStatus_Request_Pending;
77 return true;
78 } else {
79 // If the packet did not issue, must delete
80 // Note: No need to delete the data, the packet destructor

--- 34 unchanged lines hidden ---