1. Trang chủ
  2. » Tất cả

slides-main

35 3 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 35
Dung lượng 189,72 KB

Nội dung

The Digital Logic Level The Digital Logic Level Wolfgang Schreiner Research Institute for Symbolic Computation (RISC-Linz) Johannes Kepler University Wolfgang.Schreiner@risc.uni-linz.ac.at http://www.risc.uni-linz.ac.at/people/schreine Wolfgang Schreiner RISC-Linz The Digital Logic Level The Digital Logic Level The computer’s real hardware • Basic elements: gates • Basic logic: Boolean algebra • Combinatorial Circuits • Arithmetic Circuits • Memory • CPUs and buses Boundary between computer science and electrical engineering Wolfgang Schreiner The Digital Logic Level Gates A gate is a device that computes a function on a two-valued signal • Fundament: transistor can operate as a binary switch – Three connections to the outside: collector, base, emitter – Input voltage Vin < critical value: transistor becomes infinite resistance ∗ Output voltage Vout becomes externally regultated voltage Vcc (5V) – Input voltage Vin > critical value: transistor becomes a wire ∗ Output voltage Vout is pulled to ground (0V) • Interpret voltages as logical values – “High” voltage (Vcc ) is a logical – “Low” voltage (ground) is a logical Transistor acts like a logical inverter (NOT) Wolfgang Schreiner The Digital Logic Level Basic Gates: Construction +VCC +VCC +VCC Vout V1 Collector Vout Vout V2 Vin V1 V2 Emitter Base (a) (b) (c) NAND and NOR gates can be constructed by wiring two transistors in parallel respectively in series Wolfgang Schreiner The Digital Logic Level Basic Gates: Logic NOT A X A NAND X B A (a) X NOR A X B A 0 1 B 1 (b) X 1 AND A X B A 0 1 B 1 (c) X 0 OR A X B A 0 1 B 1 X 0 A 0 1 (d) B 1 X 1 (e) Most computers are based on NAND and NOR gates Wolfgang Schreiner The Digital Logic Level A B C Boolean Algebra A B C A Algebra of boolean functions A • Inputs and results are logical values ABC – Boolean function of n variables has 2n input combinations – Representation by truth table with 2n rows 2n –2 Boolean functions with n variables exist B ABC A 0 0 1 1 B 0 1 0 1 C 1 1 (a) Wolfgang Schreiner M 0 1 1 B M ABC C C ABC (b) The Digital Logic Level Other Notation Truth tables are too clumsy too handle • Suffices to specify which combinations of inputs gives output – Let A¯ denote negation, AB denote conjunction, A + B denote disjunction ¯ ¯ + AB C¯ + ABC – M = ABC + ABC – A function of n variables can be descried by a sum of at most 2n product terms of n variables Linear representation of Boolean functions Wolfgang Schreiner The Digital Logic Level Implementation of Boolean Functions Construct circuit for a given Boolean function • Systematic process: Write down the truth table for the function Provide inverters to generate the complement of each input Draw and AND gate for each term with a in the result column Wire the AND gates to the appropriate inputs Feed the output of all AND gates into an OR gate • Further transformations possible: Replace multi-input gates by two-input gates (A + B + C + D = (A + B) + (C + D)) Replace NOT, AND, OR gates by NAND gates (or by NOR gates) Circuit is not necessarily the simplest one Wolfgang Schreiner The Digital Logic Level Construction of NOT, AND, OR Any Boolean function can be constructed from NAND or NOR only A A A A (a) A A AB A+B B B A AB A A+B B B (b) (c) NAND gates and NOR gates are complete Wolfgang Schreiner The Digital Logic Level Circuit Equivalence Try to reduce the number of gates in a circuit AB A B AB + AC A A(B + C) B AC C A B C AB AC AB + AC A B C A B+C A(B + C) 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 (a) Wolfgang Schreiner B+C C (b) The Digital Logic Level Latches Circuits that remember “previous” input values • SR latch – S input: sets the latch; R input: resets the latch – If S is and R is 0, Q gets – If R is and S is 0, Q gets – If R and S are 0, Q remains unchanged ¯ is inverse of Q –Q S Q S Q 0 (a) Wolfgang Schreiner 1 R Q R (b) Q A B NOR 0 1 0 1 (c) 20 The Digital Logic Level Pulse Generators Circuits which generates very short pulses • A signal a and its negation b are fed into an AND gate – When signal a is set, negation b is slightly delayed – For a short period, there is a signal on output d d ∆ a b b AND c d c (a) c b a Time (b) Wolfgang Schreiner 21 The Digital Logic Level Flip-Flops Circuit which stores a data value at a precise time • Combination of a pulse generator and a latch ¯ (no inconsistency may occur between R and S) – Inputs of latch are D AND D – Inputs are conjoined with output of pulse generator (input is read at well-defined time) D Q Q Current value of D is read and stored a fixed time after clock signal Wolfgang Schreiner 22 The Digital Logic Level Data in I2 Memory Organization I1 I0 Write gate Individual words must be addressed ã ì memory Word select line – Input lines Ii – Address lines Aj – Chip select signal CS A1 A0 – RD signal for read/write Word select line Word select line – OE signal for output enable Simple regular structure D Q D Q D Q CK CK CK D Q D Q D Q CK CK CK D Q D Q D Q CK CK CK D Q D Q D Q CK CK CK Word Word Word Word CS • RD CS O1 RD O2 O3 OE Wolfgang Schreiner Output enable = CS • RD • OE 23 The Digital Logic Level RAMs: Random Access Memories • SRAM: Static RAM – Constructed from flip-flops – Content is retained as long as power is kept on – Very fast (few nanoseconds access time), used for caches • DRAM: Dynamic RAM – Each cell consists of transistor and capacitor only – Capacitor can be charged or discharged (0 or 1) – Charge leaks out, bit needs to be refreshed every few milliseconds – Rather slow (tens of nanoseconds access time), used for main memory • SDRAM: Synchronous DRAM – Hybrid of SRAM and DRAM – Access driven by synchronous clock – Used for main memory today Wolfgang Schreiner 24

Ngày đăng: 07/04/2022, 19:14

w