blob: 9496c9e4e95bed0eaebc04e19a327fc4acc319a9 (
plain)
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
|
RVController Built-in Monitor
=============================
RVController contains a built-in machine-code monitor accessible by connecting a keyboard
on channel "monitorkb" and a display on channel "monitordisp".
For best results, use the keyboard and CRT ("cathodic") monitor from the digiterms mod:
https://content.luanti.org/packages/mt-mods/digiterms/
After connecting these devices and programming the Luacontroller, the following should be displayed:
+--------------------+
|Reset: Cold |
| |
|RVController Monitor|
| |
|Type 'help' for help|
|Ready |
+--------------------+
Once you see this display, the monitor is ready to accept commands. The valid commands are:
peek <address>
Reads and displays the byte (8 bits) value from RAM at the specified address
poke <address> <data>
Writes the specified byte (8 bits) value to RAM at the specified address
peekw <address>
Reads and displays the word (32 bits) value from RAM starting at the specified address
pokew <address> <data>
Writes the specified word (32 bits) value to RAM starting at the specified address
getreg <register number or name>
Displays the current value of the specified register number (0-31)
setreg <register number or name> <value>
Sets the specified register (0-31) to the specified value
getpc
Displays the current value of the program counter
setpc <value>
Sets the program counter to the specified value
reset
Stops the CPU, resets all registers to zero, and clears all RAM
step
Allows the CPU to run for one instruction, then halts
run
Allows the CPU to run indefinitely
stop
Halts the CPU
setbreak <address>
Sets a breakpoint on the specified address.
Note that the breakpoint triggers just *before* the instruction fetch,
as in the instruction with the breakpoint on it will not have executed yet.
There can only be one breakpoint at a time. If one is already set, the new one will replace it.
clearbreak
Clears any set breakpoint. Note that an ebreak instruction will still cause a break.
help [command]
Shows information on a monitor command, or a list of commands if none is specified.
Use 'help 2' to see the second page
rdcsr <CSR address or name>
Displays the contents of the specified CSR
wrcsr <CSR address or name> <data>
Writes the specified data to the specified CSR, then reads back and displays the new value.
Note that the new value may not match the written value if any read-only or WARL fields were written to.
endian [big|little]
With no arguments, displays the current endianness.
With the argument "big" or "little", sets the current endianness to big-endian or little-endian respectively.
This can also be viewed or changed using the MBE bit in the mstatush CSR.
|