2 or 3 add 4 subtract and 5 and example andi 2 or 3

This preview shows 21 out of 28 pages.

Info icon Subscribe to view the full document.

Info icon Subscribe to view the full document.

Info icon Subscribe to view the full document.

Info icon Subscribe to view the full document.

You've reached the end of this preview.

Unformatted text preview: (2) Or, (3) Add, (4) Subtract, and (5) And (Example: andi) (2) Or, (3) Add, (4) Subtract, and (5) And (Example: andi) Main Control op 6 ALU Control (Local) func N 6 ALUop ALUctr 3 R-type ori lw sw beq jump ALUop (Symbolic) “R-type” Or Add Add Subtract xxx ALUop<2:0> 1 00 0 10 0 00 0 00 0 01 xxx 22 22 The Decoding of the “func” Field The Decoding of the “func” Field R-type ori lw sw beq jump ALUop (Symbolic) “R-type” Or Add Add Subtract xxx ALUop<2:0> 1 00 0 10 0 00 0 00 0 01 xxx Main Control op 6 ALU Control (Local) func N 6 ALUop ALUctr 3 op rs rt rd shamt funct 6 11 16 21 26 31 R-type funct<5:0> Instruction Operation 10 0000 10 0010 10 0100 10 0101 10 1010 add subtract and or set-on-less-than ALUctr<2:0> ALU Operation 000 001 010 110 111 And Or Add Subtract Set-on-less-than P. 286 text: ALUctr ALU 23 23 The Truth Table for The Truth Table for ALUctr ALUctr R-type ori lw sw beq ALUop (Symbolic) “R-type” Or Add Add Subtract ALUop<2:0> 1 00 0 10 0 00 0 00 0 01 ALUop func bit<2> bit<1> bit<0> bit<2> bit<1> bit<0> bit<3> x x x x ALUctr ALU Operation Add 1 bit<2> bit<1> bit<0> x 1 x x x x Subtract 1 1 1 x x x x x Or 1 1 x x Add 1 1 x x 1 Subtract 1 1 1 x x 1 And 1 x x 1 1 Or 1 1 x x 1 1 Set on < 1 1 1 funct<3:0> Instruction Op. 0000 0010 0100 0101 1010 add subtract and or set-on-less-than 24 24 The Logic Equation for ALUctr<2> The Logic Equation for ALUctr<2> ALUop func bit<2> bit<1> bit<0> bit<2> bit<1> bit<0> bit<3> ALUctr<2> x 1 x x x x 1 1 x x 1 1 1 x x 1 1 1 • ALUctr<2> = !ALUop<2> & ALUop<0> ALUctr<2> = !ALUop<2> & ALUop<0> + ALUop<2> & !func<2> & func<1> & ! + ALUop<2> & !func<2> & func<1> & ! func<0> func<0> This makes func<3> a don’t care 25 25 The Logic Equation for ALUctr<1> The Logic Equation for ALUctr<1> ALUop func bit<2> bit<1> bit<0> bit<2> bit<1> bit<0> bit<3> x x x x 1 ALUctr<1> x 1 x x x x 1 1 x x 1 1 x x 1 1 1 x x 1 1 1 • ALUctr<1> = !ALUop<2> & !ALUop<1> ALUctr<1> = !ALUop<2> & !ALUop<1> + ALUop<2> & !func<2> & !func<0> + ALUop<2> & !func<2> & !func<0> 26 26 The Logic Equation for ALUctr<0> The Logic Equation for ALUctr<0> ALUop func bit<2> bit<1> bit<0> bit<2> bit<1> bit<0> bit<3> ALUctr<0> 1 x x x x x 1 1 x x 1 1 1 1 x x 1 1 1 • ALUctr<0> = !ALUop<2> & ALUop<1> ALUctr<0> = !ALUop<2> & ALUop<1> + ALUop<2> & !func<3> & func<2> + ALUop<2> & !func<3> & func<2> & !func<1> & func<0> & !func<1> & func<0> + ALUop<2> & func<3> & !func<2> & + ALUop<2> & func<3> & !func<2> & func<1> & !func<0> func<1> & !func<0> 27 27 The ALU Control The ALU Control Block Block ALU Control (Local) func 3 6 ALUop ALUctr 3 • ALUctr<2> = !ALUop<2> & ALUop<0> + ALUctr<2> = !ALUop<2> & ALUop<0> + ALUop<2> & !func<2> & func<1> & !func<0>ALUop<2> & !...
View Full Document

  • Fall '05
  • WeiChungHsu
  • Trigraph, Rw Ra Rb, Datapath Inst Memory, 32-bit Registers busB

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern