Top Banner
Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver
23

Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Dec 13, 2015

Download

Documents

Gyles Stokes
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 1

Object Oriented Generators in Java

Michael Chu & Nicholas Weaver

Page 2: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 2

Roadmap

• OO generators

• Automatic services

• Component libraries

• Future goals

Page 3: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 3

Why Java?

• 100% Pure Buzzword Compliant

Page 4: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 4

Why Java?

• Reasonably nice

• Politically acceptable

• Object Oriented

• Good metadata interface

Page 5: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 5

What are OO Generators?

• A component:– Contains subcomponents which represent the

pieces of a design– Has a constructor which creates the

subcomponents and attaches them together– Has connections for interfacing with other

components– Any additional routines for additional

functionality

Page 6: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 6

What are OO Generators?

Adder

Multiplier

Register

I0

I1

O

MAC

I0

I1

O

AddI0

I1

O

Multiply

D

Q

Register

Page 7: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 7

Why Object Oriented?

• Allows smart components– Partial evaluation and simulation– Components can change once created

• Different instances of the same class can behave differently

• Convenient abstractions for automatic services– Can treat the design as a hierarchical tree or a

graph of components

Page 8: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 8

A Hierarchical Tree

• Each component is made up of subcomponents

• Tree structure captures the design hierarchy and programmer intuition

• Routine provides access to all child components and the parent component

• Used for automatic placement and evaluation ordering

Page 9: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 9

A Hierarchical Tree

Adder

Multiplier

Register

I0

I1

O

MAC

I0

I1

O

AddI0

I1

O

Multiply

D

Q

Register

Page 10: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 10

A Graph of Components

• Each component has a set of inputs and outputs

• Can follow all inputs and outputs, backwards and forwards

Page 11: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 11

A Graph of Components

Adder

Multiplier

Register

I0

I1

O

MAC

I0

I1

O

AddI0

I1

O

Multiply

D

Q

Register

Page 12: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 12

Examining objects

• java.lang.reflect package allows inspection of objects

• Can access all slots and methods and determine type

• Used to allow iteration over all subcomponents, inputs, and outputs

• Automated creation of backpointers

Page 13: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 13

Automatic Services

• Logic Trimming– Traces the graph from the array inputs and

outputs

• Partial Evaluation– Constant propagation– Structural changes based on inputs

• Simulation

• Netlist generation

Page 14: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 14

Partial Evaluation

• Library components can examine their inputs, and if possible, assign outputs or rearrange internal structure

• Changes are then propagated to dependant components in an iterative process– Connection values are never changed, only set,

guaranteeing convergence

Page 15: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 15

Partial Evaluation Example

Adder

Multiplier

Register

I0

I1

O

MAC

I0

I1

O

AddI0

I1

O

Multiply

D

Q

Register

0

Page 16: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 16

Partial Evaluation Example

Adder

Multiplier

Register

I0

I1

O

I0

I1

O

Add

D

Q

Register

0

0

Page 17: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 17

Partial Evaluation Example

Adder

Multiplier

Register

I0

I1

O

D

Q

Register

0

Page 18: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 18

Simulation

• Library leaf nodes implement simulation routines.

• Changes are propagated similar to the partial evaluation system

• Assumes synchronous design

Page 19: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 19

Simulation for testing

• Larger components can implement a behavioral simulation routine

• Both routines automatically run concurrently– Differences produce warning messages

Page 20: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 20

Component Libraries

• Use the framework to build a series of libraries– Platform independent API– Include specialization and simulation routines– Perform netlist generation and similar services

Page 21: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 21

Target Platforms

• Targets:– Xilinx 4000E– Garp– Hierarchical Array

• All targets should have identical high-level primitives available– But implementations may use different details

• Low-level primitives can be target specific

Page 22: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 22

Current Status

• Basic structure completed

• Some automatic services– Logic trimming, simulation, partial evaluation

• Basic components of XC4000 library

• Simple designs completed– Counters, DNA sequence matching

Page 23: Generators 1 Object Oriented Generators in Java Michael Chu & Nicholas Weaver.

Generators 23

Future Development

• Simple control logic synthesis

• More components for Xilinx library

• Automatic and semi-automatic placement routines

• More supported platforms

• Real designs– Compare designs with those produced by HDL

and schematic capture