io_device.hh (5732:1a24f9a28729) | io_device.hh (6227:a17798f2a52c) |
---|---|
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; --- 138 unchanged lines hidden (view full) --- 147 public: 148 DmaPort(DmaDevice *dev, System *s); 149 150 void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event, 151 uint8_t *data, Tick delay); 152 153 bool dmaPending() { return pendingCount > 0; } 154 | 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; --- 138 unchanged lines hidden (view full) --- 147 public: 148 DmaPort(DmaDevice *dev, System *s); 149 150 void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event, 151 uint8_t *data, Tick delay); 152 153 bool dmaPending() { return pendingCount > 0; } 154 |
155 int cacheBlockSize() { return peerBlockSize(); } | 155 unsigned cacheBlockSize() const { return peerBlockSize(); } |
156 unsigned int drain(Event *de); 157}; 158 159/** 160 * This device is the base class which all devices senstive to an address range 161 * inherit from. There are three pure virtual functions which all devices must 162 * implement addressRanges(), read(), and write(). The magic do choose which 163 * mode we are in, etc is handled by the PioPort so the device doesn't have to --- 115 unchanged lines hidden (view full) --- 279 { 280 dmaPort->dmaAction(MemCmd::ReadReq, addr, size, event, data, delay); 281 } 282 283 bool dmaPending() { return dmaPort->dmaPending(); } 284 285 virtual unsigned int drain(Event *de); 286 | 156 unsigned int drain(Event *de); 157}; 158 159/** 160 * This device is the base class which all devices senstive to an address range 161 * inherit from. There are three pure virtual functions which all devices must 162 * implement addressRanges(), read(), and write(). The magic do choose which 163 * mode we are in, etc is handled by the PioPort so the device doesn't have to --- 115 unchanged lines hidden (view full) --- 279 { 280 dmaPort->dmaAction(MemCmd::ReadReq, addr, size, event, data, delay); 281 } 282 283 bool dmaPending() { return dmaPort->dmaPending(); } 284 285 virtual unsigned int drain(Event *de); 286 |
287 int cacheBlockSize() { return dmaPort->cacheBlockSize(); } | 287 unsigned cacheBlockSize() const { return dmaPort->cacheBlockSize(); } |
288 289 virtual Port *getPort(const std::string &if_name, int idx = -1) 290 { 291 if (if_name == "pio") { 292 if (pioPort != NULL) 293 fatal("%s: pio port already connected to %s", 294 name(), pioPort->getPeer()->name()); 295 pioPort = new PioPort(this, sys); --- 16 unchanged lines hidden --- | 288 289 virtual Port *getPort(const std::string &if_name, int idx = -1) 290 { 291 if (if_name == "pio") { 292 if (pioPort != NULL) 293 fatal("%s: pio port already connected to %s", 294 name(), pioPort->getPeer()->name()); 295 pioPort = new PioPort(this, sys); --- 16 unchanged lines hidden --- |