lecture 2-a - İzmir yüksek teknoloji...

Post on 26-Aug-2020

4 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

CENG 314Embedded Computer Systems

Lecture 2-A

Review of Digital Logic and Computer Architecture Concepts

Asst. Prof. Tolga Ayav, Ph.D.

Department of Computer Engineeringİzmir Institute of Technology

1

Layers of a Computer System

High Level Sum := Sum + 1

Assembly MOV BX,SUM INC (BX)

Machine 1101010100001100 0010001101110101 1111100011001101

Register Transfer Fetch Instruction, Increment PC, Load ALU with SUM ...

Gate

Circuit

İzmir Institute of Technology Embedded Systems Lab.

General Structure of a Microprocessor

Von-Neumann model of acomputer

İzmir Institute of Technology Embedded Systems Lab.

Binary, Octal, Hexadecimal numbers

Study conversions and aritmetic operations with binary and hexadecimal numbers!

İzmir Institute of Technology Embedded Systems Lab.

Analogy between binary system and switches

Opened or Off. Closed or On.

A siren controlled by a switch

Binary signals are suitable for on-off control :

İzmir Institute of Technology Embedded Systems Lab.

Logic Expressions

F = x AND y F = x OR y

AND OR NOT

The operation of the AND, OR, and NOT logic operators can be formally described by using a truth tables:

İzmir Institute of Technology Embedded Systems Lab.

Boolean AlgebraGeorge Boole, in 1854, developed a system of mathematical logic, which we now

call Boolean algebra. Based on Boole’s idea, Claude Shannon, in 1938, showed that circuits built with binary switches can easily be described using Boolean algebra.

İzmir Institute of Technology Embedded Systems Lab.

ExampleUse Boolean algebra to reduce the equation F(x,y,z) = (x' + y' + x'y' + xy) (x' + yz) as much as possible.

F = (x' + y' + x'y' + xy) (x' + yz) = (x' • 1 + y' • 1 + x'y' + xy) (x' + yz) by Identity Theorem 6a= (x' (y + y' ) + y' (x + x' ) + x'y' + xy) (x' + yz) by Inverse Theorem 9b= (x'y + x'y' + y'x + y'x' + x'y' + xy) (x' + yz) by Distributive Theorem 12a= (x'y + x'y' + y'x + y'x' + x'y' + xy) (x' + yz) by Idempotent Theorem 7b= (x' (y + y') + x (y + y')) (x' + yz) by Distributive Theorem 12a= (x' • 1 + x • 1) (x' + yz) by Inverse Theorem 9b= (x' + x) (x' + yz) by Identity Theorem 6a= 1 (x' + yz) by Inverse Theorem 9b= (x' + yz) by Identity Theorem 6a

Simplification is important because in the latter expression we need much fewer gates than the former one to implement the circuit.

İzmir Institute of Technology Embedded Systems Lab.

Logic Gates and Circuit Diagrams

Logic symbols for the three basic logic gates: (a) 2-input AND; (b) 2-input OR; (c) NOT. Logic symbols for: (a) 3-input AND; (b) 4-input AND; (c) 3-input

OR; (d) 4-input OR; (e) 2-input NAND; (f) 2-input NOR; (g) 3-input NAND; (h) 3-input NOR; (i) 2-input XOR; (j) 2-input XNOR.

TruthTables

İzmir Institute of Technology Embedded Systems Lab.

NOT implementation with transistor

İzmir Institute of Technology Embedded Systems Lab.

Synthesizing Combinational CircuitsSynthesize a combinational circuit from the following truth table. a, b, c are input signals and x, y are output signals.

x = a'b'c' + a'bc' + a'bc + ab'c + abc'

y = a'bc' + ab'c' + ab'c=>

İzmir Institute of Technology Embedded Systems Lab.

Simplification with Karnaugh Maps

Use the K-map method to minimize a 5-variable function :

F (v, w, x, y, z) = v'w'x'yz' + v'w'x'yz + v'w'xy'z + v'w'xyz + vw'x'yz' + vw'x'yz + vw'xyz' + vw'xyz + vwx'y'z + vwx'yz + vwxy'z + vwxyz.

F = v'w'xz + w'x'y + vw'y + vwz=>

İzmir Institute of Technology Embedded Systems Lab.

Timing Hazards

2-to-1 multiplexer circuit

Timing trace

K-map

Using glitches to our advantages:

One-shot circuit: Generates a single pulse

İzmir Institute of Technology Embedded Systems Lab.

Standard Combinational Components

İzmir Institute of Technology Embedded Systems Lab.

Full Adder

İzmir Institute of Technology Embedded Systems Lab.

Subtractor

İzmir Institute of Technology Embedded Systems Lab.

Adder-Subtractor Combination

İzmir Institute of Technology Embedded Systems Lab.

Decoder

(a) 3x8 Decoder truth table (b) Circuit (c) Logic symbol

İzmir Institute of Technology Embedded Systems Lab.

Encoder

(a) 8x3 Encoder truth table (b) Circuit (c) Logic symbol

İzmir Institute of Technology Embedded Systems Lab.

Multiplexer

2x1 multiplexer

8x1 multiplexer

İzmir Institute of Technology Embedded Systems Lab.

Shifter, Rotator (1)

İzmir Institute of Technology Embedded Systems Lab.

Shifter, Rotator (2)

4-bit shifter

İzmir Institute of Technology Embedded Systems Lab.

Latches and Flip-Flops

İzmir Institute of Technology Embedded Systems Lab.

S-R Latch

Switch bouncing problem

Solution with S-R Latch

İzmir Institute of Technology Embedded Systems Lab.

D Latch

D Latch

D Latch with enable

İzmir Institute of Technology Embedded Systems Lab.

ClockLatches are known as level-sensitive because their outputs are affected by their

inputs as long as they are enabled. Their memory state can change during this entire time when the enable signal is asserted. In a computer circuit, however, we do not want the memory state to change at various times when the enable signal is asserted.Instead, we like to synchronize all of the state changes to happen at precisely the same moment and at regular intervals.

Clock division with counter

İzmir Institute of Technology Embedded Systems Lab.

D Flip-Flop

İzmir Institute of Technology Embedded Systems Lab.

J-K Flip-Flop

İzmir Institute of Technology Embedded Systems Lab.

T Flip-Flop

İzmir Institute of Technology Embedded Systems Lab.

Sequential Circuits

İzmir Institute of Technology Embedded Systems Lab.

FSM Models

Moore FSM

Mealy FSM

İzmir Institute of Technology Embedded Systems Lab.

Example: Synthesizing a FSM circuit

Repeat {

Y := 0; -- s0

if (B = 0)

Y := 0; -- s1

else

Y := 1; -- s2

Y := 1; -- s3

}

Synthesis a FSM based on the C-like pseudo code given below:

İzmir Institute of Technology Embedded Systems Lab.

1. State diagram

6. Circuit

2. Next state table

3. Implementation table

5. Output table

4. Equations

Solution:

İzmir Institute of Technology Embedded Systems Lab.

Example: Basic Traffic Light Controller

Traffic light controller controls a traffic light at the intersection of a busy highway and a farm road. Normally, the highway light is green but if a sensor detects a car on the farm cars road, the highway light turns yellow then red. The farm road light then turns green until there are no cars or after a long timeout. Then, the farm road light turns yellow then red, and the highway light returns to green. The inputs to the machine are the car sensor, a short timeout signal, and a long timeout signal. The outputs are a timer start signal and the colors of the highway and farm road lights.

Please design a FSM circuit.

Input signals: S (short timeout), L (long timeout), C (car exists) Output signals: T(start timer), Red, Yellow, Green signals for HW and FR.

İzmir Institute of Technology Embedded Systems Lab.

top related