U of I CS 231 - Control units (27 pages)

Previewing pages 1, 2, 3, 25, 26, 27 of 27 page document View the full content.
View Full Document

Control units



Previewing pages 1, 2, 3, 25, 26, 27 of actual document.

View the full content.
View Full Document
View Full Document

Control units

78 views

Lecture Notes


Pages:
27
School:
University of Illinois
Course:
Cs 231 - Fundamental Algorithms
Fundamental Algorithms Documents

Unformatted text preview:

Control units In the last lecture we introduced the basic structure of a control unit and translated our assembly instructions into a binary representation Today we fill in the last piece of the processor and build a control unit to convert these binary instructions into datapath signals At the end of the lecture we ll have a complete example processor Control Unit 1 Datapath review Set WR 1 to write one of the registers DA is the register to save to AA and BA select the source registers MB chooses a register or a constant operand FS selects an ALU operation MW 1 to write to memory MD selects between the ALU result and the RAM output V C N and Z are status bits WR D DA Register file AA A B BA constant 1 0 Mux B FS V C N Z A B ALU ADRS MW DATA Data RAM OUT G 0 1 Mux D Control Unit MB MD 2 Instruction format review 15 We have three different instruction formats each 16 bits long with a seven bit opcode and nine bits for source registers or constants The first three bits of the opcode determine the instruction category while the other four bits indicate the exact instruction For ALU shift instructions the four bits choose an ALU operation For branches the bits select one of eight branch conditions We only support one one load one store and one jump instruction 9 8 Opcode 6 5 Destination DR or Address 5 3 AD Control Unit 3 2 Register A SA 0 Register B SB Operand OP or Address 2 0 AD 3 Block diagram of a processor Program Control signals Control Unit Status signals Datapath The control unit connects programs with the datapath It converts program instructions into control words for the datapath including signals WR DA AA BA MB FS MW MD It executes program instructions in the correct sequence It generates the constant input for the datapath The datapath also sends information back to the control unit For instance the ALU status bits V C N Z can be inspected by branch instructions to alter a program s control flow Control Unit 4 Where does the program go We ll use a Harvard



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Control units and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Control units and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?