eem16 lecture 1 ucla

49
EEM16/CSM51A: Logic Design of Digital Systems Lecture #1 Introduction Prof. Danijela Cabric Fall 2013

Upload: dustin-rudiger

Post on 25-Oct-2015

185 views

Category:

Documents


1 download

DESCRIPTION

Lecture 1 power point: Logic Design of Digital Systems, Fall 2013

TRANSCRIPT

EEM16/CSM51A: Logic Design of Digital Systems

Lecture #1Introduction

Prof. Danijela CabricFall 2013

Course Staff Instructor: Danijela Cabric

Assistant Professor in EE Department Email: [email protected] Office: 56-147C Eng. IV Office Hours: Mon/Wed 9:00-10:00 or by appointment

Teaching Assistants: Tianyu Li [email protected] Wei Wu [email protected]

2

Schedule

3

What is this course about? How to make complex digital systems (e.g. computers) from

simpler primitives (“logic gates”)? Get both practical perspective and theoretical understanding

Description and design of digital systems such as computers Formal basis in switching algebra Implementation aspects: modules and network of modules Implementation of algorithms in hardware Course emphasis: concepts, methods, and design

4

Follow-on undergraduate classes

Digital design lab (EEM116L/CSM152A) Computer architecture (EEM116C/CSM151B) Digital design project (EEM116D/CSM152B) Digital circuits (EE115C)

5

Textbook Digital Design: A Systems Approach

(Hardcover) William J. Dally and R. Curtis Harting Cambridge University Press. ISBN:9780521199506 Available at

ASUCLA On-line stores such as Amazon.com

Note: lecture slides will have material

from other sources as well

6

Course Web Site

Hosted on courseweb https://courseweb.seas.ucla.edu/

Login using your BOL account id and password Copies of handouts, homeworks, exams etc.

7

On-line Q&A and Discussion at Piazza

8

What is Piazza? On-line platform that seeks to simulate real class discussion Students can post questions (even anonymously), and collaborate to

edit responses to these questions. Instructors can also answer questions, endorse student answers, and

edit or delete any posted content. Signing up

piazza.com/ucla/fall2013/eem16 You should have received email invitation from me You should have configured it based on your needs

Do not email questions about homeworks etc. you need to use Piazza! We will make any announcements on Piazza only

Syllabus

9

Week Date Day Lecture Due Reading

1

Sep 26

Thu Introduction about Digital Systems

Ch. 1

2Oct 1 Tue Boolean algebra Ch. 3

Oct 3 Thu Combinational logic design Ch. 6

3Oct 8 Tue Combinational building

blocks Ch. 8

Oct 10

Thu Combinational building blocks

HW#1 Ch. 8

4

Oct 15

Tue Arithmetic circuits Ch. 19

Oct 17

Thu Arithmetic circuits Ch. 10

5

Oct 22

Tue Fixed and Floating point numbers

Ch. 11

Oct 24

Thu Sequential logic HW#2 Ch. 14

Syllabus

10

Grading Homeworks (20%)

4 homeworks (both theoretical and small simulation/design projects) Due at the end of the lecture No late homeworks accepted

Project (10%) Design of a digital system and simulation using LogiSim

Midterm (30%) Week 6, Oct 29 (Tue) In class, closed book

Final (40%) December 10 In class, closed book, cumulative

11

Homework Logistics

You are responsible for downloading and printing the homework sheet

Submitted in hard copy format only Due in class (by the end of the lecture) No late submission policy Homework pickup in discussion sections

Please write your discussion section next to your name if you want your HW back

12

Project We will be using LogiSim: a graphical tool for designing and

simulation of digital logic circuits

13

Download it (version 2.7) today from http://ozark.hendrix.edu/~burch/logisim/designing and simulation digital logic circuits

You will need Java 5 or newer, download from http://www.java.com/en/

Tutorials

You must read the following documentation from Logisim’s website Beginner's Tutorial The Guide to Being a Logisim User Library Reference (refer to it as you go along)

14

Course Logistics: Cheating and Plagiarism What is cheating & plagiarism?

Acting dishonestly, practicing fraud Using other people’s writings or ideas without permission

• E.g. from other students, other sources such as web sites, solutions from elsewhere• Note that it doesn’t have to be literal copying – stealing ideas but presenting in a

different style is still cheating and plagiarism. Individual assignments must be done individually, team assignments must

be done by the team members While it is okay to clarify from others as to what a question “means”, it is in

general not okay to discuss or share solution approaches, and never okay to share actual solutions

Person aiding in cheating & plagiarism is equally guilty, and will be similarly penalized

For more information: UCLA’s Academic Integrity Policy: http://www.deanofstudents.ucla.edu/integrity.htmlInteractive tutorial: http://www.library.ucla.edu/bruinsuccess/

15

To-Do List

Download and install Logisim, and read the documentation

Make sure you are signed up for Piazza Download lecture slides from courseweb Read D&H sections corresponding to each class

Skim through them before the class in which we discuss a module

Then do an in depth read after the class

16

Chapter 1

Introduction

Outline

What is a digital system? How does it differ from an analog system? Why are digital systems important? Basic types of digital systems: combinational and

sequential Specification and implementation of digital systems Analysis and design of digital systems

18

System

Systems and Signals

Signals are some value (e.g. temperature) as a function of time System transforms input into a desired output Signals and systems may be mechanical, pneumatic, hydraulic, chemical,

electrical, electromagnetic, photonic, … Usually possible to convert from one form to another

We’re primarily interested in systems for Information processing (text, audio, video), e.g. PC, TV, camera, music player Transmission (communication), e.g. Ethernet, cable modems, cell phones Storage, e.g. memory

Input Signals Output Signals

19

Analog vs. Digital Systems and Signals

Analog Systems Inputs & outputs take values

from a continuous set

Digital Systems Inputs & outputs take a finite

number of discrete values

20

Examples

Analog Digital

21

ExamplesAnalog Digital

22

Examples

Analog Digital

23

Many other

Digital watch Digital scale Calculator Computer Video games DVD player HDTV

24

25(c) 2005-2012, W. J. Dally

Representing Information with Digital Signals

Binary Information Light On/Off: 1/0

Element of a set000 White001 Red010 Blue011 Yellow

100 Purple101 Orange110 Green111 Black

Continuous Quantities

000 68001 70010 72011 74

100 76101 78110 80111 82

0000000 680000001 700000011 720000111 74

0001111 760011111 780111111 801111111 82

Digital Signal Representation In all digital systems, digital signals are represented as vectors of

binary numbers Each discrete value corresponds to a different binary number {0,1}

digit 0 1 2 3 4 5 6 7 8 9 vector 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001

E.g. we want temperature to be with 100 discrete values, therefore we need to express it as 7-bit binary number

Question: We want to express temperature in the range [0, 50] ℃to two decimal places. How many bits would we need?

Why binary numbers? Easy to implement!

26

Analog vs. Digital Signals Important point: electrical signals are really analog, it is just how

we choose to interpret them

Analog signals can degrade due to non-linearity and noise as they are processed, stored, communicated Digital signals are insensitive to these variations, furthermore we can detect and even correct for degradation

27

28(c) 2005-2012, W. J. Dally

Effect of Noise on Analog & Digital Signals

VInput +

Noise

V+f

f(V+Output

Noise added to Input Error at Output

Analog Signals

Digital Signals

V1Input +

Noise

V1+f

f(V1) Output

Noise added to Input < Noise Margin Correct Value at Output

29(c) 2005-2012, W. J. Dally

Input & Output Voltage Ranges

30(c) 2005-2012, W. J. Dally

Restoration of Digital Signals

Noise

+

Noise Accumulation

Va +

Noise

+

Va +Va

Noise

+

Noise

+

Va +

Noise

+

Va + Va Va

Noise

+

Va +Va Va

Signal Restoration

Va +

31(c) 2005-2012, W. J. Dally

DC Transfer Curve for a Logic Module

Sampling Thus far we’ve talked only about quantization of value What about time? Continuous vs. Discrete time

A discrete time signal is a time series that has been sampled from a continuous time signal

Each value in the sequence is called a sample If sampling instances are uniformly spaced, then we have a sampling rate

32

Sampling + Quantization A synchronous digital signal is a discrete-time signal that takes only

a discrete set of values It is typically derived from a discrete-time signal that has been

quantized Usually # of quantization levels (i.e. # of different discrete values) is a

power of 2 (why?)

Quantization

Discrete-time Analog Signal Synchronous Digital Signal33

Why are Digital Systems Important? Used to process, store, communicate numerical & non-numerical

information Numbers, text, audio, images, video, sensor measurements etc.

Digital signals are more robust to noise & manufacturing variations Information processing can be performed with a general purpose system

(a computer) no need to create different systems for each task

Semiconductor ICs permit creation of cheap, tiny, complex, and reliable systems for processing, storage, and communicating digital information Binary electrical signals can be processed by simple transistor switches Digital systems built as integrated circuits (ICs) composed of a large number of

very simple devices Permit very sophisticated handling of large amounts of information

34

Why are Digital Systems Important?

Different implementations of systems which trade-off speed and amount of hardware (cost)

35

Why are Digital Systems Important? Analog-to-digital (A/D) and digital-to-analog (D/A) converter

circuits permit going back-and forth between analog and digital domains

A/D parameters Two design parameters: What sampling rate? How many bits of

resolution?

36

A/D and D/A conversion The famous Nyquist-Shannon Sampling Theorem says

that under certain conditions if one samples at higher than a critical rate, there is no loss of information when converting from analog to discrete-time signal- i.e. one can reconstruct the original analog signal- barring any quantization error, which can lowered by having more bits

Basis for many mixed analog/digital systems

37

Two Classes of Digital Systems Combinational Systems

Output at time t depends only on the input at time t

i.e. no memory

38

Sequential Systems Output at time t depends on the input at time t and also on input at times prior to t i.e. system has memory

z(t) = F(x(t)) z(t) = F(x(0,t))

Example

39

• Output is a function of current input• Example – digital thermostat

Example

40

• Includes state (memory, storage)• Makes output a function of history as well as current inputs• Synchronous sequential logic uses a clock• Example, calendar circuit

Reg

iste

r 4

TodayMonth

5

TodayDoM

3

TodayDoW

Clock

Com

pute

Tom

orro

w

TomorrowMonth

4

TomorrowDoM

5

TomorrowDoW

3

41(c) 2005-2012, W. J. Dally

o = f(i)

Combinational logic is memoryless

42(c) 2005-2012, W. J. Dally

Can compose digital circuits

Thermostat

Calendar=

TodayDoW

Sunday

ItsSunday

TempHigh

ItsNotSundayFanOn

NOT AND

43(c) 2005-2012, W. J. Dally

Closure

Combinational logic circuits are closed under acyclic composition.

CL1

CL2

CL12

What is involved in creating a digital system?

44

Implementation

Specification

Synthesis(Design) Analysis

Specification Description of system’s

1. function2. relevant characteristics (power, speed etc.)

Specification tells what does the system do, without telling how it does it e.g. “find roots of polynomial” but not “which algorithm” or

“what hardware” Good specification is

complete unambiguous adequate to use the system as a component in a more complex

system adequate to serve as a basis to implement the system

45

Implementation Constructing the system from simpler

components In digital systems, the implementation is as a

digital network of simpler digital modules that are interconnected

Implementation can be at many levels, depending on what the primitive modules are

Ultimately all digital systems are networks of transistors

But it would be impractical to design and analyze big systems this way

- e.g. modern processors have billions of transistors, and describing them as network of transistors would be akin to describing our bodies in terms of characteristics and position of difference cells!

Coping with implementation complexity: hierarchy, standard modules, and interconnect rules

46

Structured Analysis and Design Analysis: determining what a system does (i.e.

specification) from its implementation Complex systems require multilevel analysis

Design: obtaining an implementation that satisfies the specifications Complex systems require multilevel design Two approaches to design

Top-down: decompose system into modules, then each module into even simpler modules, and so on until the reach modules with known implementations

Bottom-up: connect available modules into more complex modules, then connect them into even more complex modules, and so on until system specifications are fulfilled

47

Top-down vs. Bottom-up approach

48

Levels of Implementation:Module, Logical and Physical

49