CBP 2006Comp 4070 Concepts and Philosophy of Computing 1 Wrestling with Complex Stuff. With the Correct Approach, even the smallest guy will succeed!
CBP 2006Comp 4070 Concepts and Philosophy of Computing 2 Data Memory Code Memory ALU X Y W XY W Digital Logic Where? Control Circuits – CPU control path - system board (later) ALU Structure – add, sub, and, or, not MUXES Address Decoder
CBP 2006Comp 4070 Concepts and Philosophy of Computing 3 Boolean Notation, Truth Tables A and B AB A or B A + B NOT A A _ ABC Easy Way to write truth tables - count in binary ! A B O A B O A O ABO ABO AO 01 10
CBP 2006Comp 4070 Concepts and Philosophy of Computing 4 D in Control D out D inControlD out
CBP 2006Comp 4070 Concepts and Philosophy of Computing 5 Digi Logic Design 1 - use Gates A B O ABO Comparator Circuit – outputs a ‘1’ if A and B are equal, else ouput a ‘0’ Make each individual term 2. Combine the terms with OR gate 3. Look for lines with out = ‘1’ 1.
CBP 2006Comp 4070 Concepts and Philosophy of Computing 6 … again with Boolean Algebra ABO A.B __ A.B + A.B __ A.B __ B A A B _ _ “Not A and Not B” “A and B”
CBP 2006Comp 4070 Concepts and Philosophy of Computing 7 Address Decoder Exercise AB O1O1 O2O2 O3O3 O4O A B O1 O2 O3 O4 O1 = A.B _ _ A B
CBP 2006Comp 4070 Concepts and Philosophy of Computing 8 r0 Decoder Application r1 r2 r0 X Y W XY W Selecting Registers, e.g, add r2,r1,r0 MIPS has 5-bit fields for registers, so are 32 addrdrsrtunused 0 cs r0 Registers decoder
CBP 2006Comp 4070 Concepts and Philosophy of Computing 9 ABC General Product
CBP 2006Comp 4070 Concepts and Philosophy of Computing 10 MUX Exercise CABO A B Op C A B O C = 0 A B O C = 1 What is MUX doing here ?
CBP 2006Comp 4070 Concepts and Philosophy of Computing 11 MUX is a Selector A B Op C CABO
CBP 2006Comp 4070 Concepts and Philosophy of Computing 12 A B C
CBP 2006Comp 4070 Concepts and Philosophy of Computing 13 Multibit MUX A B O C A B C
CBP 2006Comp 4070 Concepts and Philosophy of Computing 14 MUX Application ALU Y’ Y Selection of Datapath into one ALU input. Datapath Y from instruction add r2,r0,r1 Datapth Y’ from instruction addi r2,r0,4 Sam has been designed so all immediate constants come in via Y’ addrdrsrtunused Immediate bit of op-code
CBP 2006Comp 4070 Concepts and Philosophy of Computing 15 Digi design 2 - use MUXes ABO 00I1 01I2 10I3 11I4 A B Op In 0 In 1 In 2 In 3 ABO A B Op “ Muxes can be used to implement arbitrary combinatorial circuits “
CBP 2006Comp 4070 Concepts and Philosophy of Computing 16 MUX Design Exercise 3 input parity detector ABCO
CBP 2006Comp 4070 Concepts and Philosophy of Computing 17 Programmable Logic Arrays Fuse
CBP 2006Comp 4070 Concepts and Philosophy of Computing 18 Extending da Number of Bits A B Out A B Out Some function A B Out 2 N-bits ( = N wires)
CBP 2006Comp 4070 Concepts and Philosophy of Computing 19 Designing Using ROM/RAM A B Out A B Out decoder A B Out 1 Out 2 Several MUX’es fed with the same A,B input produces a multibit output. This looks like a ROM
CBP 2006Comp 4070 Concepts and Philosophy of Computing 20 Let’s Build an ALU + B A Carry In Carry Out S1 S Logical Functions 2.Arithmetic Functions 3.MUX – Selection of Function.
CBP 2006Comp 4070 Concepts and Philosophy of Computing 21 Sequential Circuits Traffic Lights Washing Machines Fetch-Execute Cycle
CBP 2006Comp 4070 Concepts and Philosophy of Computing 22 Circuits with Memory 1 1 ABO
CBP 2006Comp 4070 Concepts and Philosophy of Computing 23 Set Reset Q
CBP 2006Comp 4070 Concepts and Philosophy of Computing 24 Counters T0T1T2T3T Clock 4-bit Counter (4) Reset How to get this to sequence ?
CBP 2006Comp 4070 Concepts and Philosophy of Computing 25 Traffic Light Sequencing Clock 4-bit Counter (4) Reset T0T1T2T3 Combinatorial Logic T2 T3 T0 T1
CBP 2006Comp 4070 Concepts and Philosophy of Computing 26 Fetch Execute Sequencing T1T2T3T4T5 Fetch Decode, Reg Op ALU Op Mem Access Reg Write ALU ALU Counter Decoder Clock Data Memory Code Memory AL U X Y W XY W 0 1 7
CBP 2006Comp 4070 Concepts and Philosophy of Computing 27 ALU Memregs Application Functional Blocks Gates Transistors
CBP 2006Comp 4070 Concepts and Philosophy of Computing 28 N-MOS in P-MOS in CMOS : Complementary Transistors
CBP 2006Comp 4070 Concepts and Philosophy of Computing 29 N-MOS In = 0 In = 1 P-MOS In = 1 In = 0 Transistors are Switches
CBP 2006Comp 4070 Concepts and Philosophy of Computing in out Transistor Symbols Logic Gate Symbol Inverter
CBP 2006Comp 4070 Concepts and Philosophy of Computing B AB A out 1 0 ABO What’s this?