PowerPC Laboratory 2

This page is essentially the same as the equivalent page that discussed demonstrating the COFFEEPOT device on the 68K processor.

However, there are only a few specific differences for running on the PowerPC simulator. If you were satisified with the demo on the 68K processor, I suggest you skip this page and move onto to your coding of the PowerPC controlling the COFFEEPOT virtual device. Try out the WIDFI process for yourself!


Laboratory 2 -- Demonstrating the COFFEEPOT device operation on the PowerPC simulator

If you have not already done so, you should apply some of MAGIC to prepare the SDS simulator for the virtual device operation.

We can now check whether the "MAGIC" took. To do this we shall demonstrate the operation of the COFFEEPOT device using a pre-existing file.

  1. Getting the necessary files installed in your PowerPC lab2 directory.
  2. Activate the SDS PowerPC simulator.
  3. Use the WINDOW | COMMAND menu option, bring up a COMMAND window.
  4. Activate the Run | Exception Simulator option and select the Machine Check -- TEA error exception. The equivalent of this command for the 68K simulator (set vectskip ( 2 ) -- note spaces) was built into the sstep.ini file
  5. You are now ready to run the test program for the PowerPC COFFEEPOT virtual device.

COFFEEPOT virtual device and SDS simulator set-up test

If the "MAGIC" worked you should get a Welcome to the PowerPC COFFEEPOT simulation 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.

Select the Run | Exception Simulation menu and activate the Machine Check -- TEA error option.

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
	Send WATER_ON signal to the COFFEEPOT WATER register
	Send WATER_FF signal to the COFFEEPOT WATER register
	Send HEAT signal to the COFFEEPOT HEAT register
	Read "temperature" value from COFFEEPOT TEMPERATURE register
	Send HEAT signal to the COFFEEPOT HEAT register
	Read "temperature" value from COFFEEPOT TEMPERATURE register
	Read "temperature" value from COFFEEPOT TEMPERATURE register
	Send HEAT signal to the COFFEEPOT HEAT register
	Read "time" value from COFFEEPOT TIMER register
	Send HEAT signal to the COFFEEPOT HEAT register
	Read "time" value from COFFEEPOT TIMER register
	Read "time" value from COFFEEPOT TIMER register
	Sent TURN_OFF signal to CONTROL register

You will have noticed that the "temperature level" dropped when the TEMPERATURE register was read too often without applying heat. I hope you liked the SMILEYs in the output.


Stepping through the COFFEEPOT Test

In order to see the action of the COFFEEPOT test in more detail you need to do the following.

WARNING:- You can double-click to the left of an instruction in the Source window to bring up a breakpoint (red flag). You can also clear the breakpoint, BUT the red flag does not clear from the Source window in the Version 6.5 demo kit.

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 a break point.


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 09:58 PM by M. Smith.
Copyright -- M. R. Smith