summaryrefslogtreecommitdiff
path: root/dev/tsunami_pchip.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-04-10 14:14:06 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-04-10 14:14:06 -0400
commite8b6eb49bcaa768c40c10e354bb66cae0a65a2a1 (patch)
treebaca46eb4f45784aa40cf0e9aa722dfa7e474308 /dev/tsunami_pchip.hh
parent2609ed2a7cf736834cafcf0b07465c45dfb567e3 (diff)
downloadgem5-e8b6eb49bcaa768c40c10e354bb66cae0a65a2a1.tar.xz
updates for newmem
SConscript: compile some more devices --HG-- extra : convert_revision : 82a8164ab38814a56a0c143658bc06338cf6b8f5
Diffstat (limited to 'dev/tsunami_pchip.hh')
-rw-r--r--dev/tsunami_pchip.hh61
1 files changed, 13 insertions, 48 deletions
diff --git a/dev/tsunami_pchip.hh b/dev/tsunami_pchip.hh
index c1d95431b..796d38503 100644
--- a/dev/tsunami_pchip.hh
+++ b/dev/tsunami_pchip.hh
@@ -37,28 +37,12 @@
#include "base/range.hh"
#include "dev/io_device.hh"
-class MemoryController;
-
/**
* A very simple implementation of the Tsunami PCI interface chips.
*/
-class TsunamiPChip : public PioDevice
+class TsunamiPChip : public BasicPioDevice
{
- private:
- /** The base address of this device */
- Addr addr;
-
- /** The size of mappad from the above address */
- static const Addr size = 0xfff;
-
protected:
- /**
- * pointer to the tsunami object.
- * This is our access to all the other tsunami
- * devices.
- */
- Tsunami *tsunami;
-
/** Pchip control register */
uint64_t pctl;
@@ -72,18 +56,19 @@ class TsunamiPChip : public PioDevice
uint64_t tba[4];
public:
+ struct Params : public BasicPioDevice::Params
+ {
+ Tsunami *tsunami;
+ };
+ protected:
+ const Params *params() const { return (const Params*)_params; }
+
+ public:
/**
* Register the PChip with the mmu and init all wsba, wsm, and tba to 0
- * @param name the name of thes device
- * @param t a pointer to the tsunami device
- * @param a the address which we respond to
- * @param mmu the mmu we are to register with
- * @param hier object to store parameters universal the device hierarchy
- * @param bus The bus that this device is attached to
+ * @param p pointer to the parameters struct
*/
- TsunamiPChip(const std::string &name, Tsunami *t, Addr a,
- MemoryController *mmu, HierParams *hier, Bus *pio_bus,
- Tick pio_latency);
+ TsunamiPChip(Params *p);
/**
* Translate a PCI bus address to a memory address for DMA.
@@ -93,21 +78,8 @@ class TsunamiPChip : public PioDevice
*/
Addr translatePciToDma(Addr busAddr);
- /**
- * Process a read to the PChip.
- * @param req Contains the address to read from.
- * @param data A pointer to write the read data to.
- * @return The fault condition of the access.
- */
- virtual Fault read(MemReqPtr &req, uint8_t *data);
-
- /**
- * Process a write to the PChip.
- * @param req Contains the address to write to.
- * @param data The data to write.
- * @return The fault condition of the access.
- */
- virtual Fault write(MemReqPtr &req, const uint8_t *data);
+ virtual Fault read(Packet &pkt);
+ virtual Fault write(Packet &pkt);
/**
* Serialize this object to the given output stream.
@@ -121,13 +93,6 @@ class TsunamiPChip : public PioDevice
* @param section The section name of this object
*/
virtual void unserialize(Checkpoint *cp, const std::string &section);
-
- /**
- * Return how long this access will take.
- * @param req the memory request to calcuate
- * @return Tick when the request is done
- */
- Tick cacheAccess(MemReqPtr &req);
};
#endif // __TSUNAMI_PCHIP_HH__