Digital Systems Design

27
1 Department of Electronic Engineering, FJU Verilog HDL: A Guide to Digital Design and Synthesis Digital Systems Design Shyue-Kung Lu Department of Electronic Engineeri ng

description

Shyue-Kung Lu Department of Electronic Engineering. Digital Systems Design. Syllabus. Recommended Texts 1. Michael D. Ciletti, “Advanced Digital Design with the Verilog HDL,” Prentice Hall ( 新月圖書 ) References - PowerPoint PPT Presentation

Transcript of Digital Systems Design

Page 1: Digital Systems Design

1

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Digital Systems Design

Shyue-Kung Lu

Department of Electronic Engineering

Page 2: Digital Systems Design

2

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Syllabus

Recommended Texts 1. Michael D. Ciletti, “Advanced Digital Design with the Verilog HDL,” Prentice Hall ( 新月圖書 ) References 1. Richard S. Sandige, “Digital Design Essentials,” Prentice Hall ( 開發圖

書 ) 2. John F. Wakerly, “Digital Design: Principle and Practices,” Prentice Hall ( 新月圖書 ) 3. M. Morris Mano, “Digital Design,” Prentice Hall, Third Edition ( 滄海書

局, 04-27088787) 4. M. Morris Mano, :Digital Logic and Computer Design Fundamentals,” Prentice Hall ( 新月圖書 )

Grades 1. 作業 25% 2. 期中考 30 % 3. 期末考 30% 4. Project 15% Project 以歷屆 FPGA 比賽題目為主

Page 3: Digital Systems Design

3

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Digital Systems Design

Course Overview

Review of combinational and sequential logic design Introduction to synthesis with HDLs (Verilog HDL) Programmable logic devices (CPLD and FPGA) State machines, datapath controllers, RISC CPU Architectures and algorithms for computation Synchronization across clock domains Static Timing Analysis Fault simulation and testing, JTAG, BIST

Page 4: Digital Systems Design

4

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Chapter 1-3Review of Digital Systems

Page 5: Digital Systems Design

5

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Logic Level Ranges of Voltage for a Digital Circuit

Page 6: Digital Systems Design

6

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Representations of a Digital Design

+

ba

out

A 0 0 0 0 1 1 1 1

B 0 0 1 1 0 0 1 1

C 0 1 0 1 0 1 0 1

Z 0 1 0 1 0 1 1 0

A

B

C

D T

2

T 1

Z

Z = A' •B' •(C + D) = (A' •(B' •(C + D)))

True table

Logic expression

Gate netlistTransistor circuit

Page 7: Digital Systems Design

7

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Basic Primitives

Page 8: Digital Systems Design

8

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Some Common IC Gates

Page 9: Digital Systems Design

9

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Typical IC Datasheet

Page 10: Digital Systems Design

10

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Combinational Logic Circuit

Combinational circuit: logic circuit whose outputs at any time are determined directly and only from the present input combination.

A combinational circuit performs a specific information-processing operation fully specified logically by a set of Boolean functions.

Sequential circuit: one that employ memory elements in addition to (combinational) logic gates—their outputs are determined from the present input combination as well as the state of the memory cells.

Page 11: Digital Systems Design

11

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Block Diagram of a Combinational Circuit

Combinational Circuit

n inputs m outputs

Fig. 4-1: Block Diagram of Combinational Circuit

Page 12: Digital Systems Design

12

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Combinational Modules

Ripple Carry Adder Carry Look ahead Adder Binary Adder-Subtractor BCD Adder Magnitude Comparator Binary Multiplier Decoder/Encoder Priority Encoder Multiplexers/Demultiplexers Three-State Gates

Page 13: Digital Systems Design

13

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Sequential Circuits

Page 14: Digital Systems Design

14

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Synchronous Clocked Sequential Circuit

Page 15: Digital Systems Design

15

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Clock Response in Latch and Flip-Flop

Page 16: Digital Systems Design

16

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Setup time and Hold Time

Page 17: Digital Systems Design

17

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

DFF

Page 18: Digital Systems Design

18

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

JKFF

Page 19: Digital Systems Design

19

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

JKFF

Page 20: Digital Systems Design

20

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Characteristic Tables and Equations

J K Q(t+1)

0 0

0 1

1 0

1 1

Q(t)

0

1

Q’(t)

No change

Reset

Set

Complement

D Q(t+1)

0

1

0

1

Reset

Set

T Q(t+1)

0

1

Q(t)

Q’(t)

No change Complement

Q(t + 1) = D (D Flip-Flop) Q(t + 1) = JQ’ + K’Q (JK Flip-Flop) Q(t + 1) = TQ’ + T’Q (T Flip-Flop)

Page 21: Digital Systems Design

21

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

DA = A x y

Page 22: Digital Systems Design

22

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Mealy Machine

Outputs dependent on inputs and state variables.

Are inputs synchronized with clock?

Page 23: Digital Systems Design

23

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Moore Machine

Comb.

Circuit

State

Registers

OutputInput

Outputs dependent on state variables only.

Comb.

Circuit

Page 24: Digital Systems Design

24

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

4-Bit Register

A register is a group of flip-flops, read/written as a unit.

A register that goes through a prescribed sequence of states upon the application of input pulses is called a counter.

Page 25: Digital Systems Design

25

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Register withParallel Load

1 1

1

1

1

1

0

0

0

0

0

0

0

0

I0

I1

I2

I3

I0

I1

I2

I3

I0

I1

I2

I3

0 0

0

0

0

0

1

1

1

1

1

1

1

1

0

0

0

0

I0

I1

I2

I3

I0

I1

I2

I3

Page 26: Digital Systems Design

26

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Shift Register

Edge trigger or level trigger?

1 01

11 01 00

Page 27: Digital Systems Design

27

Dep

artm

ent

of E

lect

roni

c E

ngin

eer

ing,

F

JU

Verilog HDL: A Guide to Digital Design and Synthesis

Synchronous Counter

No need to go through a sequential logic design process.

The flip-flop in the least significant position is complemented with every pulse. A flip-flop in any other position is complemented when all the bits in the lower significant positions are equal to 1.