a difference logic formulation and smt solver for timing-driven placement

31
THE BEST PATH FROM IDEAS TO PRODUCTION SILICON ® THE BEST PATH FROM IDEAS TO PRODUCTION SILICON ® A Difference Logic Formulation and SMT Solver for Timing- Driven Placement Andrew Mihal SMT 2013

Upload: brinly

Post on 24-Feb-2016

155 views

Category:

Documents


0 download

DESCRIPTION

A Difference Logic Formulation and SMT Solver for Timing-Driven Placement. Andrew Mihal SMT 2013. Programmable Logic Devices. Programmability. CPUs. PLD s. ASIC s. Performance. Lookup Table Fabric. = firmware configuration bit. C. LUT. LUT. LUT. LUT. LUT. LUT. LUT. LUT. LUT. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

THE BEST PATH FROM IDEAS TO PRODUCTION SILICON ®THE BEST PATH FROM IDEAS TO PRODUCTION SILICON ®

A Difference Logic Formulationand SMT Solver for Timing-DrivenPlacement

Andrew MihalSMT 2013

Page 2: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Programmable Logic Devices

2

Performance

Programmability

ASICs

CPUs

PLDs

Page 3: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

LUT

C = firmware configuration bit

a b c out0 0 00 0 10 1 0

0 1 11 0 01 0 11 1 0

1 1 1

CCCCCCCC

Lookup Table Fabric

3

Page 4: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Interconnect

4

LUT

LUT LUT

LUT

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

MU

X

Page 5: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Programming

5

Input: Circuit Netlist

Output: Config Bits Mapping

Page 6: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Programming

6

Page 7: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

DetailedPlacement

Programming Toolchain

7

Synthesis

GlobalPlacement

DetailedPlacement

Routing

VerilogVHDL

Config

Page 8: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

No Overlaps Congestion, Routability Timing

Detailed Placement

8

Page 9: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Fixing an Overlap

9

Page 10: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Everybody Shuffle

10

Page 11: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Steps Look Bad in Isolation

11

Page 12: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Problem space is too big– Components Sites– LUT Permutations– Multiple Routing Variations– Retiming– 3D Fabric with Transparent Latches

Optimization Goals– Timing– Congestion

Why not SAT?

12

Page 13: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

SMT Formulation of Timing Constraints Practicality

– Domain-specific variable selection order– A*-style future cost clauses– Dynamic constraint generation

Solutions

13

Page 14: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Netlist Comps

Placement Variables

14

Fabr

ic S

ites

AexactlyOne

atMostOnevAXX

Page 15: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Placement Delays

15

A B C

E

D

F

Y

X

DBC

(vBX vCY) DBC = dXY

Page 16: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Timing Constraints

16

A B C

E

D

F

DBCDAB DCD

DBE

DEC

DEF

DFE

Path ConstraintABCD DAB + DBC + DCD ≤

ABECD DAB + DBE + DEC + DCD ≤

ABEF DAB + DBE + DEF ≤

FEF DFE + DEF ≤

FECD DFE + DEC + DCD ≤

Page 17: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

0

17

A B C

E

D

F

DBCDAB DCD

DBE

DEC

DEF

DFE

Slack

ArrivalC

RequiredC

ArrivalC = max ( DAB + DBC,DAB + DBE + DEC,DFE + DEC)

RequiredC = min ( - DCD,...)

Static Timing Analysis

Page 18: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Arrival and Required Equations

18

A B C

E

D

F

DBCDAB DCD

DBE

DEC

DEF

DFE

ArrC = max( ArrB + DBC, ArrE + DEC)

ReqC = min (ReqD – DCD)

ArrC ≥ ArrB + DBC

ArrC ≥ ArrE + DEC

ReqC ≤ ReqD – DCD

Page 19: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Difference Logic Formulation

19

A B C

E

D

F

Y

X

DBC

(vBX vCY) (ArrC – ArrB ≥ dXY)

(ReqB – ReqC ≤ -dXY)

ArrN ≤ ReqN

Page 20: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Edge Placement Options

20

A B C

E

D

F

DBC

(vBX vCY) (…)

BC

Page 21: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Dynamic Constraint Generation

21

B

subspace where (¬VBX + ¬VCY + ...) is relevant

VBX

VCY

C (vBX vCY) (…)(vBX + vCY + …)

Components

Site

s 0 0 0 0 0 0 00000

00

1

Page 22: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Timeline

22

SimulatedAnnealing

DLFormulation

Pure BooleanEncoding

Custom SMTSolver

Arr / ReqNumber Line

E+1 = T

E-1 = F (Arr ≥ -1)

.

.

.

.

.

.

(Req < 1)

MiniSAT 1.12b+ dynamic clauses

Page 23: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Solver Flow Chart

23

select

propagate

done?

return

analyze

backtrack

conflict

Page 24: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Propagation Phase

24

propagate_b

propagate_dl

propagate_dyn

conflict

conflict

conflict

20%

1%

50%

Page 25: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

ArrA d ReqB d ArrD – ArrC d

ReqC – ReqD -d

Batch DL Propagation

25

A

schedule fanout updates

B

schedule fanin updates

D

C

update fanins and fanouts

Page 26: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Tighter consistent bounds Or a conflict: ArrA > ReqA Or a positive-weight cycle

DL Propagation Results

26

Page 27: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Search-and-Repair Strategy

27

Select Window

BuildSMT Instance Custom

SMTSolver

Apply Solution

Select aProblem

Done?

Page 28: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Annealing vs. SAT and SAT vs. SMT

28

Annealing Boolean FormulationDesign LUTs Runtime Freq Runtime Freqcamellia256 89341 1.0 1.0 0.054 1.14

sudoku 17784 1.0 1.0 0.266 1.49

dct 17199 1.0 1.0 2.526 1.52

wishbone 12775 1.0 1.0 0.028 1.03

Boolean Formulation SMT FormulationDesign LUTs Runtime Freq Match Best Freqsha256 3283 1.0 1.0 0.71 1.01 1.03

aes 5236 1.0 1.0 0.57 0.79 1.03

r2000sc 5807 1.0 1.0 0.93 7.34 1.32

fpudouble 10300 1.0 1.0 0.38 0.48 1.05

Page 29: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

SAT vs. SMT: Reduction in Problem Size

29

Boolean Formulation SMT FormulationDesign LUTs Bvars Clauses Bvars DLvars Clausesmancala 287 146k 393k 13k 160 60k

rs_enc 1373 189k 59k 23k 467 55k

aeMB 3066 285k 233k 24k 411 81k

sha256 3283 283k 489k 28k 470 132k

aes 5236 233k 94k 29k 510 80k

warp 5560 283k 729k 24k 375 88k

r2000sc 5807 294k 238k 26k 398 86k

minimips 5855 231k 252k 27k 425 91k

fpudouble 10300 327k 126k 32k 327 78k

Page 30: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

Results: Dynamic Clauses

30

Boolean FormulationDynamic No Dynamic

Design LUTs Runtime Clauses Runtime Clausesmancala 287 1.0 393k 13.8 76590k

rs_enc 1352 1.0 59k 12.7 1029k

aeMB 3045 1.0 233k 8.7 20116k

SMT FormulationDynamic No Dynamic

Design LUTs Runtime Clauses Runtime Clausesmancala 287 0.40 60k 12.2 28545k

rs_enc 1352 0.30 55k 48.2 16487k

aeMB 3045 0.58 81k 15.7 20531k

Page 31: A Difference Logic Formulation and SMT Solver for Timing-Driven Placement

First use of SMT for Place & Route Straightforward difference logic formulation Take advantage of natural subdivisions in the problem

space to make the system practical Deployed in a production placement tool at Tabula today More details on Thursday at 9:00

Summary

31