Logic Circuit Design Teacher 1 : Wei-Ru Lai ( 賴薇如 ) wrlai@saturn.yzu.edu.tw Room: 70812...

Preview:

Citation preview

Logic Circuit Design

Teacher 1 : Wei-Ru Lai ( 賴薇如 )

wrlai@saturn.yzu.edu.tw

Room: 70812 Telphone: 7330

Teacher 2 : Yawgeng Chau( 趙燿庚老師 )

eeyaw@saturn.yzu.edu.tw

Text Book and Reference

Textbook– M. Morris Mano and Michael D. Ciletti, Digital

Design, 4th edition, Pearson Education.

Reference book– Charles H. Roth, Jr., Fundamentals of Logic Design,

5th edition, West Publishing Co., 1992.– A First Course in Digital System Design, An Integrated

Approach, John P. Uyemura, Georgia Institute of Technology. Books/Cole Publishing Company

Course Time

Class A– Thursday 7,8,9 (14:10 - 17:00)– Classroom: 70205

Class B– Monday 7,8,9 (14:10 - 17:00)– Classroom: 70207

Office Hour– Monday, Wednesday 13:10-14:30 70812R

Teacher Assistants

林群揚– Office: 70807 – Telephone: 7011 – 807– s984853@mail.yzu.edu.tw

陳旭峰– Office: 70826A– Telephone: 7011 – 826– s984821@mail.yzu.edu.tw

Web Site

IP address: 140.138.178.54 or pcs.eed.yzu.edu.tw– Handout, old examination questions

Portal– Information, ex: Time and place of quiz– Handout, solution of homework – Discussion

It’s necessary to check these web sites frequently.

Course Structure

Lectures with power points Quizzes and discussions Chapter-Based homework

– Announced in the Web Portal– Solution will be given later.

Exams 邏輯電路實驗 (A: 施正遠老師 Mon. 2,3,4;

B: 郭李瑞老師 Thur. 6,7,8)

Evaluation 賴薇如老師 50%

– Class Show-Up (4%)– Quizzes(10%)– Tests (8%*2=16%) (3/31,4/14, 13:00-13:50)– Mid exam (20%)

趙耀庚老師 50%– Class Show-up (4%)– Text (8%*2=16%)– Final exam (30%)

Requirements for Class

Take your textbook in class. Take notes in class. Ask questions if you don’t understand. Do your homework by yourself. Don’t chat in class.

Esteem your teachers, TAs and classmates.

Change Your Mindset (1/2)

Adapt yourself to the new environments, new teachers, and new teaching methods.

If you have any suggestion, tell me as soon as possible.

Read the textbook written in English. You should spend a lot of times in this

course.

Change Your Mindset (2/2)

用功不是不缺席與寫作業而已,還包括要預習、 複習、 不懂時要肯發問、 寫錯答案要更正,要學會有效率的學習。

Find your favorite department. Try to achieve the basic requirements of

our departments.

必修主科段考均應嚴格監考 包括助教在內,要有兩人以上監考。 隨機排定考試座位表。 考生桌面只有紙筆等應考物品,手機書包等一律放教

室四周。 發完考卷後,強調將嚴格監考,發現考試作弊者將一

律依校規退學,並宣讀『誠實考試宣言』如下 : 我 ( 考生簽名 ) ,秉持誠實考試之原則,在此

宣告本次 XXX 考試,絕對遵守考試規則不作弊,否則願受最嚴厲之校規處置 ( 退學 ) !

在『考試座位表』及『誠實考試宣言』 簽名。

What is About This Course?

Logic Circuit Design

Digital Computer

program

data

Wireless Phone

RF : Radio Frequency AD : Analog-to-Digital DA : Digital-to-Analog BB : Baseband DSP : Digital Signal Processing RAM : Random Access Memory ROM : Read Only Memory

Photos

File: 982LogicRequirement-photo.ppt http://www.ee.yzu.edu.tw/YZUEE.asp?

screenwidth=1024&ScreenHeight=738 電機系微電腦實驗 電機系、光電系電子電路實驗期末太陽能車競賽

Logic Circuit Design

Digital electronic circuits are the engines of cell phones, MPEG players, digital cameras, computers, data servers, personal digital devices, GPS displays, and many other consumer products that process and use information in a digital format.

Logic Circuit Design is an introductory course for the above industries.

邏輯電路設計在課程中的定位

微電腦系統

大二上

微電腦實驗

大二下 大三上

嵌入式系統原理及實驗

大三下 大四上

VHDL 設計

電子電路實驗( 二 )

大四下

數位系統設

計與實驗

大一上 大一下

計算機概論

程式 設計

邏輯電路設計

電子學邏輯電路實驗

電子電路實驗( 一 )

高階數位IC設計

超大型積體電路設計導論

計算機組織

What is the meaning of “Digital”?

Digit: the Latin word for finger (counting on the fingers) as these are

used for discrete counting.

Digital Definition

Digit: – A toe or finger– A unit of linear measure equal to inch, based on the

breadth of a finger – Any numeral from 0 to 9: so called because

originally counted on the fingers

A digital system is one that uses discrete values rather than a continuous spectrum of values: compare analog.

Analog ( 類比 ) vs. Digital ( 數位 ) Analog system

– The physical quantities or signals may vary continuously over a specified range.

Digital system– The physical quantities or signals can assume only

discrete values.

0 1 2 3 3 0 3 2 3 2 0... 0 0 0 1 1 0 1 1 1 1 0 0 1 1 1 0 1 1 1 0...

Analog vs. Digital Signals

Analog Signals

All nature signals are analog.– Human voice, electromagnetic wave of handset,

photograph, voice sent from handset, watercolor

It is intuitive to handle analog signals for storage, computation, and communication etc.

Digital Signals

Define a nature signal as 0 or 1. We can interpret, store, send/receive or

perform some operations on 0 and 1.

logic 0

logic 1

volt

1

2

3

4

5

0

Unknown0 1 0 1

Analog or Digital?

The differences between analog systems and digital systems are the idea to view and process the data.– Analog view: every amplitude is meaningful in

every moment. Every qualify between 0-5V is meaningful.

– Digital view: only 0 & 1

Signal Distortion

Distortion( 失真 ): the wave is distorted due to attenuation or noise.

If an analog signal is distorted (i.e., we treat the signal as an analog signal), it is difficult to regenerate a original one.

source

distorted data

Accuracy

Operation in analog systems: the error (i.e., distortion) will be accumulated. – Ex: to compute 6 mV *100=600 mV. – These is an error 0.1 mV. – Finally, 5.9mV *100=590 mV

Operation in digital systems: the error will not be accumulated.– Ex: 1102*11001002=1001011002

– Digital systems are capable of greater accuracy.

Advantages of Digital Signals

It is easy to distinguish between 0 and 1 even though the digital signal is distorted.

Distorted digital signal can be regenerated. Special encoding schemes is used for error

detection or error correction Encryption can prevent from

eavesdropping. 01010011

even parity0 1 0 1

More and More Digital Systems

Programmable digital devices Dramatic cost reductions Reliability of data storage or

communication by using error-correcting codes

The interconnection of smaller digital modules forms a larger system.

Digitalize (數位化) Binary system, only 0 &1! Try to transfer the nature signal to a series of

0s and 1s.– Discrete elements of information are represented

with groups of bits are called binary codes (i.e., a pattern of 0’s and 1’s).

• Ex: 510=01012

• Ex: A=0100 0001 (41H)

– Therefore, binary system is enough.

Example: Audio System

Analog data

Digital data

Sampling ( 取樣 )

To achieve some discrete values from the originally continuous signals is called as sampling.

These discrete values are called discrete signal(離散信號) or samples (取樣點) .

Sampling rate (取樣頻率) is the times to achieve discrete signals per second.– Ex: If we get 8000 samples per second, the sampling

rate is 8000Hz.

Quantization ( 量化 )

If the length of 0/1 bit stream is finite, the number of amplitude quantities that can be represented by these bit streams ( referred to quantization level 量化準位) is finite.

To find a relative level for each sample is called quantization (量化) .

The distance between the sample and its quantization level is called quantization error(量化誤差) .

Coding ( 編碼 )

Coding (編碼): use a series of 0s and 1s to represent every quantization level.

Pulse Code Modulation ( PCM ) used in PSTN is 8-bit coding and 256 quantization level.

The sampling rate is 8000Hz. 64,000 bits are sent per second. That is, the data rate is 64,000bps.

Opera may need 128kbps or more.

Sampling Theorem ( 取樣定理 )

Sampling Theorem (取樣定理) or Nyquist Theorem : Sampling rate must be twice (or more) of the original data rates.

For example, the frequency of human voice is about 300-3400Hz. Then the sampling rate in PSTN is 8000Hz.

Digital System

A digital system is an electronic network that manipulates discrete elements of information represented internally in binary form.

– Ex: answer machine, video game, CD

The work of digital systems1. Transfer analog signals to digital signals.

2. Perform operations by 0 and 1.

3. Transfer the results to analog signals.

Example of an Elevator

How to store the number of floor? How to control sensors and motors? Up? down?

5 10

4 9

3 8

2 7

1 6

B1

▼ ▲

? up on

at 4th floor

0100

4

Coding and Encode

Translate a signal from “bottom” to a binary number

5 10

4 9

3 8

2 7

1 6

B1

▼ ▲

0110

on

B1 1111

0 0000

1 0001

2 0010

3 0011

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

10 1010at 4th floor

4 16-to-4 encoder?

Encoder

8-to-3 encoder

1 3 5 7

2 3 6 7

4 5 6 7

z D D D D

y D D D D

x D D D D

x y z

D0 D1 D2 D3 D4 D5 D6 D7

Store the Binary Numbers

Using a four-bit register

5 10

4 9

3 8

2 7

1 6

B1

▼ ▲

at 4th floor

0100

11

0

0

0

0

0

0

4

D Flip-flop

To store 0 or 1.

Comparator/Subtractor

Up? down?

5 10

4 9

3 8

2 7

1 6

B1

▼ ▲

? up0110

at 4th floor

0100

4

4-bit Comparator

A 0100

B 0110

1

0

0

0

1

0

1

0

A < B → up

1

0

0

4-bit Binary Counter

5 10

4 9

3 8

2 7

1 6

B1

▼ ▲

at 9th floor

5

50101 1111→

0000→0001→ 0010→0011→0100→0101→0110→0111→1000→1001→1010

Binary Counter

Four-bit synchronous binary counter

0000→0001→0010→0011→0100→0101→0110→ … →1101 →1110→1111

7-Segment

7447At floor 5

510=01012

7447: BCD-to-seven-segment decoder

7730: Seven-segment LED display

Figure 11.8

abcdefg

abcdefg

ABCD

1010

a

b

ce

gf

d

1011

011

What is “Logic Design”?

Logic (from ancient Greek (logos), meaning reason) is the study of

arguments.

Logical Operations

Logic: the systematized interconnection of switching functions, circuits, or devices, as in electronic computers .

A bit on a switching device can be represent a logic value– 0: false vs. 1: true

– A device is On/OFF; a statement is True/False.

You can provide logic operations at bit level (a bit) or at pattern level (a byte).

Switching Devices (1/2)

Two-state devices: the output can assume only two different discrete values.– Example of switching devices: relays, diodes,

transistors.

logic 0

logic 1

volt

1

2

3

4

5

0

On

Off

Unknown

Gate

Source

Drain

Transistor

Switching Devices (2/2)

A B F

0 0 +V 0 +V +V +V 0 +V +V +V 0

Connecting several switching devices may perform operations of 0 and 1. That is, you have created a binary system.

We can use binary system to represent the circuits made by switching devices.

NAND Gate

Logic Gates

Logic Design

Logic design involves determining how to interconnect basic logic building blocks to perform a specific function.– Basic block: logic gates, latches, flip-flops– Larger blocks: additions, registers, counters, multiplexers, CPLD, FPGA

A B F

0 0 1 0 1 1 1 0 0 1 1 1

Half Adder (HA)

x + y = Sum with a Carry– Sum = A XOR B– Carry = A AND B

Half Adder

x y Carry Sum

0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0

HAx

y Carry

Sum

um

arry

Full Adder (FA) FAxy

Carry

Sum

z

Binary Adder

Combinational Circuits

The output values depend only on the present value of the inputs and not on past values.

Adder, substractor, multiplex, decoder...

Sequential Circuits

The outputs depend on the present value of the inputs and past input values.– Flip-flops, ROM/RAM

Both combinational circuits and sequential circuits are called as switching circuits.

feedback

Categories of Designs

The design of digital systems may be divided roughly into three parts– Circuit design– Logic design– System design

Circuit Design

Circuit design involves specifying the interconnection of specific components such as resistors, diodes, and transistors to form logic gates, flip-flops, or other basic logic building blocks.

To design Integrated circuit (IC)– Chapter 10

Electronics, VLSI (Very Large Scale Integrated circuits), Practicum of VLSI

System Design (1/2)

System design involves breaking the overall system into subsystems and specifying the characteristics of each subsystem.

•Subsystem of computer includes memory units, arithmetic units, input-output units and control units.

System Design (2/2)

Easy to design a digital system!– A large system Large blocks Small blocks

Basic block

The design of digital systems – System design, Logic design, Circuit design

Microcomputer System , Practicum of Microcomputer System, Embedded System, Digital System Design, Computer Architecture

Implement of Large Applications

Some hardware realization technologies– Combination of logic gates and ICs– Field-Programmable Gate Arrays (FPGAs)– Application specific integrated circuits (ASICs)

ASIC are designed by using HDL– to write a behavioral model of the circuit’s

functionality– then synthesizing that description into a hardware

realization in a particular technology.

Hardware Description Language

Hardware Description Language (HDL)– Verilog and VHDL– To simulate a digital system to verify its

operation before hardware is built in– to automate the design process in conjunction

with logic synthesis tools

It is introduced in Section 3.10 and used in following contents.

VHDL – Binary Adder

Theory in the Logic Design

“Logic Design” tells us the theory necessary for understanding the logic design process.

Boolean algebra: the binary number system used in the logic design.

Implement technologies of digital systems are improved fast. However, its background theory is never changed.

Text Book Content (1/2)

Contents Preface

1. Digital Systems and Binary Numbers

2. Boolean Algebra and Logic Gates

3. Gate-Level Minimization

4. Combinational Logic

5. Synchronous Sequential Logic

6. Registers and Counters

Text Book Content (2/2)7. Memory and Programmable Logic

8. Digital at the Register Transfer Level

9. Asynchronous Sequential Logic

10. Digital Integrated Circuits

11. Laboratory Experiments with Standard ICs and FPGAs

12. Standard Graphic Symbols Answers to Selected Programs Index

Conclusions

This is an interesting course. Hope you like it.