URL
https://opencores.org/ocsvn/thor/thor/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 30 |
Rev 35 |
#pragma once
|
#pragma once
|
|
|
// Generic system device
|
// Generic system device
|
|
//
|
|
// Base class for devices in the system. This is a more or less
|
|
// abstract class with suggested methods to be provided in
|
|
// derivatives. Default methods are provided in case the derived
|
|
// device class is read-only or write-only.
|
|
|
class clsDevice
|
class clsDevice
|
{
|
{
|
public:
|
public:
|
clsDevice(void) {};
|
clsDevice(void) {};
|
void Reset() {};
|
void Reset() {};
|
bool IsSelected(unsigned int ad) { return false; };
|
bool IsSelected(unsigned int ad) { return false; };
|
unsigned int Read(unsigned int ad) { return 0xDEADDEAD; };
|
unsigned int Read(unsigned int ad) { return 0xDEADDEAD; };
|
int Write(unsigned int ad, unsigned int dat, unsigned int mask) {};
|
int Write(unsigned int ad, unsigned int dat, unsigned int mask) {};
|
// Read the device and optionally set an address reservation.
|
// Read the device and optionally set an address reservation.
|
unsigned int Read(unsigned int ad, int sr) { return 0xDEADDEAD; };
|
unsigned int Read(unsigned int ad, int sr) { return 0xDEADDEAD; };
|
// Write the device and optionally clear an address reservation.
|
// Write the device and optionally clear an address reservation.
|
int Write(unsigned int ad, unsigned int dat, unsigned int mask, int cr) {};
|
int Write(unsigned int ad, unsigned int dat, unsigned int mask, int cr) {};
|
void Step(void) {};
|
void Step(void) {};
|
};
|
};
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.