io_device.hh (3090:3cced9156352) | io_device.hh (3091:dba513d68c16) |
---|---|
1/* 2 * Copyright (c) 2004-2005 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; --- 42 unchanged lines hidden (view full) --- 51 * with which it returns the address ranges it is interested in. 52 */ 53class PioPort : public SimpleTimingPort 54{ 55 protected: 56 /** The device that this port serves. */ 57 PioDevice *device; 58 | 1/* 2 * Copyright (c) 2004-2005 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; --- 42 unchanged lines hidden (view full) --- 51 * with which it returns the address ranges it is interested in. 52 */ 53class PioPort : public SimpleTimingPort 54{ 55 protected: 56 /** The device that this port serves. */ 57 PioDevice *device; 58 |
59 /** The system that device/port are in. This is used to select which mode 60 * we are currently operating in. */ 61 System *sys; 62 63 /** The current status of the peer(bus) that we are connected to. */ 64 Status peerStatus; 65 66 virtual bool recvTiming(Packet *pkt); 67 | |
68 virtual Tick recvAtomic(Packet *pkt); 69 | 59 virtual Tick recvAtomic(Packet *pkt); 60 |
70 virtual void recvFunctional(Packet *pkt) ; 71 72 virtual void recvStatusChange(Status status) 73 { peerStatus = status; } 74 | |
75 virtual void getDeviceAddressRanges(AddrRangeList &resp, 76 AddrRangeList &snoop); 77 78 public: | 61 virtual void getDeviceAddressRanges(AddrRangeList &resp, 62 AddrRangeList &snoop); 63 64 public: |
79 PioPort(PioDevice *dev, System *s, std::string pname = "-pioport"); | |
80 | 65 |
66 PioPort(PioDevice *dev, System *s, std::string pname = "-pioport"); |
|
81}; 82 83 84class DmaPort : public Port 85{ 86 protected: 87 struct DmaReqState : public Packet::SenderState 88 { --- 78 unchanged lines hidden (view full) --- 167 System *sys; 168 169 /** The pioPort that handles the requests for us and provides us requests 170 * that it sees. */ 171 PioPort *pioPort; 172 173 virtual void addressRanges(AddrRangeList &range_list) = 0; 174 | 67}; 68 69 70class DmaPort : public Port 71{ 72 protected: 73 struct DmaReqState : public Packet::SenderState 74 { --- 78 unchanged lines hidden (view full) --- 153 System *sys; 154 155 /** The pioPort that handles the requests for us and provides us requests 156 * that it sees. */ 157 PioPort *pioPort; 158 159 virtual void addressRanges(AddrRangeList &range_list) = 0; 160 |
175 /** As far as the devices are concerned they only accept atomic 176 * transactions which are converted to either a write or a 177 * read. */ 178 Tick recvAtomic(Packet *pkt) 179 { return pkt->isRead() ? this->read(pkt) : this->write(pkt); } 180 | |
181 /** Pure virtual function that the device must implement. Called 182 * when a read command is recieved by the port. 183 * @param pkt Packet describing this request 184 * @return number of ticks it took to complete 185 */ 186 virtual Tick read(Packet *pkt) = 0; 187 188 /** Pure virtual function that the device must implement. Called when a --- 120 unchanged lines hidden --- | 161 /** Pure virtual function that the device must implement. Called 162 * when a read command is recieved by the port. 163 * @param pkt Packet describing this request 164 * @return number of ticks it took to complete 165 */ 166 virtual Tick read(Packet *pkt) = 0; 167 168 /** Pure virtual function that the device must implement. Called when a --- 120 unchanged lines hidden --- |