Triannual newsletter produced by the 
Centre for Development of Teaching and Learning  
INSIDE THIS ISSUE»
........   IT IN EDUCATION  ........
Mar 2007 Vol. 11 No. 1
  Print Ready
Educating Arts Students about the Human Body
Getting Them to Talk
CELC’s Study Trip to China

TLHE 2006
ICTRAPS
CDTL News

PREVIOUS ISSUES»
  July 2008
  March 2008
  August 2007
  November 2007
  August 2007
  March 2007
  November 2006
  July 2006
  March 2006
  November 2005
  July 2005
  March 2005
  November 2004
  July 2004
  March 2004
  November 2003
  July 2003
  March 2003
  November 2002
  July 2002
  March 2002
  November 2001
  July 2001
  March 2001
  November 2000
  July 2000
  January 2000
  July 1999
  January 1999
  July 1998
  January 1998
  July 1997
  January 1997
A Software Emulator for Teaching Microprocessor Design
Dr Colin Tan
Department of Computer Science

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.

 

| Editorial Team | Publications@CDTL
© 1997 - 2006 : Centre for Development of Teaching and Learning, All rights reserved.