URL
https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 4 |
Line 9... |
Line 9... |
#define __DEBUGGER_SOCSIM_PLUGIN_GPIO_H__
|
#define __DEBUGGER_SOCSIM_PLUGIN_GPIO_H__
|
|
|
#include "iclass.h"
|
#include "iclass.h"
|
#include "iservice.h"
|
#include "iservice.h"
|
#include "coreservices/imemop.h"
|
#include "coreservices/imemop.h"
|
#include "coreservices/isignal.h"
|
#include "coreservices/iwire.h"
|
|
|
namespace debugger {
|
namespace debugger {
|
|
|
class GPIO : public IService,
|
class GPIO : public IService,
|
public IMemoryOperation,
|
public IMemoryOperation,
|
public ISignal {
|
public IWire {
|
public:
|
public:
|
GPIO(const char *name);
|
GPIO(const char *name);
|
~GPIO();
|
~GPIO();
|
|
|
/** IService interface */
|
/** IService interface */
|
virtual void postinitService();
|
virtual void postinitService();
|
|
|
/** IMemoryOperation */
|
/** IMemoryOperation */
|
virtual void b_transport(Axi4TransactionType *trans);
|
virtual ETransStatus b_transport(Axi4TransactionType *trans);
|
|
|
virtual uint64_t getBaseAddress() {
|
|
return baseAddress_.to_uint64();
|
|
}
|
|
virtual uint64_t getLength() {
|
|
return length_.to_uint64();
|
|
}
|
|
|
|
/** ISignal interface */
|
|
virtual void setLevel(int start, int width, uint64_t value);
|
|
virtual void registerSignalListener(IFace *listener);
|
|
virtual void unregisterSignalListener(IFace *listener);
|
|
|
|
|
/** IWire interface */
|
|
virtual void raiseLine() {}
|
|
virtual void lowerLine() {}
|
|
virtual void setLevel(bool level) {}
|
|
virtual bool getLevel() { return 0; }
|
|
|
private:
|
private:
|
AttributeType baseAddress_;
|
|
AttributeType length_;
|
|
AttributeType dip_;
|
AttributeType dip_;
|
AttributeType listOfListerners_;
|
|
|
|
struct gpio_map {
|
struct gpio_map {
|
volatile uint32_t led;
|
volatile uint32_t led;
|
volatile uint32_t dip;
|
volatile uint32_t dip;
|
volatile uint32_t reg2;
|
volatile uint32_t reg2;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.