Cebollita

Using the Cebollita ISA Debugger with SMOK

Last modified: April 14, 2005
Sloop SMOK
  CSE Home  About Us    Search    Contact Info 

Introduction

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.

Requirements and Warnings

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.dll in your PATH environment variable. The file is in the SMOK install directory, often C:\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.

Component NameComponent Type
GPRSMOK::RegisterFile
PCSMOK::Register
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 NameComponent Type
CebCharControllerSMOK::CharController
CebBlockControllerSMOK::BlockController
MemBaseSMOK::Register
MemLengthSMOK::Register
HandlerAddressSMOK::Register
StatusSMOK::Register
EPCSMOK::Register
CauseSMOK::Register
If these components are not found, the debugger will assume no address translation is taking place.

Starting the Simulator

Breakpoints

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.

Known Issues


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]