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!
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.
cd c:\ppc\lab2 or equivalent to reach your laboratory
This is not necessary if you have set your StartupI directory to your PowerPC lab2 directory.
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.
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.
![]() |
![]() |
![]() |
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.
![]() |
![]() |
![]() |
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