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

## Presentation on theme: "Datorteknik TopologicalSort bild 1 To verify the structure Easy to hook together combinationals and flip-flops Harder to make it do what you want."— Presentation transcript:

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 combinational 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)

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

Datorteknik TopologicalSort bild 4 Answer: Impossible to be sure by “inspection” We need a procedure

Datorteknik TopologicalSort bild 5 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;

Datorteknik TopologicalSort bild 6 Where do we begin?...... At the primary inputs But... What is an input to the circuit?

Datorteknik TopologicalSort bild 7 Inputs Here’s one! It’s a “break”. There is nothing “upstream” As far backwards as we can go &

Datorteknik TopologicalSort bild 8 Is there a path through this? D Q

Datorteknik TopologicalSort bild 9 The D- flip flop Combinationally, the D-flip flop is like this: D Q

Datorteknik TopologicalSort bild 10 Branch logic Sgn/Ze extend Zero ext. ALU A B 31 0 4 + +

Datorteknik TopologicalSort bild 11 + - 12534 Add one Equal? Left shift one bit A

Datorteknik TopologicalSort bild 12 + - 1243 Add one Equal? Left shift one bit B

Datorteknik TopologicalSort bild 13 + - 12534 Add one Equal? Left shift one bit A 1 M

Datorteknik TopologicalSort bild 14 + - 12534 Add one Equal? Left shift one bit A 1 M M

Datorteknik TopologicalSort bild 15 + - 12534 Add one Equal? Left shift one bit A 1 M M M

Datorteknik TopologicalSort bild 16 + - 12534 Add one Equal? Left shift one bit A 1 M M M 2 M M

Datorteknik TopologicalSort bild 17 + - 12534 Add one Equal? Left shift one bit A 1 M M M 2 M M 3 M M M

Datorteknik TopologicalSort bild 18 + - 12534 Add one Equal? Left shift one bit A 1 M M M 2 M M 3 M M M 4 M M

Datorteknik TopologicalSort bild 19 + - 12534 Add one Equal? Left shift one bit A 1 M M M 2 M M 3 M M M 4 M M 5 M M M M

Datorteknik TopologicalSort bild 20 + - 12534 Add one Equal? Left shift one bit A 1 M M M 2 M M 3 M M M 4 M M 5 M M M M M M

Datorteknik TopologicalSort bild 21 + - 1243 Add one Equal? Left shift one bit B 1 M M M

Datorteknik TopologicalSort bild 22 + - 1243 Add one Equal? Left shift one bit B 1 M M M 2 M M

Datorteknik TopologicalSort bild 23 + - 1243 Add one Equal? Left shift one bit B 1 M M M 2 M M 3 M M

Datorteknik TopologicalSort bild 24 + - 1243 Add one Equal? Left shift one bit B 1 M M M 2 M M 3 M M 4 M M M

Datorteknik TopologicalSort bild 25 + - 1243 Add one Equal? Left shift one bit B 1 M M M 2 M M 3 M M 4 M M M Combinational loop

Datorteknik TopologicalSort bild 26 Static timing analysis Use the topological sort procedure Use max delay as component output

Datorteknik TopologicalSort bild 27 + - 12534 Add one Equal? Left shift one bit A 32 15 26 20 18 8 0 0 0 0 0

Datorteknik TopologicalSort bild 28 + - 12534 Add one Equal? Left shift one bit A 1 0 8 8 32 15 26 20 18 8 0 0 0 0 0

Datorteknik TopologicalSort bild 29 + - 12534 Add one Equal? Left shift one bit A 1 2 20 0 8 8 32 15 26 20 18 8 0 0 0 0 0 0

Datorteknik TopologicalSort bild 30 0 8 8 32 15 26 20 18 8 0 0 0 0 0 + - 12534 Add one Equal? Left shift one bit A 1 2 0 20 3 40 0

Datorteknik TopologicalSort bild 31 0 8 8 32 15 26 20 18 8 0 0 0 0 0 + - 12534 Add one Equal? Left shift one bit A 1 2 0 20 3 40 0 4 0 0

Datorteknik TopologicalSort bild 32 + - 12534 Add one Equal? Left shift one bit A 1 2345 0 55 81 0 8 8 32 15 26 20 18 8 0 0 0 0 0 0 20 40 0 0 0 0 26

Datorteknik TopologicalSort bild 33 + - 12534 Add one Equal? Left shift one bit A 1 2345 15 81 40 0 26

Datorteknik TopologicalSort bild 34 Compiled simulation Use the topological sort procedure Use logic function as component output

Datorteknik TopologicalSort bild 35 + - 12534 Add one Equal? Left shift one bit A 5 4 7 11 1

Datorteknik TopologicalSort bild 36 + - 12534 Add one Equal? Left shift one bit A 1 1 2 5 4 7 11 1 2 2

Datorteknik TopologicalSort bild 37 + - 12534 Add one Equal? Left shift one bit A 1 2 6 5 5 4 7 11 1 1 2 2 2

Datorteknik TopologicalSort bild 38 + - 12534 Add one Equal? Left shift one bit A 1 23 -9 11 5 4 7 1 6 5 1 2 2 2

Datorteknik TopologicalSort bild 39 + - 12534 Add one Equal? Left shift one bit A 1 234 7 5 4 7 11 1 -9 11 6 5 1 2 2 2 7

Datorteknik TopologicalSort bild 40 + - 12534 Add one Equal? Left shift one bit A 1 2345 4 4 4 7 7 4 5 4 7 11 1 -9 -9, N=1 11 6 5 1 2 2 2 4, Propagate NEG INPUT 10 0 NEG POS

Datorteknik TopologicalSort bild 41 + - 12534 Add one Equal? Left shift one bit A 1 2345 4 10 -9 7 0

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

Similar presentations