floorplanning for partially-reconfigurable fpga systems

51
1 / 51 Floorplanning for Partially-Reconfigurable FPGA Systems via Mixed-Integer Linear Programming P 2 C WEEK, Milano August 29, 2014 Marco Rabozzi: [email protected] Marco D. Santambrogio: [email protected]

Upload: others

Post on 24-Nov-2021

22 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Floorplanning for Partially-Reconfigurable FPGA Systems

1 / 51

Floorplanning for Partially-Reconfigurable FPGA Systems via Mixed-Integer Linear Programming

P2C WEEK, Milano August 29, 2014

Marco Rabozzi: [email protected]

Marco D. Santambrogio: [email protected]

Page 2: Floorplanning for Partially-Reconfigurable FPGA Systems

2 / 51

Rationale and Innovation

• Problem statement

– Given a partially-reconfigurable FPGA, find on-chip area constraints to meet the design requirements

• Innovative contribution:

– Consider arbitrary distribution of heterogeneous resources

– Possibility to customize the objective function

– Control on the quality of the desired solution

Page 3: Floorplanning for Partially-Reconfigurable FPGA Systems

3 / 51

Aims

• Considering the area assignment problem tailored for partially-reconfigurable FPGAs, provide:

– A Mixed-Integer Linear Programming (MILP) model to improve the quality of heuristic solutions

– An effective MILP model to find the optimal solution

Page 4: Floorplanning for Partially-Reconfigurable FPGA Systems

4 / 51

Outline

• Introduction

• Problem definition and state-of-the-art

• The Proposed Approach

• Overall system evaluation

• Conclusions and Future Work

• Demo

Page 5: Floorplanning for Partially-Reconfigurable FPGA Systems

5 / 51

INTRODUCTION

Page 6: Floorplanning for Partially-Reconfigurable FPGA Systems

6 / 51

FPGA (Field-Programmable Gate Array)

• FPGA characteristics – Heterogeneous resources – Reconfigurable device – Reconfiguration constraints

• Different resource distribution: – Uniform – Non-Uniform

• Different reconfiguration – Total – Partial (static) – Partial (dynamic)

DSP CLB BRAM

Tiles: minimal reconfigurable units

Page 7: Floorplanning for Partially-Reconfigurable FPGA Systems

7 / 51

FPGA: resource distribution

• Uniform distribution

– Xilinx Spartan3

– Xilinx Virtex-II

Repetitive resource pattern

Page 8: Floorplanning for Partially-Reconfigurable FPGA Systems

8 / 51

FPGA: resource distribution

• Uniform distribution

– Xilinx Spartan3

– Xilinx Virtex-II

• Non-Uniform distribution

– Xilinx Virtex-4

– Xilinx Virtex-5

Repetitive resource pattern

Page 9: Floorplanning for Partially-Reconfigurable FPGA Systems

9 / 51

FPGA: total reconfiguration

Reconfigurable Region

Page 10: Floorplanning for Partially-Reconfigurable FPGA Systems

10 / 51

FPGA: partial (static) reconfiguration

Static Logic

Reconfigurable Region

Page 11: Floorplanning for Partially-Reconfigurable FPGA Systems

11 / 51

FPGA: partial (dynamic) reconfiguration

Static Logic

Reconfigurable Region

Page 12: Floorplanning for Partially-Reconfigurable FPGA Systems

12 / 51

Partial dynamic design flow

Synthesis

HDL Technology

Mapping

Place

and

Route

Bitstream

Generation

Floorplanning

Bitstream Files

Tasks

Partitioning

Reconfigurable regions +

Resource requirements

FPGA

Area constraints

Mapped

netlists

Placed

netlists

Netlists

Page 13: Floorplanning for Partially-Reconfigurable FPGA Systems

13 / 51

PROBLEM DEFINITION AND STATE-OF-THE-ART

Page 14: Floorplanning for Partially-Reconfigurable FPGA Systems

14 / 51

Floorplanning problem

• Given:

– An FPGA

– A set of reconfigurable regions (RRs)

– The resource requirements

• Aim:

– Find a rectangular area for each region, such that: • No two regions overlap

• Complete tiles are covered

• All the resource requirements are met

• A given objective function is optimized

Requires: 13x 3x RR 1

RR 2 Requires: 7x 2x

Reconfigurable Region 1

Reconf. Region 2

Page 15: Floorplanning for Partially-Reconfigurable FPGA Systems

15 / 51

Related work - I

• [*] Is a 3 steps floorplacer based on simulated annealing

– Considers both partitioning and floorplanning

– Optimizes external wirelength and area

• Limits

– Considers only uniform resource distribution

– No guarantee on the solution quality

– Objective function not customizable

[*] Montone, A., Santambrogio, M. D., and Sciuto, D.: Wirelength driven floorplacement for FPGA-based partial reconfigurable systems. In IPDPS Workshops, pages 1-8, 2010.

Tasks Partitioning

Temporal floorplacement

in RRs

RRs floorplacement

Scheduled task graph

Page 16: Floorplanning for Partially-Reconfigurable FPGA Systems

16 / 51

Related work - II

• [*] Is an adaption of Parquet [**] for Floorplanning on heterogeneous FPGAs

– Considers arbitrary resource distribution

– Optimizes internal and external wirelength

• Limits

– Suboptimal search space

– Objective function only based on wirelength

[*] Bolchini, C., Miele, A., and Sandionigi, C.: Automated Resource-Aware Floorplanning of Reconfigurable Areas in Partially-Reconfigurable FPGA Systems. In FPL, pages 532-538, 2011.

[**] Adya, S. N. and Markov, I. L.: Fixed-outline floorplanning: enabling hierarchical design. IEEE Trans. VLSI Syst., 11(6):1120-1135, 2003.

Sequence pair:

Height vector:

Rec A

Rec B

Page 17: Floorplanning for Partially-Reconfigurable FPGA Systems

17 / 51

Related work - III

• [*] Introduces Columnar Kernel Tesselation – Takes into account complex device

architecture

– Optimizes area and internal wirelength

• Limits – Unexplored potentially promising solutions

(fixed placement order of regions)

– Objective function biased towards area optimization

[*] Vipin, K. and Fahmy, S. A.: Architecture-aware reconfiguration-centric floorplanning for partial reconfiguration. In ARC, pages 13-25, 2012.

CLB DSP BRAM

Req.: 11x 5x RR 3

RR 4 Req.: 14x

Req.: 2x 3x RR 2

Req.: 1x 2x RR 1

sequential placement starting from RR1 to RR4

Kernels: building blocks for areas definition

Page 18: Floorplanning for Partially-Reconfigurable FPGA Systems

18 / 51

THE PROPOSED APPROACH

Page 19: Floorplanning for Partially-Reconfigurable FPGA Systems

19 / 51

Optimal Floorplanner (OF)

Reconfigurable regions + Resource requirements FPGA

Heuristic solution

MILP model

MILP Solver (Gurobi, Cplex, GLPK, …)

Warm Start

Optimal solution / Good solution (time limited search)

User-defined linear Objective Function

Page 20: Floorplanning for Partially-Reconfigurable FPGA Systems

20 / 51

Heuristic-Optimal Floorplanner (HOF)

Reconfigurable regions + Resource requirements FPGA Heuristic

solution

MILP model

MILP Solver (Gurobi, Cplex, GLPK, …)

Improved heuristic solution

User-defined linear Objective Function

Geometrical constraints

• Simpler model than OF: – Reduced search space – Non overlapping guaranteed

by the geometrical constraints

Page 21: Floorplanning for Partially-Reconfigurable FPGA Systems

21 / 51

MILP: Problem linearization - I

Reconfigurable Region n

Tile

N = set of reconfigurable regions R = set of FPGA rows (i.e.: {1, 2, .. , 8})

8

7

6

5

4

3

2

1

Page 22: Floorplanning for Partially-Reconfigurable FPGA Systems

22 / 51

MILP: Problem linearization - II

Reconfigurable Region n

Tile

N = set of reconfigurable regions R = set of FPGA rows (i.e.: {1, 2, .. , 8})

Inte

ger

Rea

l

Parameter

Variables:

Page 23: Floorplanning for Partially-Reconfigurable FPGA Systems

23 / 51

MILP: Problem linearization - III

Reconfigurable Region n

Tile

N = set of reconfigurable regions R = set of FPGA rows (i.e.: {1, 2, .. , 8})

Semantic constraints:

Page 24: Floorplanning for Partially-Reconfigurable FPGA Systems

24 / 51

Non overlapping (OF) - I

Reconfigurable Region n2

Reconfigurable Region n1

How to avoid this?

Page 25: Floorplanning for Partially-Reconfigurable FPGA Systems

25 / 51

Non overlapping (OF) - II

Reconfigurable Region n2

Reconfigurable Region n1 binary variable forced to 1 if region

n1 is not to the left of region n2:

= 1

Page 26: Floorplanning for Partially-Reconfigurable FPGA Systems

26 / 51

Non overlapping (OF) - III

Reconfigurable Region n2

Reconfigurable Region n1 binary variable forced to 1 if region

n1 is not to the left of region n2:

= 1

Non overlapping constraint:

Page 27: Floorplanning for Partially-Reconfigurable FPGA Systems

27 / 51

Non overlapping (OF) - IV

Reconfigurable Region n2

Reconfigurable Region n1 binary variable forced to 1 if region

n1 is not to the left of region n2:

= 1

Non overlapping constraint:

Violation!

Page 28: Floorplanning for Partially-Reconfigurable FPGA Systems

28 / 51

Non overlapping (HOF)

RR n1

RR n2 RR n3

Heuristic solution

RR1 above RR2 RR1 above RR3 RR2 at the left of RR3

Geometrical constraints Added to the MILP model

Page 29: Floorplanning for Partially-Reconfigurable FPGA Systems

29 / 51

Covered resources - I Tiles within the same portion, all have the same amount and types of resources

Portions (P)

• FPGA partitioning – Reduce model complexity

– P: set of portion describing the device

– T: set of resource types

• Parameters

leftmost pos. of portion p

rightmost pos. of portion p

= 1 if portion p lies on row r = 0 otherwise

p1

p2

p3

p4 p5 p6

p7

p8

p9

Page 30: Floorplanning for Partially-Reconfigurable FPGA Systems

30 / 51

Covered resources - II

RR n Row r

(intersection between region n on portion p and row r measured in tiles)

resources of type t covered by region n on portion p and row r

Tiles within portion p having resources of type t

Portion p p

Page 31: Floorplanning for Partially-Reconfigurable FPGA Systems

31 / 51

Covered resources - III

RR n

(intersection between region n on portion p and row r measured in tiles)

resources of type t covered by region n on portion p and row r

Tiles within portion p having resources of type t

Resource requirement constraint:

resources of type t required by RR n

Page 32: Floorplanning for Partially-Reconfigurable FPGA Systems

32 / 51

Covered resources - IV

RR n

Binary variable forced to 0 if region n is on the left or on the right of portion p

Page 33: Floorplanning for Partially-Reconfigurable FPGA Systems

33 / 51

Covered resources - V

RR n

intersection between region n on portion p and row r measured in tiles

Page 34: Floorplanning for Partially-Reconfigurable FPGA Systems

34 / 51

Objective function

• Cost function can be defined starting from the variables and parameters of the MILP model

• Implemented metrics:

– Global wirelength measured using HPWL ( )

– Regions perimeter ( )

– Wasted resources ( )

Page 35: Floorplanning for Partially-Reconfigurable FPGA Systems

35 / 51

Objective function – Example I

• Internal Wirelength

– Measured with HPWL (half-perimeter wirelength)

– : number of interconnections between regions n1 and n2

RR n1 RR n2

x

y Geometrical constraints

Cost to be minimized

Page 36: Floorplanning for Partially-Reconfigurable FPGA Systems

36 / 51

Objective function – Example II

• Wasted resources

– Measures the number of resources occupied by not needed

– : cost of wasting a resource of type t

T = {CLB, BRAM, DSP} Covered t resources Required t resources

Page 37: Floorplanning for Partially-Reconfigurable FPGA Systems

37 / 51

Formulation refinement

• Additional constraints to better describe the solution space of the LP (Linear Programming) relaxation

Maximum number of t resources within a tile

For a given region n:

Page 38: Floorplanning for Partially-Reconfigurable FPGA Systems

38 / 51

Implementation

FPGAs description

Python script

fpga.dat

Reconfigurable regions + Resource requirements

Heuristic solution (for HOF)

Python script

design.dat

floorplanner.mod

XML

GLPK problem.lp

GNU MathProg solution.sol

Gurobi (MILP Solver)

Page 39: Floorplanning for Partially-Reconfigurable FPGA Systems

39 / 51

OVERALL SYSTEM EVALUATION

Page 40: Floorplanning for Partially-Reconfigurable FPGA Systems

40 / 51

Pseudo-random benchmark

• 20 designs with different number of regions and different device occupancy rate to test effectiveness

– At least 1 or 2 regions requiring DSPs – From 3 to 7 regions requiring BRAMs – Random interconnections between regions and to the IO – Target device: Virtex-5 XC5VLX110T

• Global wirelength objective function to compare to Bolchini et al. [*]

– 10 random executions of [*], best outcome considered – HOF re-optimization on [*] good solutions (within 10% of the best one) – OF warm started using HOF solution and execution time limited to 1800 sec.

[*] Bolchini, C., Miele, A., and Sandionigi, C.: Automated Resource-Aware Floorplanning of Reconfigurable Areas in Partially-Reconfigurable FPGA Systems. In FPL, pages 532-538, 2011.

Page 41: Floorplanning for Partially-Reconfigurable FPGA Systems

41 / 51

benchmark results - I

[*] Bolchini, C., Miele, A., and Sandionigi, C.: Automated Resource-Aware Floorplanning of Reconfigurable Areas in Partially-Reconfigurable FPGA Systems. In FPL, pages 532-538, 2011.

*

*

Page 42: Floorplanning for Partially-Reconfigurable FPGA Systems

42 / 51

benchmark results - II

[*] Bolchini, C., Miele, A., and Sandionigi, C.: Automated Resource-Aware Floorplanning of Reconfigurable Areas in Partially-Reconfigurable FPGA Systems. In FPL, pages 532-538, 2011.

*

*

Page 43: Floorplanning for Partially-Reconfigurable FPGA Systems

43 / 51

Floorplanners features comparison

Authors

Resource

distribution

aware

Compliant

with PR

Customizable

objective

function

Reaches the

optimum

Montone et al. No Yes No No

Bolchini al. Yes Yes No No

Vipin et al. Yes Yes Limited, biased

towards area

No

HOF Yes Yes Yes No

OF Yes Yes Yes Yes

Page 44: Floorplanning for Partially-Reconfigurable FPGA Systems

44 / 51

The case study

• SDR (Software Defined Radio) taken from [*]

– 5 reconfigurable regions

– Heterogeneous resource requirements

– Multiple modules assigned for each region

– Sequential connections among regions with equal bandwidth

– Target device: Virtex-5 FX70T

• Objective:

1. Wasted frames

2. Wirelength

[*] Vipin, K. and Fahmy, S. A.: Architecture-aware reconfiguration-centric floorplanning for partial reconfiguration. In ARC, pages 13-25, 2012.

Page 45: Floorplanning for Partially-Reconfigurable FPGA Systems

45 / 51

SDR resource requirements

[*] Vipin, K. and Fahmy, S. A.: Architecture-aware reconfiguration-centric floorplanning for partial reconfiguration. In ARC, pages 13-25, 2012.

Page 46: Floorplanning for Partially-Reconfigurable FPGA Systems

46 / 51

The proposed solution

• Optimization via OF – Small number of regions (5) – We assume heuristic solution not available

• Objective parameters (same optimization)

• Additional constraint to prevent intersection with the hard processor on the FPGA –

Virtex-5 FX70T

p1

PowerPC

Page 47: Floorplanning for Partially-Reconfigurable FPGA Systems

47 / 51

Solution comparison

[*] Vipin, K. and Fahmy, S. A.: Architecture-aware reconfiguration-centric floorplanning for partial reconfiguration. In ARC, pages 13-25, 2012.

*

• Optimal solution in 29 seconds

• 34% wasted frames reduction – No DSP and CLB

wasted by the Video Decoder RR

– No BRAM wasted by the Signal Decoder RR

• Approximately same wirelength

Page 48: Floorplanning for Partially-Reconfigurable FPGA Systems

48 / 51

Conclusion

• Two approaches for the identification of area constraints on partially-reconfigurable FPGA have been introduced

• Novelties: – Consider arbitrary distribution of heterogeneous resources

– Possibility to customize the objective function

– Control on the quality of the desired solution

• Results published at FCCM 2014: – Rabozzi, M., Lillis, J., and Santambrogio, M. D.: Floorplanning for

Partially-Reconfigurable FPGA Systems via Mixed-Integer Linear Programming. In FCCM, 2014.

Page 49: Floorplanning for Partially-Reconfigurable FPGA Systems

49 / 51

Future work

• Enhance the description of the MILP model

• Consider alternative approaches between OF and HOF

– Sequential K-placement (fix the position of k regions at a time)

– Hierarchical floorplanning

• Consider other metrics

– power consumption

– provide support for bitstream relocation

Page 50: Floorplanning for Partially-Reconfigurable FPGA Systems

50 / 51

DEMO

Page 51: Floorplanning for Partially-Reconfigurable FPGA Systems

51 / 51

THANK YOU!

Available at: http://floorplacer.necst.it