amba_fake.cc (9808:13ffc0066b76) | amba_fake.cc (10565:23593fdaadcd) |
---|---|
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; | 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 pkt->allocate(); | |
61 62 DPRINTF(AMBA, " read register %#x\n", daddr); 63 64 pkt->set<uint32_t>(0); 65 if (!readId(pkt, ambaId, pioAddr) && !params()->ignore_access) 66 panic("Tried to read AmbaFake at offset %#x that doesn't exist\n", daddr); 67 68 pkt->makeAtomicResponse(); 69 return pioDelay; 70} 71 72Tick 73AmbaFake::write(PacketPtr pkt) 74{ 75 76 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; |
77 pkt->allocate(); | |
78 79 if (!params()->ignore_access) 80 panic("Tried to write AmbaFake at offset %#x that doesn't exist\n", daddr); 81 82 pkt->makeAtomicResponse(); 83 return pioDelay; 84} 85 86 87AmbaFake * 88AmbaFakeParams::create() 89{ 90 return new AmbaFake(this); 91} | 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} |