1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 43 unchanged lines hidden (view full) --- 52} 53 54Tick 55AmbaFake::read(PacketPtr pkt) 56{ 57 assert(pkt->getAddr() >= pioAddr && pkt->getAddr() < pioAddr + pioSize); 58 59 Addr daddr = pkt->getAddr() - pioAddr; |
60 61 DPRINTF(AMBA, " read register %#x\n", daddr); 62 63 pkt->set<uint32_t>(0); 64 if (!readId(pkt, ambaId, pioAddr) && !params()->ignore_access) 65 panic("Tried to read AmbaFake at offset %#x that doesn't exist\n", daddr); 66 67 pkt->makeAtomicResponse(); 68 return pioDelay; 69} 70 71Tick 72AmbaFake::write(PacketPtr pkt) 73{ 74 75 Addr daddr = pkt->getAddr() - pioAddr; |
76 77 if (!params()->ignore_access) 78 panic("Tried to write AmbaFake at offset %#x that doesn't exist\n", daddr); 79 80 pkt->makeAtomicResponse(); 81 return pioDelay; 82} 83 84 85AmbaFake * 86AmbaFakeParams::create() 87{ 88 return new AmbaFake(this); 89} |