Dogu Arifler and Brian L. Evans,
Past Contributors: Chi Duong, Srikanth Gummadi, Jun Huang, Saleem K. Marwat, Chris M. Moy, and Anna Yuan
Embedded Signal Processing Laboratory, Department of Electrical and Computer Engineering, The University of Texas at Austin
Version 1.3.0 Released (What's new?)
Quick Reference
Running the Simulators and Debuggers - Tips on the User Interface - TMS320C30 Simulator Examples - MC68HC11 Simulator Examples - MC56811 Simulator Examples - MC56LC811 Debugger Examples - Download WEDS Source Code - Documentation and Other Information
When you hit this button, a menu of available simulators and debuggers should be displayed. At the present time, we have a TMS320C30 simulator, an MC68HC11, an MC56L811 board debugger, and an MC56811 ISA simulator available for use. Once you select your simulator, a graphical user interface written in Java should appear. We discuss examples using TMS320C30 simulator and MC68HC11 simulator below. We wrote both simulators at UT Austin based in part of freely distributable source code we found on the Internet.
Note that the user interfaces require two-way communication with an application running on a server. If you are behind a company firewall, then you will likely not be able to access the Web-based simulators because firewalls do not let Java applets send information back to the server. If that is the case, then try this Web-based tool from a machine outside the company firewall.
The source code for the framework is freely distributable. Directions to download and install this software are at the bottom of this page. It is straightforward to add your own simulator, debugger, or other command-line tool to the framework because the graphical user interface configures itself based on feedback from the tool.
exit
or quit
in the
command window will quit the simulator, but the applet
and connection to the server will still be active.
userprograms
sub-directory
to a filename of the user's choice which is accessible from the
simulator using the command
load userprograms/filename
classes/userprograms/using your Web browser.
Example 1: Incrementing a Register
This example loads one into register R0 and increments R0 33 times. For the first example, cut and paste the following commands in the Command Window, which is the upper left window with the white background:
reset load examples/testloop.c30 +dasm step 8and then hit the Evaluate command button when finished. The command loads in the binary file
testloop.c30
,
enables the display of disassembled instructions (+dasm
), and
executes the first 3 instructions in the program, respectively.
You should see the following response in the
Response Window:
7 words read from file 'examples/testloop.c30'. PC=0x00809802 NOP LDI 1,R0 RPTS 32 ADDI 1,R0 NOP ; flushed NOP ADDI 1,R0 ADDI 1,R0The output shows the execution of the first 3 instructions of a program that loads 1 into register r0 and enters a loop which adds 1 to register r0 a total of 33 times. The TMS320C30 has a four-stage pipeline: fetch, decode, read, and execute. The disassembly of instructions occurs in the decode stage, so the first instruction decoded is a NOP. The repeat (RPTS) instruction repeats the command that follows it N+1 times using a no-overhead hardware loop counter. After the repeat (RPTS) instruction, the pipeline will be flushed and initialized to contain a stream of
ADDI 1,R0
commands.
Next, hit the Register Values button in the middle left
of the C30 simulator screen.
The register values will be shown in the lower left window.
Values that have changed are marked with an asterisk *
.
You can let the program run to completion by evaluating
step 33or hitting the Single step button 33 times. Now, hit the Register Values again, and the last set of register values in the left window will move to the right window, and the current register values are displayed in the lower left window. The current value of R0 should be 0x22 hexadecimal.
Here is an example of an FIR filter program to try out C30 simulator interface. Cut and paste the following commands in the Command Window, which is the upper left window with the white background:
reset load examples/fir.hex +dasm step 8and then hit the Evaluate command button when finished. The above commands load the assembled version of the example FIR filter program
fir.asm
,
enable the display of disassembled instructions (+dasm
), and
execute the first 8 cycles of the program, respectively.
To produce the fir.hex
file, we used the assembler in the
the freely distributable
C30 Digital Signal
Processor Starter Kit (DSK) tools, which we have now made part of
the C30 simulator.
See Example 3 below.
You should see the following response in the Response Window:
144 words read from file 'examples/fir.hex'. PC=0x0080987c NOP LDIU 00080h,DP NOP ; interlock NOP ; interlock LDI @098adH,SP LDI 0,R0 STI R0,@08020H STI R0,@08024H
You can look at the values of the registers at any time by hitting the Register Values button in the middle left of the C30 simulator screen. The register values will be shown in the Current Registers window in the lower left portion of the screen. If you hit the Register Values button again, then values in the Current Registers window will be moved into the Previous Registers window in the lower right portion of the screen, and the Current Registers window will be updated.
The program runs through about 150 cycles of initialization of
interrupt routines and then waits for an interrupt to occur which
signals that an input sample has arrived.
At the present time, we do not have a way to trigger an interrupt
using the simulator.
So, let's skip to the FIR
code segment, which computes one
output sample of the FIR filter, by cutting and pasting the following into
the Command Window:
modify pc 0x00809858 step 20You will see the flurry of multiply-accumulate instructions implementing the FIR filter.
Example 3: Downloading and Assembling a Program
In this example, we will revisit the FIR example by downloading, assembling, and running it. First, we will need to download two files. In the C30 simulator window, click the Load option in the File menu. For the URL of the file to be loaded, put
http://anchovy.ece.utexas.edu/~arifler/wetics/classes/examples/fir.asmand for the name of the file to save the userprograms directory, use
fir.asmWhen it has been successfully load, the message "User program loaded" will appear in the status box. Before closing the window, download the C3XMMRS.ASM file using the same procedure. You can simply replace fir with C3XMMRS in the dialog window. You can close the window by hitting the Cancel button.
Now, assemble the FIR application by entering the following in the Command Window:
assm userprograms/fir.asmThis operation will create
userprograms/fir.hex
.
Now, load in the application by
reset load userprograms/fir.hex +dasm step 8Now, go to Example 2 and continue with the running the application by skipping the load commands at the beginning of the example.
Additional Examples
Additional examples in .c30 and .hex formats are available to run on the TMS320C30 simulator including
examples/indirect.c30
examples/dskosc.hex
examples/dsksg.hex
examples/fir.hex
examples/loopaic.hex
examples/math.hex
examples/scan.hex
classes/examples
directory.
We have used these programs to validate the C30 simulator by comparing
its results instruction by instruction with the programs running on
a C30 DSK board.
The .c30 extension means a binary file of 32-bit opcodes stored
in the same byte order as on a PC.
The C30 simulator load command supports both .c30 and .hex formats.
load examples/add32.s19 go F800Then hit the Enable debugging button. The program will take 50 cycles to complete. You can either hit the Single step button several times or type the following in the Command Window:
step 50The program calculates the sum of two 32-bit hexadecimal numbers ($12345678 and $9abcdef0) and puts the result ($acf13568) into register D (D = $acf1) and register X (X = $3568). You can look at the register values by hitting the Register Values button in the middle left portion of the C30 simulator screen.
Another available example is called examples/hexmon40.s19
.
We are in the process of putting examples on-line.
force s
.
The debug mode is required for viewing register values.
We are in the process of putting examples on-line.