Bennett/General User Manual: Difference between revisions
![]() ![]() ![]() ![]() (Grammar and spelling) |
![]() ![]() (Added mention of the RV32/ABI buttons above the register file) |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
== Bennett == | == Bennett == | ||
Bennett is a hardware monitor tool. Its purpose is to expose the controls to a processor and allow | Bennett is a hardware monitor tool. Its purpose is to expose the controls to a processor and allow you to modify the memory of the system. | ||
== Bennett User Guide == | == Bennett User Guide == | ||
Line 59: | Line 59: | ||
A depressed button indicates that the bit representing that flag is 1. | A depressed button indicates that the bit representing that flag is 1. | ||
For COMP15111/COMP22712 the full RISC-V registers are visible. | For COMP15111/COMP22712 the full RISC-V registers are visible. Two extra buttons next to "Zero Registers", allow you to switch between RV32 (x0-x31) and ABI (a0-a7, t0-t6, etc) names. | ||
=== (C) File Menu === | === (C) File Menu === |
Latest revision as of 11:35, 19 September 2025
If anything is unclear in this manual, please contact cadtools@manchester.ac.uk
Bennett
Bennett is a hardware monitor tool. Its purpose is to expose the controls to a processor and allow you to modify the memory of the system.
Bennett User Guide
Bennett has several backend modules, for example, MU0 and RISC-V. The screenshots and examples in this guide use a variety of backends, so the exact interface/register banks may differ slightly depending on which course unit you are studying. Currently Bennett is used in COMP12111, COMP15111, COMP22111, COMP32211, COMP22711
Starting Bennett
Please reference the specific notes for your course units (COMP12111, COMP15111, COMP22111, COMP32211, COMP22711) or the Lab manual on how to start Bennett for your course unit.
GUI Overview
The figure below outlines the main elements of the Bennett GUI.
(A) Memory Window
The memory window displays the current values of the given memory for the underlying system.
In the top right corner of the memory panel, you can select to change the view of the memory.
- Source - Shows the source against the memory values
- Source (Expanded) - Shows empty white space and multiline comments
- Bytes - Shows the memory as bytes
- Halfword - Shows the memory as halfwords
- Other modes are available. Not all modes are available for every backend module. (MU0 isn't byte addressable for example)
At the top of the memory panel, there is a box in which you can enter expressions. This expression will move the memory view around the whole memory. For example, if you put "PC", the memory pane will follow the value of the program counter as the processor executes instructions.
Breakpoints
Breakpoints are positions in the code where you would like execution to halt; this makes it much easier to debug code.
A breakpoint is set by double-clicking the memory address in one of the memory windows – A green circle will appear. The row header (e.g 0x001) must be clicked, the part in light grey, not the memory value cell itself.
Setting breakpoints is only possible when viewing in the Source or Disassembly formats in the memory view window.
When a breakpoint is set and the program is run, the execution will automatically pause at the address with the breakpoint. To continue execution, simply press the Play button. To remove a breakpoint, simply click on the address where a breakpoint is currently set. It is possible to have more than one breakpoint in your code. Up to a maximum of 32.
(B) Registers / Breakpoints
From the register view window, you can see the contents of the system registers
For COMP12111, the accumulator, the PC, as well as the status of the flags, Z and N. These values are fixed. A depressed button indicates that the bit representing that flag is 1.
For COMP15111/COMP22712 the full RISC-V registers are visible. Two extra buttons next to "Zero Registers", allow you to switch between RV32 (x0-x31) and ABI (a0-a7, t0-t6, etc) names.
(C) File Menu
The file menu offers several more advanced options.
Windows
Allows you to add additional memory and register windows for viewing multiple areas of memory at the same time.
Comms
Gives options to control how many steps are step forward at a time, an ability to turn off communications with the underlying system, and set the speed of the walk feature. This is a more advanced feature and is most likely not required often.
Assembly and Loading
Allows you to select a file to assemble, and a list of recently assembled files that can be reassembled quickly. See the section on file loading for further details.
(D) Controls
Run
Bennett will tell the underlying processor to start running forward. The speed of this depends on the underlying system. Please consult your lab manual/lecture notes or ask a member of staff in labs about specifics for your module.
Stop
Bennett will ask the underlying system to stop.
Single Step
Bennett will request that the underlying system execute a single instruction. This is bound to key F5.
Walk
Performs a single step every second. A slow-motion run, however, a walk will step off and over breakpoints.
ECALL routines in COMP15111 will not operate as expected in this state.
Reset
Bennett will request the processor resets. In most systems, this will reset the program counter and internal state of the processor, but will not reset the memory or register values. Please consult your lab manual/lecture notes for details or ask a member of academic staff.
Load Program
Bennett will offer to load a program from disk. If an assembly file is given, Bennett will attempt to assemble it first.
Other file formats supported include KMD, PNG, JPEG, HEX, and Bin. See Bennett loading file formats for more details.
Reload Program
Bennett will attempt to reload the last program that was loaded into the system memory.
(E) Status Message
The status message will let you know the current state of the system. This could be running, stopped, stopped due to a hardware issue, etc.
Expression evaluation
Anywhere in Bennett where values can be entered, you may enter an expression. General mathematical expressions are valid, and Bennett will treat register names as variables holding the value of the register.
Some examples:
0xfff - 123
(Evaluates to a fixed number)PC -4
(Evaluating to the program counter - 4, good for following the PC)ACC * 2
(Evaluating to twice the accumulator)x0 * x12
(Another expressions that could be used in COMP15111)
If these expressions are entered in the memory window search bar, they will update continuously, allowing for live following of expressions.
Peripherals
Terminal
Bennett provides a terminal interface. The terminal can be opened in the File Menu -> Windows -> New Terminal Window. Clicking this button, a new terminal window will be appended to the lower part of the Bennett GUI.
This is not a host system terminal; it is connected to the input and output of the backend module. For COMP15111, this is the emulated IO, and so you won't be able to type into the terminal and see output unless an appropriate program is driving the IO. Please see your lab manual for further details.