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 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 sergeykhbr
/*
2
 *  Copyright 2018 Sergey Khabarov, sergeykhbr@gmail.com
3
 *
4
 *  Licensed under the Apache License, Version 2.0 (the "License");
5
 *  you may not use this file except in compliance with the License.
6
 *  You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *  Unless required by applicable law or agreed to in writing, software
11
 *  distributed under the License is distributed on an "AS IS" BASIS,
12
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *  See the License for the specific language governing permissions and
14
 *  limitations under the License.
15 3 sergeykhbr
 */
16
 
17
#ifndef __DEBUGGER_RIVER_CFG_H__
18
#define __DEBUGGER_RIVER_CFG_H__
19
 
20
#include <systemc.h>
21
 
22
namespace debugger {
23
 
24
static const int RISCV_ARCH     = 64;
25
 
26
static const int BUS_ADDR_WIDTH = 32;
27
static const int BUS_DATA_WIDTH = 64;
28
static const int BUS_DATA_BYTES = BUS_DATA_WIDTH / 8;
29
 
30
static const uint8_t MEMOP_8B = 3;
31
static const uint8_t MEMOP_4B = 2;
32
static const uint8_t MEMOP_2B = 1;
33
static const uint8_t MEMOP_1B = 0;
34
 
35 4 sergeykhbr
static const uint64_t RESET_VECTOR      = 0x0040;
36 3 sergeykhbr
static const int DBG_FETCH_TRACE_SIZE   = 4;
37
 
38
/** Number of elements each 2*CFG_ADDR_WIDTH in stack trace buffer: */
39
static const int CFG_STACK_TRACE_BUF_SIZE = 32;
40
 
41
enum EIsaType {
42
    ISA_R_type,
43
    ISA_I_type,
44
    ISA_S_type,
45
    ISA_SB_type,
46
    ISA_U_type,
47
    ISA_UJ_type,
48
    ISA_Total
49
};
50
 
51
enum EInstuctionsType {
52
    Instr_ADD,
53
    Instr_ADDI,
54
    Instr_ADDIW,
55
    Instr_ADDW,
56
    Instr_AND,
57
    Instr_ANDI,
58
    Instr_AUIPC,
59
    Instr_BEQ,
60
    Instr_BGE,
61
    Instr_BGEU,
62
    Instr_BLT,
63
    Instr_BLTU,
64
    Instr_BNE,
65
    Instr_JAL,
66
    Instr_JALR,
67
    Instr_LB,
68
    Instr_LH,
69
    Instr_LW,
70
    Instr_LD,
71
    Instr_LBU,
72
    Instr_LHU,
73
    Instr_LWU,
74
    Instr_LUI,
75
    Instr_OR,
76
    Instr_ORI,
77
    Instr_SLLI,
78
    Instr_SLT,
79
    Instr_SLTI,
80
    Instr_SLTU,
81
    Instr_SLTIU,
82
    Instr_SLL,
83
    Instr_SLLW,
84
    Instr_SLLIW,
85
    Instr_SRA,
86
    Instr_SRAW,
87
    Instr_SRAI,
88
    Instr_SRAIW,
89
    Instr_SRL,
90
    Instr_SRLI,
91
    Instr_SRLIW,
92
    Instr_SRLW,
93
    Instr_SB,
94
    Instr_SH,
95
    Instr_SW,
96
    Instr_SD,
97
    Instr_SUB,
98
    Instr_SUBW,
99
    Instr_XOR,
100
    Instr_XORI,
101
    Instr_CSRRW,
102
    Instr_CSRRS,
103
    Instr_CSRRC,
104
    Instr_CSRRWI,
105
    Instr_CSRRCI,
106
    Instr_CSRRSI,
107
    Instr_URET,
108
    Instr_SRET,
109
    Instr_HRET,
110
    Instr_MRET,
111
    Instr_FENCE,
112
    Instr_FENCE_I,
113
    Instr_DIV,
114
    Instr_DIVU,
115
    Instr_DIVW,
116
    Instr_DIVUW,
117
    Instr_MUL,
118
    Instr_MULW,
119
    Instr_REM,
120
    Instr_REMU,
121
    Instr_REMW,
122
    Instr_REMUW,
123
    Instr_ECALL,
124
    Instr_EBREAK,
125
 
126
    Instr_Total
127
};
128
 
129
}  // namespace debugger
130
 
131
#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.