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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [common/] [coreservices/] [icpuriscv.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      RISC-V simulating CPU interface.
6
 */
7
 
8
#ifndef __DEBUGGER_SOCSIM_PLUGIN_CPU_RISCV_H__
9
#define __DEBUGGER_SOCSIM_PLUGIN_CPU_RISCV_H__
10
 
11
#include "iface.h"
12
#include <inttypes.h>
13
 
14
namespace debugger {
15
 
16
static const char *const IFACE_CPU_RISCV = "ICpuRiscV";
17
static const char *const IFACE_DBG_NB_RESPONSE = "IDbgNbResponse";
18
 
19
static const uint64_t REG_INVALID   = ~0;
20
/** Signal types */
21
static const int CPU_SIGNAL_RESET   = 0;
22
static const int CPU_SIGNAL_EXT_IRQ = 1;
23
 
24
struct DebugPortTransactionType {
25
    bool write;
26
    uint8_t region;
27
    uint16_t addr;
28
    uint64_t wdata;
29
    uint64_t rdata;
30
};
31
 
32
class IDbgNbResponse : public IFace {
33
public:
34
    IDbgNbResponse() : IFace(IFACE_DBG_NB_RESPONSE) {}
35
 
36
    virtual void nb_response_debug_port(DebugPortTransactionType *trans) =0;
37
};
38
 
39
 
40
class ICpuRiscV : public IFace {
41
public:
42
    ICpuRiscV() : IFace(IFACE_CPU_RISCV) {}
43
 
44
    virtual void raiseSignal(int idx) =0;
45
    virtual void lowerSignal(int idx) =0;
46
    virtual void nb_transport_debug_port(DebugPortTransactionType *trans,
47
                                         IDbgNbResponse *cb) =0;
48
};
49
 
50
}  // namespace debugger
51
 
52
#endif  // __DEBUGGER_SOCSIM_PLUGIN_CPU_RISCV_H__

powered by: WebSVN 2.1.0

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