邏輯電路設計 logic circuit design 教師:賴薇如 [email protected] office: 2307...
Post on 20-Dec-2015
261 views
TRANSCRIPT
![Page 1: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/1.jpg)
邏輯電路設計
Logic Circuit Design教師:賴薇如
Office: 2307 Telephone:2431
Lab: 3412 Telephone:2414-35
![Page 2: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/2.jpg)
Text Book and Reference
Textbook– Charles H. Roth, Jr., Fundamentals of Logic
Design, 5th edition, West Publishing Co., 1992.
Reference book– A First Course in Digital System Design, An
Integrated Approach, John P. Uyemura, Georgia Institute of Technology. Books/Cole Publishing Company
![Page 3: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/3.jpg)
Course Time
B 班– Monday 8 (3:10 - 4:00) – Friday 1,2 (8:10 - 10:00)
Classroom: 2008 Office Hour: Wednesday 13:10-14:30
3412R
![Page 4: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/4.jpg)
Teacher Assistant
周旭陵 , 彭健倫– 3412R – Tel: 2415 – 35
如果你缺乏計算紙或作業紙 , 可以到 3412 領取 .
![Page 5: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/5.jpg)
Web Site
IP address: 140.138.137.171 or pcs.eed.yzu.edu.tw–上課講義 ,考古題
Portal–公布作業與解答–學習與討論–最新資訊 , ex: 考試時間與地點
請一定要上網參考這些資料
![Page 6: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/6.jpg)
上課要求 上課請帶課本 儘量作筆記 上課請不要私下說話,開手機 , 有問題請馬上發問
每個 Unit 上完後 , 下一次上課前交作業 請按時交作業 請尊重你的老師 ,助教與同學
![Page 7: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/7.jpg)
心態的改變 適應新環境,新老師,新的教法 請唸英文原文書 唸書的時間應該比老師準備的時間長 作業自己寫, 程式自己寫 不用功一定會付出代價 唸書的目的, 為自己的未來唸書 選擇你喜歡的科系, 尊重你的選擇 努力去具備系上要求的基本能力
![Page 8: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/8.jpg)
Evaluation
Class Presentation (10%) Homework (2%*10=20%) Quizzes (7%*4=28%)
– 10/3, 10/24, 11/28,12/19 導師時間 Mid exam (20%) 11/9 Final exam (22%) 1/11
![Page 9: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/9.jpg)
Your Background
Do you know...– Analog ( 類比 ), digital ( 數位 )– Bit (=0/1), byte (=8 bits)– 2-state signal – 如何用自然事物表現 0/1 – binary number – 二元數字系統– Diode, transistor, TTL, CMOS...– System design, logic design, circuit design
![Page 10: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/10.jpg)
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...
![Page 11: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/11.jpg)
Analog Signals
在大自然中的信號,均以類比型態存在。 類比信號的特色是信號在時間軸上連續,也就是在任何時間點上,都會有對應的信號值。
若在傳遞的過程中信號衰減或是受到環境的干擾,造成了波形的改變,稱為失真。傳送類比的信號,必須小心保持它的波形,因為波形一旦失真後,不易回復成原始的形狀。
![Page 12: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/12.jpg)
Digital Signals
把大自然中的信號解讀成0與1。 數位化(Digitalize) :將大自然之類比信號,轉換成一群 0 與 1 的序列信號。
– 只有0 與 1 的binary system。– Ex: 510=01012
logic 0
logic 1
volt
1
2
3
4
5
0
Unknown
0 1 0 1
![Page 13: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/13.jpg)
Analog or Digital? (1/2)
Analog systems 與 digital systems 的差別主要在於看待與處理資料的方式。
一個介於 0-5V 的電壓值 :– Analog view: 時間軸上每一個時間點的值都是有意義的,每一個電壓值都是有意義的。
– Digital view: only 0 & 1
![Page 14: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/14.jpg)
Analog or Digital? (2/2)
Question: 下列那一些是類比的訊號 , 那一些是數位的訊號 ?– 人聲 , 手機電磁波 , 手機傳送的聲音資料 , CD 儲存的資料
– 水彩畫 , 照相底片的資料 , 數位相機的照片 Question: 使用 analog 和 digital 方式儲存照片的優缺點 ?
Question: 使用 analog 和 digital 方式傳送聲音的優缺點 ?
![Page 15: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/15.jpg)
Advantages of Digital Signals
數位信號即使失真也容易辨別出為 0 或為 1 ,因傳送而導致的輕微的失真或衰減,可以還原(如 repeater )。
可使用特殊的編碼技術傳送資料,辨別或解讀因嚴重干擾而傳送錯誤的資料。
可使用加密技術,避免被盜拷或竊聽。 01010011
odd parity0 1 0 1
![Page 16: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/16.jpg)
Digital System
A digital system is an electronic network that “process” information using only digits to implement calculations and operations.
– Ex: 電話答錄機 , video game, CD, computer...
1. 要把外部 analog 訊號轉成 binary 的語言2. 用 0/1運算出結果3. 轉回 analog 的世界
![Page 17: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/17.jpg)
Accuracy
使用 analog 的技術做運算,失真造成的誤差會累積。– Ex: 失真造成的誤差會被放大累積
( 5.9*100=590 )。 使用 digital 的技術做運算,少量的失真可以還原。– Ex: 針對每一個 digit做運算,失真不會累積
( 1102*11001002=1001011002)。– 有比較高的正確性。
![Page 18: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/18.jpg)
Audio System
類比資料
取樣
4 12 4 24 14
編碼00000100……00001111
數位資料
量化
![Page 19: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/19.jpg)
取樣 連續的類比信號每隔固定的時間,取出一個值,稱為取樣。
原本在時間軸上連續的信號,在取樣後變成非連續的信號,被稱作離散信號( discrete signal )。
在單位時間內取樣的次數,稱為取樣頻率( sampling rate )。– 例如每秒取 8000 個數值,則取樣頻率為 8000Hz 。
![Page 20: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/20.jpg)
取樣定理 取樣定理( Sampling Theorem ,即
Nyquist Theorem ): 取樣頻率需高於所欲取樣之類比信號的最高頻率的 2倍,才能還原成原始的類此信號。
若以人類聲音為例,其頻率範圍約在 300至 3400Hz 之間,因此 PSTN 電話系統的語音信號取樣頻率為每秒 8000 次。
![Page 21: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/21.jpg)
量化 若要以有限長度 0 和 1 字串表示離散信號的振幅數值,就只能表現出有限數目的振幅數值,每個可表現的數值稱為量化準位( level )。
對於每一個取樣點的振幅,分別以最接近的量化準位來代表之,這個動作稱為量化( quantization )。
其取樣點與量化準位之間的差距,稱為量化誤差( quantization error )。
![Page 22: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/22.jpg)
編碼編碼( coding ): 以一組欲先設定的 0 或 1 所組成的數字字串,來表示所規劃的所有的量化準位。
以 PSTN常用之脈碼調變( Pulse Code Modulation , PCM )為例,是使用 8 位元編碼,共 256 個準位來表示人的聲音。取樣頻率為 8KHz ,意味著每秒傳輸 64,000 個位元,換言之,資料量的傳輸速率為64,000bps 。
![Page 23: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/23.jpg)
Questions
如何用 analog 的實體來儲存 0 與 1? 如何用 analog 的實體來進行 0 與 1 的運
算 ?– Ex: 如何可以做到 1+1=10 的目的 ?– 那一些最容易實作出的運算元件 ? 換言之是最基本的運算 ?
– Answer: AND, OR, NOT, NOR, NAND and XOR logic gates.
![Page 24: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/24.jpg)
Switching Devices (1/2)
Two-state devices: the output can assume only two different discrete values.– Example of switching devices: relays, diodes,
transistors, CMOS.
logic 0
logic 1
volt
1
2
3
4
5
0
On
Off
Unknown
Gate
Source
Drain
Transistor
![Page 25: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/25.jpg)
Switching Devices (2/2)
A B F
0 0 +V 0 +V +V +V 0 +V +V +V 0
連結 switching devices 可以造出各種 0 與1 的運算,即造出一個 binary system 。
We can use binary system to present the circuits made by switching devices.
電子學要認真學習 !
NAND Gate
![Page 26: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/26.jpg)
Circuit Design
Circuit design involves specifying the interconnection of specific components such as resistors, diodes, and transistors to form a gate, flip-flop, or other logic building block.
Integrated circuit (IC)超大型積體電路設計導論 &超大型積體電路設計實習
![Page 27: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/27.jpg)
Representation of AND, OR, XOR, and NOT Gates (1/2)
![Page 28: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/28.jpg)
Representation of AND, OR, XOR, and NOT Gates (2/2)
![Page 29: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/29.jpg)
Logic Design
Logic design involves determining how to interconnect basic logic building blocks to perform a specific function.– Block: logic gates, latches, flip-flops– Larger blocks: addition, counter, memory, multiplexer, CPLD, FPGA
A B F
0 0 1 0 1 1 1 0 0 1 1 1
![Page 30: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/30.jpg)
S-R Latch
To store 0 or 1. Use OR/NOT gates to construct a larger component!
LS
R
S
R
Q
P
Q
P
A new block
![Page 31: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/31.jpg)
Half Adder
A + B = Sum with a Carry– Sum = A XOR B– Carry = A AND B
A
BCarry
SumXOR
AND
Half Adder
A B Carry Sum
0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0
HAA
B Carry
Sum
![Page 32: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/32.jpg)
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.
技術會過時,但背後的理論基礎並不會改變。
![Page 33: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/33.jpg)
Combinational Networks
The output values depend only on the present value of the inputs and not on past values.
![Page 34: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/34.jpg)
Sequential Networks
The outputs depend on the present value of the inputs and past input values.
Basic memory elements: flip-flops feedbackmemory
![Page 35: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/35.jpg)
Switching Circuits
Both combinational networks and sequential networks are called as switching circuits.
計算機概論,數位電路實驗
![Page 36: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/36.jpg)
System Design
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.
![Page 37: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/37.jpg)
Categories of Designs
The design of digital systems may be divided roughly into three parts– Circuit design, logic design, system design
Easy to design a digital system!– Basic block Small blocks Large blocks A
large system
微電腦系統,微電腦實驗,數位系統設計,計算機組織
![Page 38: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/38.jpg)
Need to Learn for Logic Design
Number systems Boolean algebra Logic gates Combinational logic circuit design Multiplexers, decorders, and PLD Flip-Flops Sequential logic circuit design VLSI
![Page 39: 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw Office: 2307 Telephone:2431 Lab: 3412 Telephone:2414-35](https://reader033.vdocuments.net/reader033/viewer/2022061504/56649d435503460f94a1ffcf/html5/thumbnails/39.jpg)
Conclusions
This is an interesting course. Hope you like it.