io_device.cc (10912:b99a6662d7c2) io_device.cc (11193:564e2e7e86f4)
1/*
1/*
2 * Copyright (c) 2012 ARM Limited
2 * Copyright (c) 2012, 2015 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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

49PioPort::PioPort(PioDevice *dev)
50 : SimpleTimingPort(dev->name() + ".pio", dev), device(dev)
51{
52}
53
54Tick
55PioPort::recvAtomic(PacketPtr pkt)
56{
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

49PioPort::PioPort(PioDevice *dev)
50 : SimpleTimingPort(dev->name() + ".pio", dev), device(dev)
51{
52}
53
54Tick
55PioPort::recvAtomic(PacketPtr pkt)
56{
57 // @todo: We need to pay for this and not just zero it out
57 // technically the packet only reaches us after the header delay,
58 // and typically we also need to deserialise any payload
59 Tick receive_delay = pkt->headerDelay + pkt->payloadDelay;
58 pkt->headerDelay = pkt->payloadDelay = 0;
59
60 const Tick delay(pkt->isRead() ? device->read(pkt) : device->write(pkt));
61 assert(pkt->isResponse() || pkt->isError());
60 pkt->headerDelay = pkt->payloadDelay = 0;
61
62 const Tick delay(pkt->isRead() ? device->read(pkt) : device->write(pkt));
63 assert(pkt->isResponse() || pkt->isError());
62 return delay;
64 return delay + receive_delay;
63}
64
65AddrRangeList
66PioPort::getAddrRanges() const
67{
68 return device->getAddrRanges();
69}
70

--- 39 unchanged lines hidden ---
65}
66
67AddrRangeList
68PioPort::getAddrRanges() const
69{
70 return device->getAddrRanges();
71}
72

--- 39 unchanged lines hidden ---