CCSCNE 2007 Presentation

Simulation of a Simple CPU Design and its Use as an Instructional Tool in a Computer Organization Course

JOHN PHILLIPS -- APRIL 21, 2007

http://faculty.mansfield.edu/jphillip/

1. MU CPU 2002 Demo

 

 

2. MMLogic Examples

(MultiMedia Logic is available as freeware from http://www.softronix.com/logic.html)

 

 

3. MU CPU 2006 Block Diagram

 

 

4. MU CPU Circuit Details

 

 

5. Homework / Laboratory Assignments

a. Write an MU CPU 2002 program that uses memory mapped I/O to display CCSCNE 2007. Solution: assembly source; first asm listing; final asm listing; machine code

b. Add an OUT instruction (opcode 00) and an 8-bit output port onto the CPU circuit with LEDs attached. Write a program that counts in binary on the LEDs. Add an ASCII display device to the output port. Write a program to print out "Hello Name" where Name is your first name.

c. Write a program that will add two 16-bit numbers together and display the low-order byte on the output port LEDs and the high-order byte on the Accumulator LEDs.

d. Write a program that will multiply two small 8-bit numbers such that the result will be less than 256. Do the multiplication by successive addition. For example, 8*3 would be the same as 8+8+8. Solution: asm listing, machine code

e. Write a program that multiplies two 8-bit numbers together and then stores the 16-bit result in RAM. Next read back the 16-bit result and write the upper 8-bits to the output port LEDs and place the lower 8-bits in the Accumulator. Then halt. MU CPU 2002 solution: asm listing, machine code

f. Add a hardware MUL (multiply) instruction (opcode 24) and circuitry to enable this operation in the ALU. Write a test program that demonstrates this operation working correctly.

g. Write a program in the language of your choice that will serve as a simple assembler for the MU CPU instruction set.

 

 

6. Featured Student Projects

MU CPU 2006 Address Bus Expansion - Brandon Valero expanded the address bus from 8 bits to 16 bits and then upgraded the RAM from a 256 byte device to a 64 K byte device.

MU CPU 2006 Write to Disk Instruction - Jesse Robinson added an MMLogic output device to the CPU. This allows the CPU to write data to various devices such as disk drives and USB Flash drives. A new WRT instruction was created (opcode 12) and a test program written to demonstrate this device.

MU CPU 2006 Instruction Set Improvements - Aaron Clark added several very useful new instructions including a less than comparison, an equal comparison, and a jump on comparison. These instructions greatly simplify the coding conditional branches that underlie loops and decision statements. In addition, he added multiply and divide instructions taking advantage of the advanced capabilities of the MMLogic ALU used in the CPU design.

MU CPU 2006 Web-based Assembler - Milton Clark developed a web-based assembler using the PHP programming language.

 

 

 7. More Information

 

John Phillips

http://www.programbetter.com/

jphillip@mansfield.edu