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 --- 38 unchanged lines hidden (view full) --- 47 48InvalidateGenerator::~InvalidateGenerator() 49{ 50} 51 52bool 53InvalidateGenerator::initiate() 54{ |
55 MasterPort* port; |
56 Request::Flags flags; 57 PacketPtr pkt; 58 Packet::Command cmd; 59 60 // For simplicity, requests are assumed to be 1 byte-sized 61 Request *req = new Request(m_address, 1, flags, masterId); 62 63 // 64 // Based on the current state, issue a load or a store 65 // 66 if (m_status == InvalidateGeneratorStatus_Load_Waiting) { 67 DPRINTF(DirectedTest, "initiating read\n"); 68 cmd = MemCmd::ReadReq; |
69 port = m_directed_tester->getCpuPort(m_active_read_node); |
70 pkt = new Packet(req, cmd); 71 } else if (m_status == InvalidateGeneratorStatus_Inv_Waiting) { 72 DPRINTF(DirectedTest, "initiating invalidating write\n"); 73 cmd = MemCmd::WriteReq; |
74 port = m_directed_tester->getCpuPort(m_active_inv_node); |
75 pkt = new Packet(req, cmd); 76 } else { 77 panic("initiate was unexpectedly called\n"); 78 } 79 uint8_t* dummyData = new uint8_t; 80 *dummyData = 0; 81 pkt->dataDynamic(dummyData); 82 --- 59 unchanged lines hidden --- |