1 / 36

Open Microelectronics architecture considerations

www. ing.unipi . it. Open Microelectronics architecture considerations. Marek Gayer , Ph.D. Some of goals of framework. Interactive input of simulation parameters and interactive visualization Programmable flow of simulation modules Open source Multiplatform (at least Windows + Linux)

bao
Download Presentation

Open Microelectronics architecture considerations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. www.ing.unipi.it Open Microelectronicsarchitecture considerations Marek Gayer, Ph.D.

  2. Some of goals of framework • Interactive input of simulation parameters and interactive visualization • Programmable flow of simulation modules • Open source • Multiplatform (at least Windows + Linux) • Easy installation and updates • Easily extendible by user without recompiling • Server based simulation • Ability to develop and contribute without necessity to understand whole problems and technologies • Should encourage others to contribute

  3. Basics of Architecture Server(like deckbuild)Server Scripting – CGI, PHP, JSP, Python, PerlFlow Control – XML, XSLT, Python, PHP Simulator modules and their bindings (C/C++, Fortran) Data interchange between modules (C++ library, files) Visualization creating / assistance modules (reduced XML grid, web graphics formats) Interactive Device designer(like devedit) User Interface - C++ with Qt / GTK / etc.UI – Java / Java Web Start / Applet UI - ECMAScript + SVG + DHTML Design and flow visualization - SVG, OpenGL, Library capabilities Task to solve XMLover TCP/IP Interactive Visualization(like tonyplot/3d) Visualization by: OpenGL , SVG , VRML – X3D, Java2D/3D Common video formats Statistics Visualization Interaction Data Storage of results on server: Files, SQL, XML, ...

  4. Interactive designer • Will specify the task to compute server(shape, materials, doping, …) • Will also specify flow of simulation modules, perhaps by an interactive graph editor • Can create a grid, eventually meshing • Result will be send to server • Will use 2D shapes graphics, with control of Z axis • Could be made as a master thesis(es)

  5. Interactive designer –C++ • + Fast performance • +C/C++ will be probably used for simulation modules and passing data • - We must make and test binaries for supported platforms • - Easy delivery and update via web browser not possible (like in Java)

  6. Interactive designer –User Interface –C++ with Qt • + Most professional solution for multiplatform UI • + Windows / Linux / Mac (native widgets) • + Good documentation • + Completeness • + User Interface Designer (Qt Designer) • + Bindings for Python, Java • - GPL / commercial license • + Used by Google Earth, Skype (Linux), KDE (Linux) • http://en.wikipedia.org/wiki/QT • http://www.trolltech.com/

  7. Qt Designer by Trolltech

  8. Interactive designer User Interface –C++ with GTK+ • + Often used for multiplatform UI • + Windows / Linux / Mac (native widgets) • - User Interface Designer • + Bindings for Python, Java • + LGPL license • - Written in C, although C++ wrapper exists (gtkmm) • + Used by Gnome, GIMP, Firefox • http://en.wikipedia.org/wiki/GTK • http://www.trolltech.com/

  9. Glade – UI designer for GTK+

  10. Interactive designer User Interface –C++ • Other alternatives: • wxWidgets • FoxToolkit • FLTK • Ultimate++

  11. Interactive designer –Java • + Ability to deploy application in various ways(web start, applet, java binaries) • + Rich library (e.g. java2d) http://java.sun.com/products/java-media/2D/ • + Many open source projects are in Java (SF: 23.000 Java, 20.000 C++, 18.000 C) • +Java Web start • - Java apps need considerable more memory • - Java runtime must be installed

  12. Drawing with Java2D Library

  13. Interactive designer – Java – SWING library • + Made by Sun • + Looks similar on each platform • + Good object model design(more pure Java) • - Native GUI applications looks still better • http://en.wikipedia.org/wiki/Swing_(Java) • http://java.sun.com/products/jfc/tsc/sightings/

  14. Maple 10 UI made with SWING

  15. Interactive designer – Java – SWT library • + Made by IBM • + Looks more native on each platform • -Worser object model design • - Harder to develop then Swing • - More neccessary to test each platform • + More professional look • http://en.wikipedia.org/wiki/SWT

  16. SWT on different platforms and Eclipse on Window Vista

  17. Interactive designer –Java Web Start • + Allows easy installation and launching of software through web browser • + Easy update of new versions of software • + When installed once, it is not necessary to install again (under the condition that no changes were made) • + During update, new jars are downloaded • + Ability to use all features of Java: menus, user interface, graphics, … • http://en.wikipedia.org/wiki/Java_Web_Start

  18. Interactive designer ECMAScript (AJAX) • + Not necessary to install anything (Firefox) • + Easy delivery of new versions of application • + Fast start of application • - Considerably harder to develop complex applications then with C++ / Java(hard testing, debugging) • - No IDE, no GUI designer, unmature tools • - Strange class/object model syntax • - Poor general class library (e.g. strings) • - Cannot access local filesystem due to security • - Limitations of UI due to DHTML • - Differences in each browser => necessary to test and maintain for new browsers • - Memory requirements • - Interpreted, not compiled => slow • +- Graphics would have to be in SVG • http://en.wikipedia.org/wiki/Ajax_(programming)

  19. Google spreadsheet in ECMAScript

  20. Designer and simulation flow visualization • Using the visualization in the UI package: • Graphics View for Qt • Cairo for GTK • Java2D for Java • Using SVG • Using OpenGL

  21. SVG • Standard for vector and raster graphics based on XML used namely on the web • With Batik, generation of SVG is as easy as in Java2D (implements same interface)http://en.wikipedia.org/wiki/Batik • Possibility to add ECMAScript functionality • Possibility to generate SVG from XML using XSLT transformations • Good support in browsers and other software • http://en.wikipedia.org/wiki/Scalable_Vector_Graphics

  22. OpenGL • + Portable library for 3D/2D graphics • - No object layer • - Uses state machine concept • - More complex to learn and to use due to less abstraction level (compared to e.g. Java2D) • + Very fast performance • + Bindings for different languages, including Java: http://en.wikipedia.org/wiki/Java_OpenGL

  23. Inside Web Server Visualization / Data assitance (SVG / VRML / MPG / XML) Interactive visualization User defined flow in e.g. Python / XML Interactive designer Server core – CGI/PHP/JSP/Python Sim.mod. 1 Sim.mod. 2 Data Synchronizing libraries / (XSLT) data converters Sim.mod. 3 File/ SQL Shared Memory

  24. Server Side (1/2) • PHP/Python/JSP/CGI scripts on HTTP server will maintain communication with interactive and visualization parts (including translation of data) • Will control the flow of simulation by launching simulation modules (written in C++/Fortran) • Data exhange between simulator modules will be realized using e.g. special C++ library, shared memory, PHP/Python glue code • Mechanism for calling C functions from Python/PHP glue should be investigated (something better then exec with files as arguments) – e.g. PHP extensions. • How modules will be compiled and linked together should be investigated

  25. Server Side (2/2) • Possibility of using shared memory should be investigated • Input and output of modules could be defined XSD schema • Parts of glue could be defined by XML data (programmable by user / generated by designer) • XSLT transformations could be used for translation of data to format that module expects • http://en.wikipedia.org/wiki/XSLT • Results (including partial ones could be saved in files and/or SQL DB

  26. Interactive visualization of results • Interaction with server for selecting part of currently visualized data of transistor • At least at beginning of project 2D visualization should be sufficient • Possibility to implement one or more of: • OpenGL • SVG (created on server) • VRML/X3D (created on server) • JPG / MPEG (created on server) • Delivering numerical data and stats. (XML)

  27. VRML/X3D • 3D Model scene is defined in text format • Can be zoomed, rotated, etc. • Requires plugin in web browser • Those plugins are not fully compatible (Scripting …) • For using in standalone application, library is needed (CyberX3D, OpenVRML, Xj3D, H3D) • X3D (ISO standard) is successor of VRML, adds support XML • For modification of visualization data, new VRML/X3D file is usually created on server • http://en.wikipedia.org/wiki/VRML • http://en.wikipedia.org/wiki/X3D

  28. Progress (1/3) • Established working environment for Python, Numpy and building extensions in CygWin • Even possible to run KDevelop and KDBG (possible to debug extensions!) • Read important parts on Python and Numpy programming book (“Python Scripting For Computational Science”) • Created sample module in C, with one and two dimensional float arrays and pointer to function. Various programming styles (3 version of wrapper func used) • The 2D and 1D arraysarenow accessible in both C and Python. Able to also use Python dictionary type

  29. Progress (2/3) • With NUMPY, converting to type * and type ** does not need additional memory and values do not have to be copied (in type **, helper mapping array of pointers must be created) • NUMPY alone is a reason to stick with Python • Python extensions cannot be build easily with Windows (requires 5 packages including.net framework SDK – hundreds of MBs) • Able to compile ViDES as library, then to link with wrapper as Python extension (no need to change a single line in original source code).

  30. Progress (3/3) • Wrote wrapper accepts tens of NumPY arrays and converts them to C type *(*) • Wrote allocations and file operations to fill all needed variables for module struttura to Python • Compiles and links, but I am getting Segmentation fault (debug needed)

  31. Progress2 (1/3) • Succesfully debugged ViDES struttura - results in binary files are 100% same • NumPy basic operations under matrixes should be same as C extension (for example I tested scalar multiplying on 1000x1000 matrix: 0.21s vs 0.20s) • Compared performance of versions of array accessing in Python and NumPy array as C extension - 2D arrays (NumPy, C), 1D (NumPy), and 2D lists (Python)

  32. Progress2 (2/3) • defPythonArray2dGridLoop (a, x, y, f): • for i in xrange(x.size): • for j in xrange(y.size): • a[i][j] = f(x[i], y[j]);# OR # • a[i][j] = x[i] + y[j];# OR # • return a; • Results: (e.g. 0.02s C vs. 3.5s Python), but with one Python callback 0.75s C vs. 3.9s Python • Howeever, direct manipulation in cycles is still slow; i.e. fast code is expected to be moved to C extension

  33. Progress2 (3/3) • Could be a good idea to buy NumPy book, for $39.99 (electronic pdf version), I read first 50 sample pageshttp://www.tramy.us/guidetoscipy.html Documentation for older package, Numeric is available here: http://numpy.sourceforge.net/numdoc/numdoc.pdffor most case it should be enough • TODO: make C++ class with overloaded operators, as possible recommended datatype to use in C++ modules and check performance againts double **

  34. Progress2 Notes (1/2) • Shape of NumPy array can be anytime changed in python, but we must keep the number of items • Extended slice operations, which has base in python are inspired from Numeric/Numpy package • Numpy natively supports hundreds of operations: • Aritmetic operators (*+-^%+=): • Concetation of matrices • Slices and indexing • Creation of Matrices and Vectors (filling arrays e.g. identity matrix) • Reshaping • Assigment of multiple values • Transposing • Inverting

  35. Progress2 Notes (2/2) • Determinant • Summary of various elements • Sorting • Finding maximum and minimum • Flipping • Rotating • Various kind of multiplications • Finding values based on conditions • Statistics (average, median, variance, correlation, covariance) • Solving differential equation (diff function) • Fourier transformation • Direct reading from/to file. these operations are implemented in C

  36. Thank you for your attention. ??? Do you have any questions ?

More Related