io_device.cc (13892:0182a0601f66) io_device.cc (14218:c83b2bdfc7ee)
1/*
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

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

42 */
43
44#include "dev/io_device.hh"
45
46#include "base/trace.hh"
47#include "debug/AddrRanges.hh"
48#include "sim/system.hh"
49
1/*
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

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

42 */
43
44#include "dev/io_device.hh"
45
46#include "base/trace.hh"
47#include "debug/AddrRanges.hh"
48#include "sim/system.hh"
49
50PioPort::PioPort(PioDevice *dev)
51 : SimpleTimingPort(dev->name() + ".pio", dev), device(dev)
52{
53}
54
55Tick
56PioPort::recvAtomic(PacketPtr pkt)
57{
58 // technically the packet only reaches us after the header delay,
59 // and typically we also need to deserialise any payload
60 Tick receive_delay = pkt->headerDelay + pkt->payloadDelay;
61 pkt->headerDelay = pkt->payloadDelay = 0;
62
63 const Tick delay(pkt->isRead() ? device->read(pkt) : device->write(pkt));
64 assert(pkt->isResponse() || pkt->isError());
65 return delay + receive_delay;
66}
67
68AddrRangeList
69PioPort::getAddrRanges() const
70{
71 return device->getAddrRanges();
72}
73
74PioDevice::PioDevice(const Params *p)
75 : ClockedObject(p), sys(p->system), pioPort(this)
76{}
77
78PioDevice::~PioDevice()
79{
80}
81

--- 31 unchanged lines hidden ---
50PioDevice::PioDevice(const Params *p)
51 : ClockedObject(p), sys(p->system), pioPort(this)
52{}
53
54PioDevice::~PioDevice()
55{
56}
57

--- 31 unchanged lines hidden ---