Enhance the 8-Bit CPU

Objective of this lab:


	To study the operation of a CPU and the control unit. 
	To enhance the ALU of the 8-bit CPU.

Preparation


	Read lab lecture notes.

Lab Assignments

  1. Using VHDL to describe the ALU and it's control unit of the 8-bit CPU that we have learned. Call the new device ALUnControl8. The ALU will do the following operations. When the ALUout is 0, the ALU results will be sent to the bus, otherwise, it is blocked from the bus.
    
     	opcode# MNEMONIC                 DESCRIPTION
            ==============================================================
            00      XOR source, destination  XOR the contents of source,
                                             destination, and store the
                                             result in the destination
            --------------------------------------------------------------
            01      AND source, destination  AND the contents of source,
                                             destination, and store the
                                             result in the destination
            --------------------------------------------------------------
            10      NOT source, destination  invert the contents of
                                             source and store the result
                                             in destination
            --------------------------------------------------------------
            11      OR source, destination   OR the contents of source, 
    					 destination,  and store the 
    					 result in destination
            --------------------------------------------------------------
    
    
    
    Please note that the ALU will need two operands input, OP code input, ALUout control signal and the output of the ALU.
    Hand in items:
    1). Your VHDL model file for the device ALUnControl8;
    2). Testing circuit of your new device ALUnControl8;
    3). A screen shot showing your new ALU and the control unit in the 8-bit CPU circuit.

  2. Implement the following tasks with your enhanced 8-bit CPU, remember to pre-load the registers or memory when needed:
    
    	1) Write out and hand in the microinstructions to perform this operation 
    	   XOR #5,(C) 
    	   including the machine code and how you load it to the memory.
    
    	   Pre-load the registers or memory when needed.
    	   For example:  Load 00001000  to the C register
         			 Load 00000000  to the memory location 8
    
    	2) Write out and hand in the microinstructions to perform the operation
    
    	   OR 5, 8
    	   including the machine code and how you load it to the memory.
    
    	   Pre-load the registers or memory when needed.
    	   For example:  Load 00000000  to the memory location 5
    			 Load 00001010  to the memory location 8
    
    	

Questions

 
	   Describe how unconditional branches could be added to the CPU and 
	   what additional things this would require. 
	   Remember that a branch instruction uses an offset from the current 
	   location. 

This page last modified:
Wednesday, 06-Aug-2014 15:00:22 CST
Accessed     times.

Copyright: Department of Computer Science, University of Regina.