63architecture

63architecture - COS126 General Computer Science •...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: COS126: General Computer Science • http://www.cs.Princeton.EDU/~cos126 6.3: TOY Machine Architecture > 0 = 0 1 Memory W Data R Data Addr W 2 Registers W Data W Addr A Addr B Addr A Data B Data W 8 PC + Cond Eval IR t s d op pc for jal store data addr pc + 1 pc for branch, jump result of arithmetic, logic, or addr for load addr addr for loads, stores 5 A L U load 8 16 8 16 8 2 The TOY Machine TOY machine. ! 256 16-bit words of memory. ! 16 16-bit registers. ! 1 8-bit program counter. ! 16 instructions types. What we've done. ! Written programs for the TOY machine. ! Software implementation of fetch-execute cycle. – TOY simulator. Our goal today. ! Hardware implementation of fetch-execute cycle. – TOY computer. Fetch 3 Designing a Processor How to build a microprocessor? ! Develop instruction set architecture (ISA). – 16-bit words, 16 TOY machine instructions ! Determine major components. – ALU, memory, registers, program counter ! Determine datapath requirements. – "flow" of bits ! Establish clocking methodology. – 2-cycle design: fetch, execute ! Analyze how to implement each instruction. – determine settings of control signals 4 Instruction Set Architecture Instruction set architecture (ISA). ! 16-bit words, 256 words of memory, 16 registers. ! Determine set of primitive instructions. – too narrow ! cumbersome to program – too broad ! cumbersome to build hardware ! TOY machine: 16 instructions. 0: halt Instructions 1: add 2: subtract 3: and 4: xor 5: shift left 6: shift right 7: load address 8: load 9: store A: load indirect B: store indirect C: branch zero D: branch positive E: jump register F: jump and link Instructions 5 Designing a Processor How to build a microprocessor? ! Develop instruction set architecture (ISA). – 16-bit words, 16 TOY machine instructions ! Determine major components. – ALU, memory, registers, program counter ! Determine datapath requirements. – "flow" of bits ! Establish clocking methodology. – 2-cycle design: fetch, execute ! Analyze how to implement each instruction. – determine settings of control signals 6 Arithmetic Logic Unit TOY ALU. ! Big combinational circuit. ! 16-bit bus. ! Add, subtract, and, xor, shift left, shift right, copy input 2. ALU select 16 16 16 Input 1 Input 2 ALU subtract shift direction 3 op 1 +, - 0 & 0 ^ 1 <<, >> 1 input 2 0 2 0 0 0 0 1 0 0 1 0 1 0 technical hack 7 Arithmetic Logic Unit: Implementation 16 Input 1 16 Input 2 16 subtract carry in ALU control & ~ shift direction 3 << >> MUX op 1 +, - & ^ 1 <<, >> 1 1 1 input 2 2 1 000 001 010 011 100 + ^ ^ 8 Main Memory TOY main memory: 256 x 16-bit register file. 16 Cl Write Address 8 Read Data 16 Write Data 07 06 05 03 02 01 04 00 0F 0E 0D 0B 0A 09 0C 08 17 16 15 13 12 11 14 10 1F 1E 1D 1B 1A 19 1C 18 27 26 25 23 22 21 24 20 2F 2E 2D 2B 2A 29 2C 28 37 36 35 33 32 31 34 30 3F 3E 3D 3B 3A 39 3C 38 47 46 45 43 42 41 44 40 4F 4E 4D 4B 4A 49 4C 48 57 56 55 53 52 51 54 50 5F 5E 5D 5B 5A 59 5C 58 67 66 65 63 62 61 64 60...
View Full Document

This note was uploaded on 12/16/2008 for the course COS 126 taught by Professor Douglasw.clark during the Fall '08 term at Princeton.

Page1 / 9

63architecture - COS126 General Computer Science •...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online