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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [libdbg64g/] [services/] [info/] [soc_info.h] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sergeykhbr
/**
2
 * @file
3
 * @copyright  Copyright 2016 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      SOC information.
6
 */
7
 
8
#ifndef __DEBUGGER_SOC_INFO_H__
9
#define __DEBUGGER_SOC_INFO_H__
10
 
11
#include "iclass.h"
12
#include "iservice.h"
13
#include "coreservices/isocinfo.h"
14
#include <string>
15
#include <stdarg.h>
16
 
17
namespace debugger {
18
 
19
class SocInfo : public IService,
20
                public ISocInfo  {
21
public:
22
    explicit SocInfo(const char *name);
23
 
24
    /** IService interface */
25
    virtual void postinitService();
26
 
27
    /** ISocInfo */
28
    virtual unsigned getMastersTotal();
29
    virtual unsigned getSlavesTotal();
30
    virtual unsigned getRegsTotal();
31
    virtual void getRegsList(AttributeType *lst);
32
    virtual unsigned getCsrTotal();
33
    virtual void getCsrList(AttributeType *lst);
34
    virtual uint64_t csr2addr(const char *name);
35
    virtual uint64_t reg2addr(const char *name);
36
 
37
    virtual DsuMapType *getpDsu() {
38
        return reinterpret_cast<DsuMapType *>(dsuBase_.to_uint64());
39
    }
40
 
41
    virtual uint64_t addressPlugAndPlay();
42
    virtual uint64_t addressGpio();
43
 
44
private:
45
    AttributeType pnpBase_;
46
    AttributeType gpioBase_;
47
    AttributeType dsuBase_;
48
    AttributeType listCSR_;
49
    AttributeType listRegs_;
50
};
51
 
52
DECLARE_CLASS(SocInfo)
53
 
54
}  // namespace debugger
55
 
56
#endif  // __DEBUGGER_SOC_INFO_H__

powered by: WebSVN 2.1.0

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