Presentation is loading. Please wait.

Presentation is loading. Please wait.

邏輯電路設計 Logic Circuit Design 教師:賴薇如

Similar presentations


Presentation on theme: "邏輯電路設計 Logic Circuit Design 教師:賴薇如"— Presentation transcript:

1 邏輯電路設計 Logic Circuit Design 教師:賴薇如 wrlai@saturn.yzu.edu.tw
Office: Telephone:2431 Lab: Telephone:

2 Text Book and Reference
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

3 Course Time B班 Classroom: 2008
Monday 8 (3:10 - 4:00) Friday 1,2 (8: :00) Classroom: 2008 Office Hour: Wednesday 13:10-14: R

4 Teacher Assistant 周旭陵, 彭健倫 如果你缺乏計算紙或作業紙, 可以到 3412 領取. 3412R
Tel: 2415 – 35 如果你缺乏計算紙或作業紙, 可以到 3412 領取.

5 Web Site IP address: 140.138.137.171 or pcs.eed.yzu.edu.tw Portal
上課講義,考古題 Portal 公布作業與解答 學習與討論 最新資訊, ex: 考試時間與地點 請一定要上網參考這些資料

6 上課要求 上課請帶課本 儘量作筆記 上課請不要私下說話,開手機,有問題請馬上發問 每個Unit上完後, 下一次上課前交作業 請按時交作業
請尊重你的老師,助教與同學

7 心態的改變 適應新環境,新老師,新的教法 請唸英文原文書 唸書的時間應該比老師準備的時間長 作業自己寫, 程式自己寫 不用功一定會付出代價
唸書的目的, 為自己的未來唸書 選擇你喜歡的科系, 尊重你的選擇 努力去具備系上要求的基本能力

8 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

9 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

10 Analog vs. Digital Analog system Digital 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.

11 Analog Signals 在大自然中的信號,均以類比型態存在。
類比信號的特色是信號在時間軸上連續,也就是在任何時間點上,都會有對應的信號值。 若在傳遞的過程中信號衰減或是受到環境的干擾,造成了波形的改變,稱為失真。傳送類比的信號,必須小心保持它的波形,因為波形一旦失真後,不易回復成原始的形狀。 類比的信號在傳送中受到干擾產生的失真無法復原, 所以當傳輸距離長時, 失真會不斷累積.

12 Digital Signals 把大自然中的信號解讀成0與1。
數位化(Digitalize) :將大自然之類比信號,轉換成一群 0 與 1 的序列信號。 只有0 與 1 的binary system。 Ex: 510=01012 volt 5 4 logic 1 3 2 Unknown 1 logic 0

13 Analog or Digital? (1/2) Analog systems 與 digital systems 的差別主要在於看待與處理資料的方式。 一個介於0-5V的電壓值: Analog view: 時間軸上每一個時間點的值都是有意義的,每一個電壓值都是有意義的。 Digital view: only 0 & 1

14 Analog or Digital? (2/2) Question: 下列那一些是類比的訊號, 那一些是數位的訊號?
人聲, 手機電磁波, 手機傳送的聲音資料, CD 儲存的資料 水彩畫, 照相底片的資料, 數位相機的照片 Question: 使用 analog 和 digital 方式儲存照片的優缺點? Question: 使用 analog 和 digital 方式傳送聲音的優缺點? 我們會說 GSM 是數位系統, 為什麼要數位化? Question: 使用 analog 和 digital 的元件進行運算(加減乘除)的優缺點?

15 Advantages of Digital Signals
數位信號即使失真也容易辨別出為0或為1,因傳送而導致的輕微的失真或衰減,可以還原(如repeater)。 可使用特殊的編碼技術傳送資料,辨別或解讀因嚴重干擾而傳送錯誤的資料。 可使用加密技術,避免被盜拷或竊聽。 odd parity

16 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... 要把外部analog訊號轉成binary的語言 用0/1運算出結果 轉回analog的世界 在處理資料的過程中,維持只有0與1兩個的特性。

17 Accuracy 使用analog的技術做運算,失真造成的誤差會累積。 使用digital的技術做運算,少量的失真可以還原。
Ex: 失真造成的誤差會被放大累積(5.9*100=590)。 使用digital的技術做運算,少量的失真可以還原。 Ex: 針對每一個digit做運算,失真不會累積(1102* = )。 有比較高的正確性。

18 Audio System

19 取樣 連續的類比信號每隔固定的時間,取出一個值,稱為取樣。
原本在時間軸上連續的信號,在取樣後變成非連續的信號,被稱作離散信號(discrete signal)。 在單位時間內取樣的次數,稱為取樣頻率(sampling rate)。 例如每秒取8000個數值,則取樣頻率為8000Hz。 Sampling rate 取決於 original signal 的特性.

20 取樣定理 取樣定理(Sampling Theorem,即Nyquist Theorem): 取樣頻率需高於所欲取樣之類比信號的最高頻率的2倍,才能還原成原始的類此信號。 若以人類聲音為例,其頻率範圍約在300至3400Hz之間,因此PSTN電話系統的語音信號取樣頻率為每秒8000次。 所謂 sampling, 是周期性的 (periodically) 將在時間軸上, 連續的訊號轉成離散的訊號. 為使取得的資料能完整表達或還原成原始的類比訊號, 必需慎選 sampling rate. 所以 Nyquist sampling theorem 告訴我們最小的取樣頻率必須是原始資料速率的兩倍. 例如人的聲音的變化會落在 Hz 間, 所以用 8kHz 的速率來取樣就可以取得足夠的資訊. 取樣後會得到取樣點一個個振幅的(連續的) 數值. 然而超過 4kHz 的人聲或背景音樂, 只用 8kHz 來取樣, 只會將平常談話的聲音錄製下來, 並無法取得 full voice (太高頻的聲音), 或是音樂, 非常短猝的下雨聲等非常高頻的聲音.

21 量化 若要以有限長度 0 和 1 字串表示離散信號的振幅數值,就只能表現出有限數目的振幅數值,每個可表現的數值稱為量化準位(level)。
對於每一個取樣點的振幅,分別以最接近的量化準位來代表之,這個動作稱為量化(quantization)。 其取樣點與量化準位之間的差距,稱為量化誤差(quantization error)。 由於 sampling 的資料仍是類比連續的數值, 量化的過程便是將此振幅連續之取樣信號轉換成振幅離散之取樣信號. 第一要決定儲蓄的振幅的範圍, 第二決定每一個點要用多少的位元來表示. 但電腦不可能表示無限多種數值, 只能用近似值來表示 input. 例如只用 3 bits 來表示一個點, 在範圍 (-4,4) 間. 在此例中, 是一個以 zero 為對稱, midrise (輸入=0, 輸出為 1 或 -1) 的量化器. 每個 step size 都一樣大, 所以是 uniform quantization. (均勻量化器) 在此例中, 如果測量得到 1.3, 就必須以 2 (=101) 儲存. 這個 0.7 的誤差便稱為 quantization noise 或 granular error (粒狀誤差). 如果測量得到 5.3, 就必須以 4 (=111) 儲存. 這個 1.3 的誤差便稱為 overload error (過載誤差). 增加每一個sample 的 bit 數可增加精確度, 但會增加傳輸的頻寬. 因此 quantization 決定整體的失真情況與儲存資料使用的頻寬. Quantization noise 有下面的特性: 相同的 Quantization noise 對在較低準位輸入的聲音所產生的影響, 勝過在較高準位輸入的聲音的影響. Ex: 在 1.8 的 error 0.2 會比在 3.8 所造成的影響來得大. Quantization noise (or Signal-to-noise ratio) 在較小聲的 talker 所產生的影響勝過大聲公.

22 編碼 編碼(coding): 以一組欲先設定的 0 或 1 所組成的數字字串,來表示所規劃的所有的量化準位。
以PSTN常用之脈碼調變(Pulse Code Modulation,PCM)為例,是使用8位元編碼,共256個準位來表示人的聲音。取樣頻率為8KHz,意味著每秒傳輸64,000個位元,換言之,資料量的傳輸速率為64,000bps。

23 Questions 如何用analog的實體來儲存0與1? 如何用analog的實體來進行0與1的運算?
Ex: 如何可以做到 1+1=10 的目的? 那一些最容易實作出的運算元件? 換言之是最基本的運算? Answer: AND, OR, NOT, NOR, NAND and XOR logic gates.

24 Switching Devices (1/2) Two-state devices: the output can assume only two different discrete values. Example of switching devices: relays, diodes, transistors, CMOS. volt On Drain 5 Gate 4 logic 1 Transistor A relay can assume tow states - closed or open – depending on whether power is applied to the coil or not. A diode 二極體 can be in a conducting state or a non-conducting state.(導通不導通) A transistor 電晶體 can be in a cut-off or saturated state, with a corresponding high or low output voltage. 3 Source 2 Unknown 1 logic 0 Off

25 Switching Devices (2/2) 連結switching devices可以造出各種0與1的運算,即造出一個binary system。 We can use binary system to present the circuits made by switching devices. 電子學要認真學習! A B F V V +V +V V +V +V 0 NAND Gate

26 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) 超大型積體電路設計導論&超大型積體電路設計實習

27 Representation of AND, OR, XOR, and NOT Gates (1/2)

28 Representation of AND, OR, XOR, and NOT Gates (2/2)

29 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 CPLD: Complex Programmable Logic Devices FPGA: Field Programmable Gate Arrays A B F

30 S-R Latch To store 0 or 1. Use OR/NOT gates to construct a larger component! S P L S P It’s an improper S-R latch (set-reset latch), R Q A new block Q R

31 Half Adder A + B = Sum with a Carry A Sum B Carry HA Sum = A XOR B
Carry = A AND B A B Carry Sum Half Adder A B XOR Sum AND Carry

32 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. 技術會過時,但背後的理論基礎並不會改變。

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

34 Sequential Networks The outputs depend on the present value of the inputs and past input values. Basic memory elements: flip-flops feedback memory

35 Switching Circuits Both combinational networks and sequential networks are called as switching circuits. 計算機概論,數位電路實驗

36 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.

37 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 微電腦系統,微電腦實驗,數位系統設計,計算機組織

38 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 PLD(programmable logic devices)

39 Conclusions This is an interesting course. Hope you like it.


Download ppt "邏輯電路設計 Logic Circuit Design 教師:賴薇如"

Similar presentations


Ads by Google