90 likes | 235 Views
CSCI2510 Tutorial 6. Course project: A simple CPU Zong Wen wzong@cse.cuhk.edu.hk. The CPU Diagram. The Arithmetic and Logic Unit. 16-bit Result in ACC Control Unit(CU) issues proper signal. Instruction Format. Program Counter. Storing address of next instruction
E N D
CSCI2510 Tutorial 6 Course project: A simple CPU Zong Wen wzong@cse.cuhk.edu.hk
The Arithmetic and Logic Unit • 16-bit • Result in ACC • Control Unit(CU) issues proper signal
Program Counter • Storing address of next instruction • Increase 1 or load from Instruction Register • IR stores the instruction being executed
The Control Unit • Core component, handle others • Internal state machine
Output of Control Unit • to Program Counter • LOADPC: enable to read data from IRA[15:0] • INCPC: increase by 1 • to Multiplexer • ASEL: address indication, address from PC or IR • to Instruction Register • IRIN: enable IR to read instruction from data bus
Output of Control Unit • To ALU and ACCU • ADDSUB: add or subtraction • ACCIN: input enable • ACCCE: enable add/sub and read • ACCOUT: output enable • ROM • ROMOUT: output enable • RAM • WRITE • RAMOUT
Input of Control Unit • I2, I1, I0 • ROMRAM • ACCOB • CLOCK