If you have not already done so, you should apply the
necessary MAGIC to prepare the SDS
simulator for the virtual device operation.
We can now check whether the "MAGIC" took.
- Getting the necessary files installed in 68K lab2
directory
- Down load a copy of the zip-file ctest68k.zip into your
68K lab2 directory. Unzip this
file to generate a copy of the executable ctest68k.out.
- Download the file cdemo68k.dbg
into your 68K lab2 directory if
you not already done so. There is a little bit of MAGIC in this
file as discussed on an earlier page.
Activate
the SDS 68K simulator.
- Using the FILE | DEBUG menu option,
download the ctest68k.out executable
file.
- Dismiss the DEBUG window.
- Use the WINDOW | WATCH menu option,
bring up a Watch window.
- Use the WINDOW | COMMAND menu option, bring up a COMMAND
window.
- Use the pwd command in the Command
window to find the current directory. If the
directory is not your 68K lab2
directory, you will need to change to that
directory.
- In the Command issue the
command to change directories to your 68K lab2
directory.
cd c:\68k\lab2 or equivalent to reach
your laboratory.
This is not necessary if you have set your StartupI
directory to your 68K lab2
directory.
- In the Command window, issue the
command cdemo68k. This activates the cdemo68k.dbg
file to configure the SDS simulation environment.
Provided
- you have set the Command
window to your lab2
directory
- and you have downloaded the .out
executable file
you should see
- A greeting message -- Welcome to the
68K COFFEEPOT simulation.
- The Watch window will
display the contents of a number of
important variables build into the
COFFEEPOT. The action of the COFFEEPOT
will occur within these variables.
- Adjust the size of the Watch
window so that you can see the
information (max length of string -- 50
characters).
- Dismiss the Command
window.
- For those of you who want to find out all the gory
details of the running the virtual devices on the SDS
simulator there is some hidden
MAGIC associated with interrupt handling has occurred
inside the sstep.ini file. Those not
interested in the details, WAIL (Worry about it later.)
- You are now ready to run the test program for the 68K
COFFEEPOT virtual device.
COFFEEPOT virtual device and SDS simulator set-up test
If the "MAGIC" worked you should get a Welcome
to the 68K COFFEEPOT simulation message inside the Command
window. If it did not, then recheck that you installed enough MAGIC to prepare the SDS simulator for the virtual
device operation.
Dismiss the Command
window and bring up the Watch window. In that
you should see a series of internal memory values.
- reginfo -- On this line you will see the
COFFEEPOT virtual device registers you activate with your
program. You will also see values you write to a device
register or read back from the device register.
- screen -- This is the "Virtual Device"
equivalent to the messages flashed on the control screen
of any nuclear power station.
- errorscreen -- On this line you will see any
error messages as you "smoke" the device.
Activate the Run | GO option and stand back.
Depending on the speed of your PC you may have to wait for a
minute or so before you see the final result of the test program
on the screen in the Watch window.
What you should have seen
The COFFEEPOT demo program performed the assembly language
instructions for the operations described in the following
pseudo-code. The program essentially installs and initializes
(RESETS) the COFFEEPOT device, and then tests the operation of each of the
COFFEEPOT device registers.
The pseudo code for the operation is
Install Coffee Pot on Address and Data Busses
Send RESET signal to the COFFEEPOT CONTROL register
SendMessage("Have tested CONTROL register WRITE operation)
Send WATER_ON signal to the COFFEEPOT WATER register
SendMessage("Have tested WATER register WRITE operation)
SendMessage("Testing HEAT register WRITE operation)
Send HEAT signal to the COFFEEPOT HEAT register
SendMessage("Testing TEMPERATURE register READ operation)
Read "temperature" value from COFFEEPOT TEMPERATURE register
SendMessage("Testing TIMER register READ operation
Read "time" value from COFFEEPOT TIMER register
Send TURNOFF signal (anything except a RESET value) to CONTROL register
The following table shows the basic animation sequence
Stepping through the COFFEEPOT Test
In order to see the action of the COFFEEPOT test in more
detail you need to do the following.
- Reset the processor (Run | RESET)
- Bring up a BreakPoint window using the Window
| Breakpoint menu option.
In the BreakPoint
window ask for a breakpoint to be created (right mouse
button -- ADD) at location AddToScreen.
- In the small Breakpoint window that
appears select in the following order
- Double-click on AddToScreen to
bring up a Modifying Breakpoint
window.
- Click on the option Advanced
(may already be active) to bring up a
"larger" window.
- Click on the option Resume Execution
which clears the Current option.
- Click on the option Current, and
press OK button.
- Dismiss both the Breakpoint windows.
Look in the Watch window as you now issue the GO
command after resetting the simulator. You should see the result
(in the variable screen in the Watch
window) as each register in the COFFEEPOT is tested. When the
simulator reaches the breakpoint, it will pause for a second and
then move on.
Try modifing the breakpoint control so that the processor
stops rather than hesitates at the breakpoint (see Help
menu option).
Next Step
You are now ready to move onto your
portion of Laboratory 2 where you must prepare the necessary
assembly language instructions to control the COFFEEPOT in the manner suggested
in the COFFEEPOT data sheets
Last modified: July 22, 1996 01:12 PM by M. Smith.
Copyright -- M. R. Smith