OpenCores
URL https://opencores.org/ocsvn/thor/thor/trunk

Subversion Repositories thor

[/] [thor/] [trunk/] [software/] [emuThor/] [source/] [clsDevice.h] - Diff between revs 30 and 35

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) {};
};
};
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.