Deleted Added
sdiff udiff text old ( 2902:695d4683916e ) new ( 2914:2c524dc023d2 )
full compact
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

31
32#include "base/trace.hh"
33#include "dev/io_device.hh"
34#include "sim/builder.hh"
35#include "sim/system.hh"
36
37
38PioPort::PioPort(PioDevice *dev, System *s, std::string pname)
39 : SimpleTimingPort(dev->name() + pname), device(dev), sys(s)
40{ }
41
42
43Tick
44PioPort::recvAtomic(Packet *pkt)
45{
46 return device->recvAtomic(pkt);
47}

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

55void
56PioPort::getDeviceAddressRanges(AddrRangeList &resp, AddrRangeList &snoop)
57{
58 snoop.clear();
59 device->addressRanges(resp);
60}
61
62
63bool
64PioPort::recvTiming(Packet *pkt)
65{
66 if (pkt->result == Packet::Nacked) {
67 resendNacked(pkt);
68 } else {
69 Tick latency = device->recvAtomic(pkt);
70 // turn packet around to go back to requester
71 pkt->makeTimingResponse();
72 sendTiming(pkt, latency);
73 }
74 return true;
75}
76
77PioDevice::~PioDevice()
78{
79 if (pioPort)
80 delete pioPort;
81}
82
83void
84PioDevice::init()

--- 200 unchanged lines hidden ---