|
CS1104 "Computer Organisation" is an introductory level core module for Computing students. The first half of this course introduces students to digital electronics design and the second half builds on the first to teach students the basics of microprocessor and computer design. Microprocessor design, comprising about 60% of the second half of the course, is traditionally taught through PowerPoint slides as shown in Figure 1.

Figure 1. An example of a Microprocessor Design slide
However, these slides are fragmented and difficult to understand as there is often no flow between the slides. As a result, students may find it hard to integrate the information on any one slide with information on other slides. To resolve this, an emulator for a simplified microprocessor called Simple CPU (SCPU) is developed. Figure 2 shows the main SCPU screen showing the various devices (e.g. multiplexors decoders, ALU, registers) that are taught in the first half of the course, their connections, and the various logic gates required to glue the circuits together.
Assembly language programming is often dry and uninteresting to learn. However, as all computer programs will ultimately be translated into assembly language and machine language programs, it forms a key part of teaching CS1104. A keen understanding of assembly language will also give students a better appreciation of how computer programs ultimately perform their "magic".
The SCPU emulator allows students to enter their own assembly language programs using an editor. Figure 3 shows a 'bubble sort' program written in SCPU assembly language. Just like in a real system, students must assemble the assembly language program into a machine language "object file" using the provided assembler called "asm.exe". By running their work through the SCPU emulator, students can see how their instructions are loaded, decoded, executed and the results written back. A separate pop-up box in the emulator allows students to trace each step of the execution of the program.
The SCPU emulator gives students a visual and animated illustration on how microprocessors execute programs. Students can go through the instructions one step at a time, run the program as slowly or quickly as they like, or run the program at full speed. This flexibility allows students to learn how the microprocessor works at their own pace.

Figure 2. Main SCPU Screen

Figure 3. An excerpt from the ‘bubble sort’ program
The SCPU emulator is used during lectures to illustrate more difficult-to-understand points. It is also used in assembly language programming exercises to help students appreciate the relationship between programming and microprocessor design. Besides CS1104, the emulator also forms the core of the Embedded Systems workshop for CS2271 "Embedded Systems", a core module for Computer Engineering. The SCPU emulator can be downloaded from http://www.comp.nus.edu.sg/~ctank/scpu.zip.
|