• No results found

Using EDA Databases: Milkyway & OpenAccess

N/A
N/A
Protected

Academic year: 2021

Share "Using EDA Databases: Milkyway & OpenAccess"

Copied!
30
0
0

Loading.... (view fulltext now)

Full text

(1)

Using EDA Databases:

Milkyway & OpenAccess

Enabling and Using Scripting Languages with Milkyway and OpenAccess

(2)

2

Outline

History

Choice Of Scripting Language

When To Use Scripting Language

When Not To Use Scripting Language

Python For OpenAccess & Milkyway

Summary

Something Completely Different

(3)

History

Internal CAD

Commercial CAD

(4)

4

History

Flexstream LSI Internal CAD

LSI Proprietary CAD system

§ Data base API written in C

§ Data base functions return error code that must be checked after each function call

§ Global variables, Memory management

LSI Internal Common API

§ Written in C++

§ Use C++ exception rather that check return code

§ Abstraction layer to hide the data base

§ Main objective was to substantially reduce porting cost of internal tools when data base changes

§ Python wrappers written for the common API

• To provide rapid prototyping capability

• Ease of use for Engineers

LSI Proprietary CAD system flavor of this API developed

§ Python wrappers are basically free

(5)

History

Third party CAD

Synopsys (Avant!)

§ Same characteristics as LSI Proprietary CAD system • Data base API (Milkyway) written in C

• Data base functions return error code

• Applications must manage memory allocated by API

• At the time certain operations not available in C (scheme only)

§ Milkyway Flavor of LSI Common API

• Same motivation as LSI Internal Common API

- Written in C++

- Object oriented

- Use C++ exception rather that check return code

- Abstraction layer to hide the data base

- Substantially reduce porting cost of internal tools • Python wrappers are basically free

- Implementation is a number of #include ‘s

“Other” Flavors Of LSI Common API

§ Minor porting cost

• This allowed existing programs written for LSI Proprietary CAD system to port by simply including new header files and recompiling.

(6)

6

History

Third party CAD

Utilities

Tcl/Tk

GUI Forms

OpenAccess V1 API 3rd Party Database API LSI Database

API Based Applications

API Layer (DB side)

(7)

History

Third party CAD

Utilities

Tcl/Tk

GUI Forms

API Based Applications

OpenAccess 2.0

Decided to Natively Adopt OA 2.x As Common API

(8)

© 2006 LSI Logic Corporation

8

Choice of Scripting Language

PYTHON

TCL

JAVA

(9)
(10)

10

Choice of Scripting Language

PYTHON

Python – Reasons LSI chose Python

§ More proficient in python than Tcl.

§ Python is an object oriented language, this results in a easy and clean mapping to class based languages such as C++

§ Easy to learn thus ideal to use by engineers who may not be interested in hard core programming

§ “Python provides you with a good environment for quickly developing an initial prototype” http://www.amk.ca/python/howto/advocacy

(11)

Choice of Scripting Language

TCL

TCL – Reasons LSI chose Python

§ “Like Python, Tcl is usable as an application extension

language, as well as a stand-alone programming language. However, Tcl, which traditionally stores all data as strings, is weak on data structures…” http://python.fyxm.net/doc/essays/comparisons.html

§ Better suited for pure script programming and good choice for command interpreters.

§ “Tcl scripts can be useful and efficient if they grow to no larger than a few pages, and if they manage a relatively

(12)

12

Choice of Scripting Language

JAVA

Java – Reasons LSI chose Python

§ Java was in its infancy. (Circa 1996)

§ Java will be the choice for LSI in the future.

§ “Java's design is friendlier to glue languages than C. Both Java's type safety and the existence of a reflection API make it reasonably easy to automatically generate wrappers that allow Python programmers to access Java packages. “

http://www.python.org/workshops/1997-10/proceedings/hugunin.html

§ With availability of open source “development tools” such as Eclipse we believe JAVA will become the scripting language of choice at LSI.

• Eclipse http://www.eclipse.org/

- “Eclipse is an open source community whose projects are focused on providing an extensible development platform and application frameworks for building software.”

(13)

When To Use Scripting Language

Data Base Conversion

Data Base Browser

(14)

14 DEF Interface DEF Interface DEF File 5:15 min 75k gates + 3 rams DEF Interface DEF File DEF File

3:02 min + HAND edits

DEF Interface

OpenAccess Milkyway

When To Use Scripting Language

Milkyway To OpenAccess

Python Interface

Python Interface MW to OA Python App – 5:50 min

In Memory Interpretive Translators File Based Compiled Translators

(15)

CHIP CELL

(16)

16

When to use scripting language

Browse Milkyway

(17)
(18)

18

When to use scripting language

Browse OpenAccess

(19)

When Not To Use Scripting

Language

Complex Data Structures

Complex Algorithm

(20)

20

When not to use scripting language

Cycle intensive programs such as DRC, Placement or Routing.

These may be prototyped in a language like python but will not be useful in production

Example

§ Flexstream to Milkyway • Not the same problem as

Milkyway to OA

• Different connectivity model requires converting “edge

connected” shapes to “center line connected” shapes

• DRC algorithm

FlexStream 1.0

(21)

When not to use scripting language

Flexstream to Milkyway

Insert WIRE

(22)

© 2006 LSI Logic Corporation

22

Python For

(23)

Python For Milkyway

Milkyway Flavor of LSI Internal Common AP

§ Difficult to write Python wrappers for Milkyway API

§ Common API makes writing python wrappers relatively easy

Python wrappers ( for the Common API )

§ Usable for any data base

string AvantNet :: Name() const { if (!ObjectId() )

return string(); // Return empty String

char * name = NULL;

// Milkyway MWXDb_Get_name() will allocate memory

// for the net name, so this method is responsible for the memory

int32 rc = MWXDb_Get_Net_name ( CellId(), ObjectId(), &name );

if ( !AvantApiMWXError(rc,"Find Net Name") ) // throw exception or issue error message

return string(); // if in message mode

string result = name;

free(name); // Further, certain names (i.e. layer names) may not be freed.

return result;

(24)

24

Python For Milkyway

Python Wrapper (Milkyway Flavor of API)

#define PDPY_AVANTI_API

#include "so_sdb_avant.H“ (#define SdbNet AvantNet)

(25)

Python for OpenAccess

Code is auto-generated directly from header files

§ We considered SWIG and BOOST PYTHON

• Reduce maintenance with code updates

Each OA type maps to a real Python type

Python API matches C++ API as much as possible

Code Generator API Header Files Hint Information Extension

(26)

© 2006 LSI Logic Corporation

26

(27)

SUMMARY

PYTHON & TCL Are used extensively at LSI

§ Both provide an interpreted high-level programming environment.

§ Widely available and well supported.

§ Free

Python has been historically used as the primary scripting

language for programs performing complex operations on large data bases

§ Familiarity.

§ Easy to manage large programs.

§ Rapid prototyping

§ Component gluing

§ Flexibility, Interactivity, Debugging, Testing, etc.

TCL has been historically used as embedded command processor for applications.

§ Works well when program is small, the amount of data being managed is small & the data structures map well to strings.

(28)

28

SUMMARY

JAVA

§ LSI Common API was developed when JAVA was in its infancy

§ JAVA is very well supported and its feature set is growing at a much faster rate than Tcl or Python.

Productivity gains achieved through Eclipse are such

that we may not have a choice but to move to JAVA.

LSI is considering developing JAVA wrappers for

(29)
(30)

30

And Now For Something Completely Different

Can you guess the following language?

Hint : ! English

class HELLO_WORLD

create

make

feature

make is

do

io.put_string ("Hello, world!%N")

end

end

References

Related documents