25
Grokking FPGA clock management Philémon Gardet Jean-François Nguyen <[email protected]> <[email protected]>

Grokking FPGA clock management - EPITA

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Grokking FPGA clock management - EPITA

Grokking FPGA clock managementPhilémon Gardet Jean-François Nguyen<[email protected]> <[email protected]>

Page 2: Grokking FPGA clock management - EPITA

Architecture

2

Page 3: Grokking FPGA clock management - EPITA

Architecture Overview

● IO buffers

● PLLs / DLLs

● CLBs

● Interconnect

● Block RAM

3

Page 4: Grokking FPGA clock management - EPITA

CLB - Configurable Logic Blocks

● Logic Cell:LUT, carry logic, storage

● Chained carry

● Fast adjacent interconnect

● clk signal

4

Page 5: Grokking FPGA clock management - EPITA

PLL & DLLInput clock

Phase-locked loop

Delay-locked loop

5

Page 6: Grokking FPGA clock management - EPITA

Clock Networking

● Fan-outClock signal intensity

● Clock skewDifferent phases from the same source

6

Page 7: Grokking FPGA clock management - EPITA

Clock Networking - Clock Tree

● Global networksLow-skew / High fanout

● Regional networksMid-skew / Mid fanout

● Edge networksLow-skew / high speed / IO

Global

Regional

7

Page 8: Grokking FPGA clock management - EPITA

Clock Tree Strategy

8

Page 9: Grokking FPGA clock management - EPITA

Timing considerations

9

Page 10: Grokking FPGA clock management - EPITA

Clock Skew

D Q D Q D Q

clk

clk1 clk2 clk3

clk

clk1

clk2

clk3

Clock skew

10

Page 11: Grokking FPGA clock management - EPITA

Short Path

D Q D Q d q1 q2

clk

clk

d

q1

q2

11

Page 12: Grokking FPGA clock management - EPITA

Short Path

D Q D Q d q1 q2

clk

clk1 clk2

clk

d

q1

q2

clk1

clk2

12

Page 13: Grokking FPGA clock management - EPITA

Short Path - Fixes● Add delay in data path

● Clock Reversing

● Alternate Phase Clocking○ DLL○ Differents edge triggers○ Clock buffering

D Q D Q d q1 q2

clk

clk1 clk2

Clock reversing

13

D Q D Q d q1 q2

clk1 clk2

Alternate Phase clocking

clk1

clk2

Page 14: Grokking FPGA clock management - EPITA

Place and Route

● Routability○ Avoid coupling capacitance or detours

● Timing constraints○ Bound delay on each path

● Power consumption

● Yield

14

Page 15: Grokking FPGA clock management - EPITA

Timing Analysis

● Minimum clock period is dictated by the largest delay

● Slack is the tolerated delay before increasing the minimum clock period

● Critical path has a slack of 0

15

Page 16: Grokking FPGA clock management - EPITA

Asynchronous & others dumb things

16

Page 17: Grokking FPGA clock management - EPITA

MetastabilityD Q

● Real world ⟶ transitive time

● Intermediate logic state

● Unknown behaviour if output feeds data to another stage

a c

b

a

b

c

17

Page 18: Grokking FPGA clock management - EPITA

Combinatory Logic as Trigger - Short paths

● Without any synchronization no hypothesis about order

● Metastability possibility

ab

c

d

q

18

Page 19: Grokking FPGA clock management - EPITA

Latches - Race condition

● Asynchronous control

● Transitive state

● Loop ⟶ No idea about current state

19

D Q

E

a

Combinatory logic

Combinatory logic

Page 20: Grokking FPGA clock management - EPITA

Combinatory Logic - Delay blocks

ab

c

d

qdelay

delay

delay

delay● Force delay on each input

● Control transitive state

20

Page 21: Grokking FPGA clock management - EPITA

Handshaking pipeline

Sender Receiver

Req

Ack

Data path

delay

Delay to send req signal = worst data setting time

21

Page 22: Grokking FPGA clock management - EPITA

Asynchronous data encoding protocols - dual rail

22

Sender Receiver

Ack

r0

d0r1

d1

Double the data bus → Assure validity

d r value

0 0 Null 1 0 1 0 1 0 1 1 Invalid

Page 23: Grokking FPGA clock management - EPITA

Manual Place & Route● No depend to place & route

algorithms changes

● Control clock skew and delays

● Automatization optimized for asynchronous logic ?

23

Page 24: Grokking FPGA clock management - EPITA

24

Thank you!

Page 25: Grokking FPGA clock management - EPITA

25

Bibliography● FPGA Architecture, timing, software / Mose Wahlstrom - Lattice R&D Team,

2013 ● The real hardware / V. Angeloc - VHDL-FPGA@PI, 2013 ● 7 Series FPGAs Clocking Resources User Guide / Lattice, 2017 ● iCE40 LP/HX Family Data Sheet / Lattice, 2017 ● Routing Algorithms and Architectures for Field-Programmable Gate arrays /

Stephen Dean Brown, 1992● Design Guidelines for Optimal Results in High-Density FPGAs / Altera, 2003● Rapid System Prototyping with FPGAs / R.C. Coffer, Ben Harding - Elsevier,

2005 ● Application of Specific Delay Window Routing for Timing Optimization in FPGA

Designs / Evan Wegley, Qinhai Zhag - Lattice, 2015● Clock Skew and Short Paths Timing / Microsemi, 2011 ● The Art of hardware architecture / Mohit Arora - Springer, 2012