forked from riscv/riscv-debug-spec
-
Notifications
You must be signed in to change notification settings - Fork 1
/
riscv-debug-spec.tex
executable file
·142 lines (112 loc) · 3.14 KB
/
riscv-debug-spec.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
\documentclass[twoside,11pt,openany]{book}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
% Fix copy/pasting of ligatures in Acrobat
\input{glyphtounicode.tex}
\pdfgentounicode=1 %
\usepackage{etoolbox}
\input{preamble}
% All registers are named here. That way when we rename one we'll get errors if
% there are still references to the old name.
\usepackage{makeidx}
\makeindex
\usepackage{xspace}
\newcommand{\inst}[1]{{\tt #1}\xspace}
\newcommand{\reg}[1]{{\tt #1}\xspace}
\newcommand{\field}[1]{{$|#1|$}\xspace}
\newcommand{\defregname}[2]{\providecommand{#1}{\reg{#2}}}
\newcommand{\deffieldname}[2]{\providecommand{#1}{\field{#2}}}
\deffieldname{\FcsrMstatusMprv}{MPRV}
\deffieldname{\FcsrMstatusMie}{MIE}
\deffieldname{\FcsrSstatusSie}{SIE}
\deffieldname{\Fmxl}{MXL}
\defregname{\Rmisa}{misa}
\defregname{\Rmtime}{mtime}
\defregname{\Rtime}{time}
\defregname{\Rmstatus}{mstatus}
\defregname{\Rsstatus}{sstatus}
\defregname{\Rvsstatus}{vsstatus}
\defregname{\Rmcause}{mcause}
\defregname{\Rmie}{mie}
\defregname{\Rxepc}{xepc}
\defregname{\Rmepc}{mepc}
\defregname{\Rmedeleg}{medeleg}
\defregname{\Rhedeleg}{hedeleg}
\defregname{\Rmstateenzero}{mstateen0}
\defregname{\Rhstateenzero}{hstateen0}
\deffieldname{\Fasid}{ASID}
\defregname{\Rsatp}{satp}
\defregname{\Rvsatp}{vsatp}
\defregname{\Azero}{a0}
\defregname{\Aone}{a1}
\defregname{\Rzero}{zero}
\defregname{\Szero}{s0}
\defregname{\Sone}{s1}
\defregname{\Tzero}{t0}
\defregname{\Xzero}{x0}
\defregname{\Xone}{x1}
\defregname{\Xeight}{x8}
\defregname{\Xnine}{x9}
\defregname{\Xten}{x10}
\defregname{\Xeleven}{x11}
\defregname{\Xthirtyone}{x31}
\defregname{\Fone}{f1}
\defregname{\Rpc}{pc}
\defregname{\Rmhartid}{mhartid}
\defregname{\Rdataone}{data1}
\input{hwbp_registers.tex.inc}
\input{core_registers.tex.inc}
\input{jtag_registers.tex.inc}
\input{dm_registers.tex.inc}
\input{sample_registers.tex.inc}
\input{abstract_commands.tex.inc}
\input{sw_registers.tex.inc}
\deffieldname{\Fhartsel}{\hyperref[hartsel]{hartsel}}
\deffieldname{\Fsize}{\hyperref[sizelo]{size}}
\deffieldname{\Faction}{action}
\deffieldname{\Fresethaltreq}{\hyperref[resethaltreq]{resethaltreq}}
\deffieldname{\Fkeepalive}{\hyperref[keepalive]{keepalive}}
\input{vc.tex}
\newcommand{\versionnum}{1.0\ifrelease\else-\releasename\fi}
\begin{document}
\title{RISC-V Debug Specification\\
Version \versionnum\\
\GITHash
}
\author{Editors: \\
Paul Donahue \textless pdonahue@ventanamicro.com\textgreater, Ventana Micro Systems \\
Tim Newsome \textless tim@sifive.com\textgreater, SiFive, Inc.}
\date{\GITAuthorDate}
\maketitle
\markboth{RISC-V Debug Specification Version \versionnum}
{RISC-V Debug Specification Version \versionnum}
\thispagestyle{empty}
\frontmatter
\input{preface.tex}
\tableofcontents
\listoffigures
\listoftables
\mainmatter
\newpage
\input{introduction}
\input{overview}
\input{debug_module}
\input{Sdext}
\input{Sdtrig}
\input{dtm}
\newpage
\appendix
\include{implementations}
\include{debugger_implementation}
\clearpage
\addcontentsline{toc}{chapter}{Index}
\label{index}
\printindex
\ifrelease
\else
\chapter{Change Log}
\begin{versionhistory}
\input{changelog.tex}
\end{versionhistory}
\fi
\end{document}