ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Week 1 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering
Instructor: Dr. Srinivas Shakkottai! Office 332C WEB! Office Hours: Wed 2:00PM-3:00 PM, Fri 2:00 PM 3:00 PM! Email: User: sshakkot at Domain: tamu.edu! Lab Timings: check section! No lab this week.
Required textbook: Brown and Vranesic (3 rd Edition) Fundamentals of Digital Logic with Verilog Design.
Reference textbook: "Digital Design: Principles and Practices" by John Wakerly. "Contemporary Logic Design by Randy Katz.
Course info Mailing list:! Emails will be sent periodically to tamu accounts! Announcements: n Lecture cancellations n Deadline extension n Updates, etc. Course website! http://cesg.tamu.edu/courses/ecen-248-digitalsystems-design/! All slides, labs, assignments, etc.
Grading Policy: 5% Homework assignments. 10% Quizzes. 20% Laboratory. 20% Exam 1. 20% Exam 2. 25% Exam 3.
Grading scale A standard grading scale will be utilized. The tentative grading scale for the course is: A 90-100% B 80-89% C 70-79% D 60-69% F Below 59%
Course Goals Study methods for! Representation, manipulation, and optimization for both combinatorial and sequential logic! Solving digital design problems! Study HDL description language (Verilog)
Topics Number bases Logic gates and Boolean Algebra Gate level minimization Combinational Logic Sequential logic (Latches, Flip-flops, Registers, and Counters) Memory and Programmable Logic HDL language (Verilog)
Verilog Stands for Verify Logic. Verilog Hardware Description Language. Procedure is to use a compiler for compiling source code written in Verilog. Subset of statements can be synthesized using logic circuits.
The Evolution of Computer Hardware When was the first transistor invented? Modern-day electronics began with the invention in 1947 of the transfer resistor - the bi-polar transistor - by Bardeen et.al at Bell Laboratories
The Evolution of Computer Hardware When was the first IC (integrated circuit) invented? In 1958 the IC was born when Jack Kilby at Texas Instruments successfully interconnected, by hand, several transistors, resistors and capacitors on a single substrate
The Underlying Technologies Year Technology Relative Perf./Unit Cost 1951 Vacuum Tube 1 1965 Transistor 35 1975 Integrated Circuit (IC) 900 1995 Very Large Scale IC (VLSI) 2,400,000 2005 Ultra VLSI 6,200,000,000
The PowerPC 750 Introduced in 1999 3.65M transistors 366 MHz clock rate 40 mm 2 die size 250nm technology
Layers of abstraction Software Hardware Application (ex: browser) Compiler Assembler Processor Memory Digital Design Circuit Design transistors Operating System (Mac OSX) Datapath & Control I/O system Instruction Set Architecture ECEN 248
Technology Trends: Microprocessor Complexity 100000000 Itanium 2: 41 Million Athlon (K7): 22 Million 10000000 1000000 Moore s Law i8 0386 i8 0486 Pentium Alpha 21264: 15 million Pentium Pro: 5.5 million PowerPC 620: 6.9 million Alpha 21164: 9.3 million Sparc Ultra: 5.2 million 100000 i8 0286 10000 i8 086 2X transistors/chip Every 1.5 years i8 080 i4 004 1000 1970 1975 1980 1985 1990 1995 2000 Year Called Moore s Law
NUMBER SYSTEMS
Overview Understanding decimal numbers Binary and octal numbers! The basis of computers! Conversion between different number systems
Digital Computer Systems Digital systems consider discrete amounts of data. Examples! 26 letters in the alphabet! 10 decimal digits Larger quantities can be built from discrete values:! Words made of letters! Numbers made of decimal digits (e.g. 239875.32) Computers operate on binary values (0 and 1) Easy to represent binary values electrically! Voltages and currents.! Can be implemented using circuits! Create the building blocks of modern computers
Understanding Decimal Numbers Decimal numbers are made of decimal digits: (0,1,2,3,4,5,6,7,8,9) Number representation:! 8653 = 8x10 3 + 6x10 2 + 5x10 1 + 3x10 0 What about fractions?! 97654.35 = 9x10 4 + 7x10 3 + 6x10 2 + 5x10 1 + 4x10 0 + 3x10-1 + 5x10-2! Informal notation à (97654.35) 10
Understanding Octal Numbers Octal numbers are made of octal digits: (0,1,2,3,4,5,6,7) Number representation:! (4536) 8 = 4x8 3 + 5x8 2 + 3x8 1 + 6x8 0 = (2398) 10 What about fractions?! (465.27) 8 = 4x8 2 + 6x8 1 + 5x8 0 + 2x8-1 + 7x8-2 Octal numbers don t use digits 8 or 9
Understanding Binary Numbers Binary numbers are made of binary digits (bits):! 0 and 1 Number representation:! (1011) 2 = 1x2 3 + 0x2 2 + 1x2 1 + 1x2 0 = (11) 10 What about fractions?! (110.10) 2 = 1x2 2 + 1x2 1 + 0x2 0 + 1x2-1 + 0x2-2 Groups of eight bits are called a byte! (11001001) 2 Groups of four bits are called a nibble.! (1101) 2
Why Use Binary Numbers? Easy to represent 0 and 1 using electrical values. Possible to tolerate noise. Easy to transmit data Easy to build binary circuits. AND Gate 1 0 0
Conversion Between Number Bases Octal(base 8)! Decimal(base 10)! Binary(base 2)! Hexadecimal! (base16)!
Convert an Integer from Decimal to Another Base For each digit position: 1. Divide decimal number by the base (e.g. 2) 2. The remainder is the lowest-order digit 3. Repeat first two steps until no divisor remains. Example for (13) 10: Integer Remainder Coefficient Quotient 13/2 = 6 1 a 0 = 1 6/2 = 3 0 a 1 = 0 3/2 = 1 1 a 2 = 1 1/2 = 0 1 a 3 = 1 Answer (13) 10 = (a 3 a 2 a 1 a 0 ) 2 = (1101) 2
Convert a Fraction from Decimal to Another Base For each digit position: 1. Multiply decimal number by the base (e.g. 2) 2. The integer is the highest-order digit 3. Repeat first two steps until fraction becomes zero. Example for (0.625) 10: Integer Fraction Coefficient 0.625 x 2 = 1 + 0.25 a -1 = 1 0.250 x 2 = 0 + 0.50 a -2 = 0 0.500 x 2 = 1 + 0 a -3 = 1 Answer (0.625) 10 = (0.a -1 a -2 a -3 ) 2 = (0.101) 2
The Growth of Binary Numbers n 2 n n 2 n 0 2 0 =1 1 2 1 =2 8 2 8 =256 9 2 9 =512 2 2 2 =4 10 2 10 =1024 Kilo 3 2 3 =8 11 2 11 =2048 4 2 4 =16 12 2 12 =4096 5 2 5 =32 6 2 6 =64 7 2 7 =128 20 2 20 =1M 30 2 30 =1G 40 2 40 =1T Mega Giga Tera
Binary Arithmetic
Binary Addition Binary addition is very simple. This is best shown in an example of adding two binary numbers 1 1 1 1 1 1 1 0 1 + 1 0 1 1 1 --------------------- 1 0 1 0 1 0 0 1 1 1 carries
Binary Subtraction We can also perform subtraction (with borrows in place of carries). Let s subtract (10111) 2 from (1001101) 2 1 10 0 10 10 0 0 10 borrows 1 0 0 1 1 0 1-1 0 1 1 1 ------------------------ 1 1 0 1 1 0
Binary Multiplication Binary multiplication is much the same as decimal multiplication, except that the multiplication operations are much simpler 1 0 1 1 1 X 1 0 1 0 ----------------------- 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 ----------------------- 1 1 1 0 0 1 1 0
Digital Systems
Binary Data Storage Binary cells store individual bits of data Multiple cells form a register. Data in registers can indicate different values Hex (decimal) BCD ASCII 0 0 1 0 1 0 1 1 Binary Cell
Register Transfer Data can move from register to register. Digital logic used to process data. We will learn to design this logic. Register A Register B Digital Logic Circuits Register C
Digital Systems Analysis problem: Inputs Logic Circuit Outputs! Determine binary outputs for each combination of inputs Design problem: given a task, develop a circuit that accomplishes the task! Many possible implementations.! Try to develop best circuit based on some criterion (size, power, performance, etc.)
Toll Booth Controller Consider the design of a toll booth controller. Inputs: quarter, car sensor. Outputs: gate lift signal, gate close signal $ 25 Car? Logic Circuit Raise gate Close gate If driver pitches in quarter, raise gate. When car has cleared gate, close gate.
Gates
Describing Circuit Functionality: Inverter Truth Table A Y A Y 0 1 1 0 Symbol Basic logic functions have symbols. The same functionality can be represented with truth tables! Truth table completely specifies outputs for all input combinations. The above circuit is an inverter.! An input of 0 is inverted to a 1.! An input of 1 is inverted to a 0. Input Output
The AND Gate A B Y This is an AND gate. So, if the two inputs signals are asserted (high) the output will also be asserted. Otherwise, the output will be deasserted (low). Truth Table A B Y 0 0 0 0 1 0 1 0 0 1 1 1
The OR Gate A B Y This is an OR gate. So, if either of the two input signals are asserted, or both of them are, the output will be asserted. A B Y 0 0 0 0 1 1 1 0 1 1 1 1
The NAND Gate This is a NAND gate. It A is a combination of an B AND gate followed by Y an inverter. Its truth table shows this. A B Y 0 0 1 0 1 1 1 0 1 1 1 0
The NOR Gate A B This is a NOR gate. It is a combination of an OR gate followed by an inverter. It s truth table shows this A B Y Y 0 0 1 0 1 0 1 0 0 1 1 0
The XOR Gate (Exclusive-OR) A B Y This is a XOR gate. XOR gates assert their output when exactly one of the inputs is asserted, hence the name. The switching algebra symbol A B Y 0 0 0 0 1 1 1 0 1 1 1 0 for this operation is, i.e. 1 1 = 0 and 1 0 = 1.
Describing Circuit Functionality: Waveforms AND Gate A B Y 0 0 0 0 1 0 1 0 0 1 1 1 Waveforms provide another approach for representing functionality. Values are either high (logic 1) or low (logic 0). Can you create a truth table from the waveforms?
Consider three-input gates 3 Input OR Gate
Ordering Boolean Functions How to interpret A B+C?! Is it A B ORed with C?! Is it A ANDed with B+C? Order of precedence for Boolean algebra: AND before OR. Note that parentheses are needed here :