|
Using the Cebollita ISA Debugger with SMOKLast modified: April 14, 2005 |
|
|
CSE Home
|
About Us
|
Search
|
Contact Info
|
Read about the Cebollita Simulator/Debugger for general information.This debugger provides two additional features. If enough of the SMOK model is recognized to make address translation possible, the debugger does so. Both physical and virtual addresses are displayed in this case.
If the SMOK machine is bootable, a Boot button appears on the debugger. That button causes the boot sector to be loaded, but does not start the SMOK machine executing. Hit Run (after Boot).
The SMOK controls have been left active, meaning you can control (e.g., step or run) the model through either the debugger or through SMOK itself. In fact, all SMOK capabilities have been left enabled, so you can edit the model if you like. It would be prudent to save work frequently if you try to use SMOK in this way while the debugger is attached, however.
Requires Cebollita version 2.3 (Build 31) or newer, and SMOK V7.1.4 or newer.You must have the directory containing the file
SMOKJava.dllin your PATH environment variable. The file is in the SMOK install directory, oftenC:\Program Files\Univeristy of Washington CSE\SMOK.This tool is intended to be useful, but has not had the development effort of other pieces (Cebollita and SMOK, used individually). It has been tested with SMOK models that mostly conformed to the requirements, but it is unknown how resilient it is when connected to a SMOK model that makes little or no attempt to implement the Cebollita ISA. Known bugs are listed at the end of this page.
To operate properly, the debugger must find the following SMOK components in the loaded model. The names and component types must match. Names are case-sensitive.
The debugger makes an attempt to provide useful functionality if only the above are found, but will also make use of the following if provided:
Component Name Component Type GPR SMOK::RegisterFile PC SMOK::Register If these components are not found, the debugger will assume no address translation is taking place.
Component Name Component Type CebCharController SMOK::CharController CebBlockController SMOK::BlockController MemBase SMOK::Register MemLength SMOK::Register HandlerAddress SMOK::Register Status SMOK::Register EPC SMOK::Register Cause SMOK::Register
java dbg.UI --smok [.smok file name] [cebollita exefile][.smok file name] is the name of your SMOK model file. [cebollita exefile] is the filename of an executable in the Cebollita EXE format.
Bootable image file
java dbg.UI --smok [.smok file name] --bootable [image file][.smok file name] is the name of your SMOK model file. [image file] is the filename of a bootable disk image file. (The bootable image should contain a bootloader and os.)
Breakpoints can be set through the debugger UI. HOWEVER, the UI is only a viewer -- it cannot stop the SMOK machine when a breakpoint is reached. Therefore, breakpoints will actually break ONLY IF the SMOK machine halts when it sees one.Breakpoint instructions have value 0x0000000d. Adding a SMOK Halt component that looks for that value, and attaching it to the instruction fetch unit, should suffice.
CAVEAT: When a breakpoint is reached, the debugger temporarily replaces the breakpoint with the original instruction, so that you can see what is about to be executed. IF YOU STEP OR RUN USING THE SMOK CONTROLS, there is no way for the debugger to put the breakpoint back. You should step or run from a breakpoint using the controls in the debugger itself.
- There are some complaints issued during shutdown as pieces of the SMOK model the debugger relies on go away. These could, in theory, be fixed.
|
Department of Computer Science & Engineering University of Washington Box 352350 Seattle, WA 98195-2350 (206) 543-1695 voice, (206) 543-2969 FAX [comments to zahorjan@cs.washington.edu] | |