SeriesRequestGenerator.cc (12748:ae5ce8e42de7) SeriesRequestGenerator.cc (12749:223c83ed9979)
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

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

55 DPRINTF(DirectedTest, "initiating request\n");
56 assert(m_status == SeriesRequestGeneratorStatus_Thinking);
57
58 MasterPort* port = m_directed_tester->getCpuPort(m_active_node);
59
60 Request::Flags flags;
61
62 // For simplicity, requests are assumed to be 1 byte-sized
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

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

55 DPRINTF(DirectedTest, "initiating request\n");
56 assert(m_status == SeriesRequestGeneratorStatus_Thinking);
57
58 MasterPort* port = m_directed_tester->getCpuPort(m_active_node);
59
60 Request::Flags flags;
61
62 // For simplicity, requests are assumed to be 1 byte-sized
63 RequestPtr req = new Request(m_address, 1, flags, masterId);
63 RequestPtr req = std::make_shared<Request>(m_address, 1, flags, masterId);
64
65 Packet::Command cmd;
66 bool do_write = (random_mt.random(0, 100) < m_percent_writes);
67 if (do_write) {
68 cmd = MemCmd::WriteReq;
69 } else {
70 cmd = MemCmd::ReadReq;
71 }

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

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
83 // will delete it
64
65 Packet::Command cmd;
66 bool do_write = (random_mt.random(0, 100) < m_percent_writes);
67 if (do_write) {
68 cmd = MemCmd::WriteReq;
69 } else {
70 cmd = MemCmd::ReadReq;
71 }

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

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
83 // will delete it
84 delete pkt->req;
85 delete pkt;
86
87 DPRINTF(DirectedTest, "failed to initiate request - sequencer not ready\n");
88 return false;
89 }
90}
91
92void

--- 24 unchanged lines hidden ---
84 delete pkt;
85
86 DPRINTF(DirectedTest, "failed to initiate request - sequencer not ready\n");
87 return false;
88 }
89}
90
91void

--- 24 unchanged lines hidden ---