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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [common/] [coreservices/] [icpugen.h] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 sergeykhbr
/**
2
 * @file
3
 * @copyright  Copyright 2017 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      Generic CPU simulating interface.
6
 */
7
 
8
#ifndef __DEBUGGER_COMMON_CORESERVICES_ICPUGEN_H__
9
#define __DEBUGGER_COMMON_CORESERVICES_ICPUGEN_H__
10
 
11
#include <inttypes.h>
12
#include <iface.h>
13
#include "coreservices/imemop.h"
14
 
15
namespace debugger {
16
 
17
static const char *const IFACE_CPU_GENERIC = "ICpuGeneric";
18
static const uint64_t REG_INVALID   = ~0;
19
 
20
struct DebugPortTransactionType {
21
    bool write;
22
    uint8_t region;
23
    uint16_t addr;
24
    uint32_t bytes;
25
    uint64_t wdata;
26
    uint64_t rdata;
27
};
28
 
29
static const char *const IFACE_DBG_NB_RESPONSE = "IDbgNbResponse";
30
 
31
class IDbgNbResponse : public IFace {
32
 public:
33
    IDbgNbResponse() : IFace(IFACE_DBG_NB_RESPONSE) {}
34
 
35
    virtual void nb_response_debug_port(DebugPortTransactionType *trans) = 0;
36
};
37
 
38
class ICpuGeneric : public IFace {
39
 public:
40
    ICpuGeneric() : IFace(IFACE_CPU_GENERIC) {}
41
 
42
    virtual void raiseSignal(int idx) = 0;
43
    virtual void lowerSignal(int idx) = 0;
44
    virtual void nb_transport_debug_port(DebugPortTransactionType *trans,
45
                                         IDbgNbResponse *cb) = 0;
46
};
47
 
48
}  // namespace debugger
49
 
50
#endif  // __DEBUGGER_COMMON_CORESERVICES_ICPUGEN_H__

powered by: WebSVN 2.1.0

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