phidian Introduction Memory Hierarchy Modularity The - - PowerPoint PPT Presentation

phidian
SMART_READER_LITE
LIVE PREVIEW

phidian Introduction Memory Hierarchy Modularity The - - PowerPoint PPT Presentation

How Game Engines Can Inspire EDA Tools Development: A use case for an open-source physical design library Tiago Fontana, Renan Netto, Vinicius Livramento , Chrystian Guth, Sheiny Almeida, La ercio Pilla, Jos e Lu s G untzel Embedded


slide-1
SLIDE 1

How Game Engines Can Inspire EDA Tools Development: A use case for an open-source physical design library

Tiago Fontana, Renan Netto, Vinicius Livramento, Chrystian Guth, Sheiny Almeida, La´ ercio Pilla, Jos´ e Lu´ ıs G¨ untzel

Embedded Computing Lab, Computer Science Department Federal University of Santa Catarina, Brazil ISPD - March, 2017 - Portland, OR

phidian

slide-2
SLIDE 2

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Outline

1

Introduction

2

Memory Hierarchy

3

Modularity

4

The Entity-Component System Design Pattern

5

Experimental Results

6

Conclusions

slide-3
SLIDE 3

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Modern Game Engines

Process huge amount of data Render high-resolution graphics Model realistic physical systems Run artificial intelligence engines

Vinicius Livramento ISPD - March, 2017 - Portland, OR 3

slide-4
SLIDE 4

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Modern Game Engines

Memory: better cache locality Modularity: few data dependency Parallelism: multithreading and GPU Testing: small functions

Vinicius Livramento ISPD - March, 2017 - Portland, OR 4

slide-5
SLIDE 5

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Understanding the Memory Hierarchy

Vinicius Livramento ISPD - March, 2017 - Portland, OR 5

slide-6
SLIDE 6

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

How Object-Oriented Design (OOD) Leads to More Cache Misses

Vinicius Livramento ISPD - March, 2017 - Portland, OR 6

slide-7
SLIDE 7

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

How Object-Oriented Design (OOD) Leads to More Cache Misses

Vinicius Livramento ISPD - March, 2017 - Portland, OR 6

slide-8
SLIDE 8

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

How Data-Oriented Design (DOD) Improves Cache Locality

Vinicius Livramento ISPD - March, 2017 - Portland, OR 7

slide-9
SLIDE 9

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

How Data-Oriented Design (DOD) Improves Cache Locality

Vinicius Livramento ISPD - March, 2017 - Portland, OR 7

slide-10
SLIDE 10

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Modularity: Modeling Nets and Pins

P8 P7 P2

A B

P1 P4 P3 P5 P6 N1 N2 N3 N4

Vinicius Livramento ISPD - March, 2017 - Portland, OR 8

slide-11
SLIDE 11

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Modularity: Modeling Nets and Pins Using OOD

Vinicius Livramento ISPD - March, 2017 - Portland, OR 9

slide-12
SLIDE 12

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Modularity: Modeling Nets and Pins Using OOD

Vinicius Livramento ISPD - March, 2017 - Portland, OR 9

slide-13
SLIDE 13

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Modularity: Integrating Placement and Timing Using OOD

Vinicius Livramento ISPD - March, 2017 - Portland, OR 10

slide-14
SLIDE 14

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Modularity: Modeling Nets and Pins Using DOD

Vinicius Livramento ISPD - March, 2017 - Portland, OR 11

slide-15
SLIDE 15

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Modularity: Modeling Nets and Pins Using DOD

Vinicius Livramento ISPD - March, 2017 - Portland, OR 11

slide-16
SLIDE 16

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Modularity: Integrating Placement and Timing Using DOD

Vinicius Livramento ISPD - March, 2017 - Portland, OR 12

slide-17
SLIDE 17

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Entities and Components (Properties)

Vinicius Livramento ISPD - March, 2017 - Portland, OR 13

slide-18
SLIDE 18

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

The Entity System: find, create, and delete entity in O(1)

Vinicius Livramento ISPD - March, 2017 - Portland, OR 14

slide-19
SLIDE 19

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

The Entity System: find, create, and delete entity in O(1)

Vinicius Livramento ISPD - March, 2017 - Portland, OR 14

slide-20
SLIDE 20

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

The Entity System: find, create, and delete entity in O(1)

Vinicius Livramento ISPD - March, 2017 - Portland, OR 14

slide-21
SLIDE 21

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Relationships Between Entities: aggregation and composition

Entity System: Nets Entity System: Pins

AGGREGATION

Net 2

  • Name: N2
  • Pins: 2 3 6

Net 1

  • Name: N1
  • Pins: 1 4 5
  • Name: P6
  • Net: 2

Pin 6

  • Name: P5
  • Net: 1

Pin 5

  • Name: P4
  • Net: 1

Pin 4

  • Name: P3
  • Net: 2

Pin 3

  • Name: P2
  • Net: 2

Pin 2

  • Name: P1
  • Net: 1

Pin 1

Vinicius Livramento ISPD - March, 2017 - Portland, OR 15

slide-22
SLIDE 22

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Relationships Between Entities: aggregation and composition

Entity System: Nets Entity System: Pins Entity System: Nets Entity System: Pins

AGGREGATION

Net 2

  • Name: N2
  • Pins: 2 3 6

Net 2

  • Name: N2
  • Pins: 2 3 6

Net 1

  • Name: N1
  • Pins: 1 4 5
  • Name: P6
  • Net: 2

Pin 6

  • Name: P6
  • Net: 2

Pin 6

  • Name: P5
  • Net: 1

Pin 5

  • Name: P5
  • Net: --

Pin 5

  • Name: P4
  • Net: 1

Pin 4

  • Name: P4
  • Net: --

Pin 4

  • Name: P3
  • Net: 2

Pin 3

  • Name: P3
  • Net: 2

Pin 3

  • Name: P2
  • Net: 2

Pin 2

  • Name: P2
  • Net: 2

Pin 2

  • Name: P1
  • Net: 1

Pin 1

  • Name: P1
  • Net: --

Pin 1

Vinicius Livramento ISPD - March, 2017 - Portland, OR 15

slide-23
SLIDE 23

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Relationships Between Entities: aggregation and composition

Entity System: Nets Entity System: Pins Entity System: Nets Entity System: Pins Entity System: Cells Entity System: Pins

AGGREGATION COMPOSITION

Net 2

  • Name: N2
  • Pins: 2 3 6

Net 2

  • Name: N2
  • Pins: 2 3 6

Cell 2

  • Name: C2
  • Pins: 2 3 6

Net 1

  • Name: N1
  • Pins: 1 4 5

Cell 1

  • Name: C1
  • Pins: 1 4 5
  • Name: P6
  • Net: 2

Pin 6

  • Name: P6
  • Net: 2

Pin 6

  • Name: P6
  • Cell: 2

Pin 6

  • Name: P5
  • Net: 1

Pin 5

  • Name: P5
  • Net: --

Pin 5

  • Name: P5
  • Cell: 1

Pin 5

  • Name: P4
  • Net: 1

Pin 4

  • Name: P4
  • Net: --

Pin 4

  • Name: P4
  • Cell: 1

Pin 4

  • Name: P3
  • Net: 2

Pin 3

  • Name: P3
  • Net: 2

Pin 3

  • Name: P3
  • Cell: 2

Pin 3

  • Name: P2
  • Net: 2

Pin 2

  • Name: P2
  • Net: 2

Pin 2

  • Name: P2
  • Cell: 2

Pin 2

  • Name: P1
  • Net: 1

Pin 1

  • Name: P1
  • Net: --

Pin 1

  • Name: P1
  • Cell: 1

Pin 1

Vinicius Livramento ISPD - March, 2017 - Portland, OR 15

slide-24
SLIDE 24

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Relationships Between Entities: aggregation and composition

Entity System: Nets Entity System: Pins Entity System: Nets Entity System: Pins Entity System: Cells Entity System: Pins Entity System: Cells Entity System: Pins

AGGREGATION COMPOSITION

Net 2

  • Name: N2
  • Pins: 2 3 6

Net 2

  • Name: N2
  • Pins: 2 3 6

Cell 2

  • Name: C2
  • Pins: 2 3 6

Cell 2

  • Name: C2
  • Pins: 2 3 6

Net 1

  • Name: N1
  • Pins: 1 4 5

Cell 1

  • Name: C1
  • Pins: 1 4 5
  • Name: P6
  • Net: 2

Pin 6

  • Name: P6
  • Net: 2

Pin 6

  • Name: P6
  • Cell: 2

Pin 6

  • Name: P6
  • Cell: 2

Pin 6

  • Name: P5
  • Net: 1

Pin 5

  • Name: P5
  • Net: --

Pin 5

  • Name: P5
  • Cell: 1

Pin 5

  • Name: P4
  • Net: 1

Pin 4

  • Name: P4
  • Net: --

Pin 4

  • Name: P4
  • Cell: 1

Pin 4

  • Name: P3
  • Net: 2

Pin 3

  • Name: P3
  • Net: 2

Pin 3

  • Name: P3
  • Cell: 2

Pin 3

  • Name: P3
  • Cell: 2

Pin 3

  • Name: P2
  • Net: 2

Pin 2

  • Name: P2
  • Net: 2

Pin 2

  • Name: P2
  • Cell: 2

Pin 2

  • Name: P2
  • Cell: 2

Pin 2

  • Name: P1
  • Net: 1

Pin 1

  • Name: P1
  • Net: --

Pin 1

  • Name: P1
  • Cell: 1

Pin 1

Vinicius Livramento ISPD - March, 2017 - Portland, OR 15

slide-25
SLIDE 25

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Infrastructure & Experimental Results

ICCAD 2015 infrastructure: 8 circuits with sizes between 768k and 1.93M cells Objective: Analyze cache misses and runtime Scenario A: check if all circuit cells’ positions lie within the circuit’s boundaries Scenario B: computing the interconnection wirelength for all circuit nets

Machine (31GB) Processor L3 (6144KB) L2 (256KB) L2 (256KB) L2 (256KB) L2 (256KB) L1d (32KB) L1d (32KB) L1d (32KB) L1d (32KB) L1i (32KB) L1i (32KB) L1i (32KB) L1i (32KB) Core P#0 Core P#1 Core P#2 Core P#3 PU P#0 PU P#1 PU P#2 PU P#3 Cache Processor Elements

Vinicius Livramento ISPD - March, 2017 - Portland, OR 16

slide-26
SLIDE 26

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Total Cache Miss for Scenario A: exploiting cache locality

Vinicius Livramento ISPD - March, 2017 - Portland, OR 17

slide-27
SLIDE 27

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Total Cache Miss for Scenario A: exploiting cache locality

Vinicius Livramento ISPD - March, 2017 - Portland, OR 17

slide-28
SLIDE 28

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Runtime for Scenario A: exploiting cache locality

Vinicius Livramento ISPD - March, 2017 - Portland, OR 18

slide-29
SLIDE 29

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Runtime for Scenario A: exploiting cache locality

Vinicius Livramento ISPD - March, 2017 - Portland, OR 18

slide-30
SLIDE 30

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Total Cache Miss for Scenario B: less benefits from cache locality

Vinicius Livramento ISPD - March, 2017 - Portland, OR 19

slide-31
SLIDE 31

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Total Cache Miss for Scenario B: less benefits from cache locality

Vinicius Livramento ISPD - March, 2017 - Portland, OR 19

slide-32
SLIDE 32

Introduction Memory Hierarchy Modularity The Entity-Component System Design Pattern Experiments Conclusions

Conclusions and Perspectives

Data-Oriented design can be efficiently applied to physical design

Modular code is more suitable for parallel implementations Better testability

Opportunities for future work

Organize data according to access pattern Multiple copies of the same vector of properties sorted in different order

Vinicius Livramento ISPD - March, 2017 - Portland, OR 20

slide-33
SLIDE 33

How Game Engines Can Inspire EDA Tools Development: A use case for an open-source physical design library

Questions?

Vinicius Livramento

vinilivramento@gmail.com

phidian

slide-34
SLIDE 34

Aggregation code example

P8 P7 P2

A B

P1 P4 P3 P5 P6 N1 N2 N3 N4

class Net : public entity_system::EntityBase{ }; class Pin : public entity_system::EntityBase{ }; EntitySystem<Net> nets; EntitySystem<Pin> pins; Aggregation<Net, Pin> aggregation(nets, pins); Cell n3 = nets.add(); Pin p5 = pins.add(); Pin p6 = pins.add(); aggregation.addAssociation(n3, p5); aggregation.addAssociation(n3, p6); Vinicius Livramento ISPD - March, 2017 - Portland, OR 22

slide-35
SLIDE 35

Composition code example

class Cell : public entity_system::EntityBase{ }; class Pin : public entity_system::EntityBase{ }; EntitySystem<Cell> cells; EntitySystem<Pin> pins; Composition<Cell, Pin> composition(cells, pins); Cell a = cells.add(); Pin p3 = pins.add(); Pin p5 = pins.add(); composition.addAssociation(a, p3); composition.addAssociation(a, p5);

P8 P7 P2

A B

P1 P4 P3 P5 P6 N1 N2 N3 N4

Vinicius Livramento ISPD - March, 2017 - Portland, OR 23