the digital logic level - university of macedonia · eight 1-bit alu slices connected to make an...

74
The Digital Logic Level Chapter 3

Upload: dodien

Post on 30-Apr-2018

222 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

The Digital Logic Level

Chapter 3

Page 2: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Gates and Boolean Algebra (1)

Figure 3-1. (a) A transistor inverter. (b) A NAND gate. (c) A NOR gate.

Page 3: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Gates and Boolean Algebra (2)

Figure 3-2. The symbols and functional behavior for the five basic gates.

Page 4: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Boolean Algebra

Figure 3-3. (a) The truth table for the majority function of three variables. (b) A circuit for (a).

(b)

Page 5: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Implementation of Boolean Functions

• Write truth table for function• Provide inverters to generate complement of each input• Draw AND gate for each term with 1 in result column

• Wire AND gates to appropriate inputs

• Feed output of all AND gates into an OR gate

Page 6: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Circuit Equivalence (1)

Figure 3-4. Construction of (a) NOT, (b) AND, and (c) OR gates using only NAND gates or only NOR gates.

Page 7: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Circuit Equivalence (2)

Figure 3-5. Two equivalent functions. (a) AB + AC

Page 8: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Circuit Equivalence (3)

Figure 3-5. Two equivalent functions. (b) A(B + C).

Page 9: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Circuit Equivalence (4)

Figure 3-6. Some identities of Boolean algebra.

Page 10: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Circuit Equivalence (5)

Figure 3-7. Alternative symbols for some gates: (a) NAND (b) NOR (c) AND (d) OR

Page 11: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Circuit Equivalence (6)

Figure 3-8. (a) The truth table for the XOR function. (b)–(d) Three circuits for computing it.

Page 12: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Circuit Equivalence (7)

Figure 3-9. (a) Electrical characteristics of a device. (b) Positive logic. (c) Negative logic.

Page 13: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Integrated Circuits

Figure 3-10. Common types of integrated-circuit packages, including a dual-inline package (a), pin grid array (b),

and land grid array (c).

Page 14: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Multiplexers (1)

Figure 3-11. An eight-input multiplexer circuit.

Page 15: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Multiplexers (2)

Figure 3-12. (a) An eight-input multiplexer. (b) The same multiplexer wired to compute the majority function.

Page 16: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Decoders

Figure 3-13. A 3-to-8 decoder circuit.

Page 17: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Comparators

Figure 3-14. A simple 4-bit comparator.

Page 18: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Arithmetic Circuits (1)

Figure 3-15. A 1-bit left/right shifter.

Page 19: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Arithmetic Circuits (2)

Figure 3-16. (a) Truth table for 1-bit addition. (b) A circuit for a half adder.

Page 20: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Arithmetic Circuits (3)

Figure 3-17. (a) Truth table for full adder. (b) Circuit for a full adder.

Page 21: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Arithmetic Logic Units (1)

Figure 3-18. A 1-bit ALU.

Page 22: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Arithmetic Logic Units (2)

Figure 3-19. Eight 1-bit ALU slices connected to make an 8-bit ALU. The enables and invert signals are not shown for simplicity.

Page 23: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Clocks

Figure 3-20. (a) A clock. (b) The timing diagram for the clock. (c) Generation of an asymmetric clock.

Page 24: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Latches

Figure 3-21. (a) NOR latch in state 0. (b) NOR latch in state 1. (c) Truth table for NOR.

Page 25: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Clocked SR Latches

Figure 3-22. A clocked SR latch.

Page 26: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Clocked D Latches

Figure 3-23. A clocked D latch.

Page 27: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Flip-Flops (1)

Figure 3-24. (a) A pulse generator. (b) Timing at four points in the circuit.

Page 28: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Flip-Flops (2)

Figure 3-25. A D flip-flop.

Page 29: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Flip-Flops (3)

Figure 3-26. D latches and flip-flops.

Page 30: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Memory Organization (1)

Figure 3-27. An 8-bit register constructed from single-bit flip-flops.

Page 31: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Memory Organization (2a)

Figure 3-28. Logic diagram for a 4 x 3 memory. Each row is one of the four 3-bit words. A read or write operation always reads or

writes a complete word.

Page 32: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Memory Organization (2b)

Figure 3-28. Logic diagram for a 4 x 3 memory. Each row is one of the four 3-bit words. A read or write operation always reads or

writes a complete word.

Page 33: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Memory Organization (3)

Figure 3-29. (a) A noninverting buffer. (b) Effect of (a) when control is high. (c) Effect of (a) when control is low.

(d) An inverting buffer.

Page 34: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Memory Chips (1)

Figure 3-30. Two ways of organizing a 4-Mbit memory chip.

Page 35: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Memory Chips (2)

Figure 3-31. Two ways of organizing a 512-Mbit memory chip.

Page 36: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Nonvolatile Memory Chips(2)

Figure 3-32. A comparison of various memory types.

Page 37: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Field-Programmable Gate Arrays

Figure 3-33. (a) A field-programmable logic array lookup table (LUT). (b) The LUT configuration to

create a 3-bit clearable counter.

Page 38: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

CPU Chip Control Pins

• Bus control• Interrupts• Bus arbitration

• Coprocessor signaling

• Status

• Miscellaneous

Page 39: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

CPU Chips

Figure 3-34. The logical pinout of a generic CPU. The arrows indicate input signals and output signals. The short diagonal lines indicate that multiple pins are used. For a specific CPU, a number

will be given to tell how many.

Page 40: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Computer Buses (1)

Figure 3-35. A computer system with multiple buses.

Page 41: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Computer Buses (2)

Figure 3-36. Examples of bus masters and slaves.

Page 42: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Bus Width

Figure 3-37. Growth of an address bus over time.

Page 43: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Synchronous Buses (1)

Figure 3-38. (a) Read timing on a synchronous bus.

Page 44: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Synchronous Buses (2)

Figure 3-38. (b) Specification of some critical times.

Page 45: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Asynchronous Buses

Figure 3-39. Operation of an asynchronous bus.

Page 46: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Four Events of Full-Handshake

Page 47: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Bus Arbitration (1)

Figure 3-40. (a) A centralized one-level bus arbiter using daisy chaining. (b) The same arbiter, but with two levels.

Page 48: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Bus Arbitration (2)

Figure 3-41. Decentralized bus arbitration

Page 49: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Bus Operations (1)

Figure 3-42. A block transfer.

Page 50: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Bus Operations (2)

Figure 3-43. Use of the 8259A interrupt controller

Page 51: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

The Intel Core i7

Figure 3-44. The Core i7 physical pinout.

Page 52: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

The Core i7’s Logical Pinout

Figure 3-45. Logical pinout of the Core i7.

Page 53: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Pipelining on Core i7’s DDR3 Memory Bus

Three steps of memory requests

• Activate phase – opens DRAM memory row, ready for access

• Read or Write phase – multiple accesses can be made to individual words

• Precharge phase – closes DRAM memory row, prepare for next activate

Page 54: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Pipelining

Figure 3-46. Pipelining memory requests on the Core i7’s DDR3 interface.

Page 55: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Texas Instruments OMAP4430 System-on-a-Chip (1)

Figure 3-47. The internal organization of the OMAP4430 system-on-a-chip.

Page 56: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Texas Instruments OMAP4430 System-on-a-Chip (2)

Figure 3-48. The OMAP4430 system-on-a-chip pinout.

Page 57: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Atmel ATmega168 Microcontroller (1)

Figure 3-49. Physical pinout of the ATmega168.

Page 58: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Atmel ATmega168 Microcontroller (2a)

Figure 3-50. The internal architecture and logical pinout of the ATmega168 are shown in Internal architecture and logical pinout

of the ATmega168.

Page 59: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Atmel ATmega168 Microcontroller (2b)

Figure 3-50. The internal architecture and logical pinout of the ATmega168 are shown in Internal architecture and logical pinout

of the ATmega168.

Page 60: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

The PCI Bus (1)

Figure 3-51. Architecture of an early Pentium system. The thicker buses have more bandwidth than the thinner

ones but the figure is not to scale.

Page 61: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

The PCI Bus (2a)

Figure 3-52. The bus structure of a modern Core i7 system.

Page 62: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

The PCI Bus (2b)

Figure 3-52. The bus structure of a modern Core i7 system.

Page 63: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

PCI Bus Arbitration

Figure 3-53. The PCI bus uses a centralized bus arbiter.

Page 64: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

PCI Bus Signals (1)

Figure 3-54. (a) Mandatory PCI bus signals.

Page 65: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

PCI Bus Signals (2)

Figure 3-54. (b) Optional PCI bus signals.

Page 66: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

PCI Bus Transactions

Figure 3-55. Examples of 32-bit PCI bus transactions. The first three cycles are used for a read operation, then an idle cycle, and

then three cycles for a write operation.

Page 67: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

The PCI Express Architecture

Figure 3-56. A typical PCI Express system.

Page 68: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

The PCI Express Protocol Stack (1)

Figure 3-57. (a) The PCI Express protocol stack. (b) The format of a packet.

Page 69: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

The PCI Express Protocol Stack (2)

Each transaction uses 1 of 4 address spaces:• Memory space for ordinary reads and writes)• I/O space (for addressing device registers)

• Configuration space for system initialization, etc.)

• Message space for signaling, interrupts, etc.)

Page 70: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

The Universal Serial Bus (1)

Goals of USB developers:• Users must not have to set switches or jumpers • Users must not have to open the case to install new devices• There should be only one kind of cable

• I/O devices should get power from the cable

• Up to 127 devices should be attachable to a single computer• The system should support real-time devices (e.g., sound)• Devices should be installable while the computer is running• No reboot should be needed after installing a new device

• The bus and devices should be inexpensive to manufacture

Page 71: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

The Universal Serial Bus (2)

Figure 3-58. The USB root hub sends out frames every 1.00 msec.

Page 72: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

I/O Interfaces

Figure 3-59. A 24-bit PIO Interface.

Page 73: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

Address Decoding

Figure 3-60. Location of the EPROM, RAM, and PIO in our 64-KB address space

Page 74: The Digital Logic Level - University of Macedonia · Eight 1-bit ALU slices connected to make an 8-bit ALU. ... when control is high. (c) ... • Users must not have to set switches

End

Chapter 3