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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [cpu_sysc_plugin/] [riverlib/] [river_cfg.h] - Blame information for rev 3

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

Line No. Rev Author Line
1 3 sergeykhbr
/**
2
 * @file
3
 * @copyright  Copyright 2016 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      "River" CPU configuration parameters
6
 */
7
 
8
#ifndef __DEBUGGER_RIVER_CFG_H__
9
#define __DEBUGGER_RIVER_CFG_H__
10
 
11
#include <systemc.h>
12
 
13
namespace debugger {
14
 
15
static const int RISCV_ARCH     = 64;
16
 
17
static const int BUS_ADDR_WIDTH = 32;
18
static const int BUS_DATA_WIDTH = 64;
19
static const int BUS_DATA_BYTES = BUS_DATA_WIDTH / 8;
20
 
21
static const uint8_t MEMOP_8B = 3;
22
static const uint8_t MEMOP_4B = 2;
23
static const uint8_t MEMOP_2B = 1;
24
static const uint8_t MEMOP_1B = 0;
25
 
26
static const uint64_t RESET_VECTOR      = 0x1000;
27
static const int DBG_FETCH_TRACE_SIZE   = 4;
28
 
29
/** Number of elements each 2*CFG_ADDR_WIDTH in stack trace buffer: */
30
static const int CFG_STACK_TRACE_BUF_SIZE = 32;
31
 
32
enum EIsaType {
33
    ISA_R_type,
34
    ISA_I_type,
35
    ISA_S_type,
36
    ISA_SB_type,
37
    ISA_U_type,
38
    ISA_UJ_type,
39
    ISA_Total
40
};
41
 
42
enum EInstuctionsType {
43
    Instr_ADD,
44
    Instr_ADDI,
45
    Instr_ADDIW,
46
    Instr_ADDW,
47
    Instr_AND,
48
    Instr_ANDI,
49
    Instr_AUIPC,
50
    Instr_BEQ,
51
    Instr_BGE,
52
    Instr_BGEU,
53
    Instr_BLT,
54
    Instr_BLTU,
55
    Instr_BNE,
56
    Instr_JAL,
57
    Instr_JALR,
58
    Instr_LB,
59
    Instr_LH,
60
    Instr_LW,
61
    Instr_LD,
62
    Instr_LBU,
63
    Instr_LHU,
64
    Instr_LWU,
65
    Instr_LUI,
66
    Instr_OR,
67
    Instr_ORI,
68
    Instr_SLLI,
69
    Instr_SLT,
70
    Instr_SLTI,
71
    Instr_SLTU,
72
    Instr_SLTIU,
73
    Instr_SLL,
74
    Instr_SLLW,
75
    Instr_SLLIW,
76
    Instr_SRA,
77
    Instr_SRAW,
78
    Instr_SRAI,
79
    Instr_SRAIW,
80
    Instr_SRL,
81
    Instr_SRLI,
82
    Instr_SRLIW,
83
    Instr_SRLW,
84
    Instr_SB,
85
    Instr_SH,
86
    Instr_SW,
87
    Instr_SD,
88
    Instr_SUB,
89
    Instr_SUBW,
90
    Instr_XOR,
91
    Instr_XORI,
92
    Instr_CSRRW,
93
    Instr_CSRRS,
94
    Instr_CSRRC,
95
    Instr_CSRRWI,
96
    Instr_CSRRCI,
97
    Instr_CSRRSI,
98
    Instr_URET,
99
    Instr_SRET,
100
    Instr_HRET,
101
    Instr_MRET,
102
    Instr_FENCE,
103
    Instr_FENCE_I,
104
    Instr_DIV,
105
    Instr_DIVU,
106
    Instr_DIVW,
107
    Instr_DIVUW,
108
    Instr_MUL,
109
    Instr_MULW,
110
    Instr_REM,
111
    Instr_REMU,
112
    Instr_REMW,
113
    Instr_REMUW,
114
    Instr_ECALL,
115
    Instr_EBREAK,
116
 
117
    Instr_Total
118
};
119
 
120
}  // namespace debugger
121
 
122
#endif  // __DEBUGGER_RIVER_CFG_H__

powered by: WebSVN 2.1.0

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