Top Banner
Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want
41

Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Apr 01, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 1

To verify the structure

Easy to hook together combinationals and flip-flops

Harder to make it do what you want

Page 2: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 2

To verify the structure

We want to check:

Does my structure contain combinatorial loops?

We want to compute:

What values are being computed

by the structure right now? (simulation)

We will need to estimate:

How fast can we clock this structure (timing analysis)

Page 3: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 3

To verify the structure

These three problems are all related to each other

The underlying concepts are graphtheoretical

We use topological sort

Page 4: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 4

Answer:

Impossible to be sure by “inspection”

We need a procedure

Page 5: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 5

Where do we begin?

...... At the primary inputs

But ...

What is an input to the circuit?

Page 6: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 6

Inputs

Here’s one!

It’s a “break”. There is nothing “upstream”

As far backwards as we can go

&

Page 7: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 7

Is there a path through this?

D Q

Page 8: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 8

The D- flip flop

Combinationally, the D-flip flop is like this:

D Q

Page 9: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 9

Branch

logic

Sgn/Ze

extend

Zero ext.

ALU

A

B

31

0

4+

+

Page 10: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 10

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

Page 11: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 11

+

-

1

2

43

Add one

Equal?Left shiftone bit

B

Page 12: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 12

The procedure

Visit_line (p);

Mark line

For each component connected

Visit_component (p)

End;

Visit_component (q)

Mark input [save q]

If all inputs marked then

Calculate output

For all outputs

Visit_line (output)

End;Main

For all inputs

Visit_line (value)

If all lines visited then OK

Else Combinatorial loop

End;

Page 13: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 13

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

M

Page 14: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 14

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

M

M

Page 15: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 15

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

M

M

M

Page 16: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 16

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

M

M

M

2

M M

Page 17: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 17

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

M

M

M

2

M M

3

M

M

M

Page 18: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 18

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

M

M

M

2

M M

3

M

M

M

4

M

M

Page 19: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 19

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

M

M

M

2

M M

3

M

M

M

4

M

M

5

M

M

M

M

Page 20: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 20

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

M

M

M

2

M M

3

M

M

M

4

M

M

5

M

M

M

M

M

M

Page 21: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 21

+

-

1

2

43

Add one

Equal?Left shiftone bit

B

1

M M

M

Page 22: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 22

+

-

1

2

43

Add one

Equal?Left shiftone bit

B

1

M M

M

2

M M

Page 23: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 23

+

-

1

2

43

Add one

Equal?Left shiftone bit

B

1

M M

M

2

M M

3

M

M

Page 24: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 24

+

-

1

2

43

Add one

Equal?Left shiftone bit

B

1

M M

M

2

M M

3

M

M

4

M

M

M

Page 25: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 25

+

-

1

2

43

Add one

Equal?Left shiftone bit

B

1

M M

M

2

M M

3

M

M

4

M

M

M

Combinational loop

Page 26: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 26

Static timing analysis

Use the topological sort procedure

Use max delay as component output

Page 27: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 27

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

32

15

26

20

18

8

0

00

0

0

Page 28: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 28

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

0

8

8

32

15

26

20

18

8

0

00

0

0

Page 29: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 29

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

2

20

0

8

8

32

15

26

20

18

8

0

00

0

0

0

Page 30: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 30

0

8

8

32

15

26

20

18

8

0

00

0

0

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

2

0 20

3

40

40

0

Page 31: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 31

0

8

8

32

15

26

20

18

8

0

00

0

0

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

2

0 20

3

40

40

0

4

00

Page 32: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 32

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

2

3

4

5

0

15

5581

0

8

8

32

15

26

20

18

8

0

00

0

0

0 2040

40

0

00

0

26

Page 33: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 33

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

2

3

4

5

15

8140

0

26

Page 34: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 34

Compiled simulation

Use the topological sort procedure

Use logic function as component output

Page 35: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 35

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

5

47

11

1

Page 36: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 36

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

12

5

47

11

1

2

2

Page 37: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 37

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

2

655

47

11

112

2

2

Page 38: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 38

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

2

3

-9

-9

11

5

47

11

1

65

12

2

2

Page 39: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 39

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

2

3

4

7

5

47

11

1

-9

-9

11

65

12

2

2

7

Page 40: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 40

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

2

3

4

5

4

4

4

77

4

5

47

11

1

-9

-9, N=1

11

65

12

2

2

4, Propagate NEG INPUT

1010

0

NEG

POS

Page 41: Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want.

Datorteknik TopologicalSort bild 41

+

-

1

2

5

3

4

Add one

Equal?Left shiftone bit

A

1

2

3

4

5

4

10-9

7

0