Giter Site home page Giter Site logo

mdmfernandes / smoc Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 5.0 1.16 MB

A stochastic circuit optimizer for Cadence Virtuoso, using the NSGA-II genetic algorithm.

License: GNU General Public License v3.0

Python 98.91% Shell 1.09%
cadence-virtuoso circuit-simulation optimization-tools deap nsga-ii genetic-algorithm ade-xl circuit python

smoc's Introduction

A Stochastic Multi-objective Optimizer for Cadence Virtuoso (SMOC)

Client: Python -V client Server: Python -V server License: GPL v3

This project is no longer maintained, as I no longer have access to Cadence Virtuoso. If you are interested in contributing and have any questions, feel free to contact me.

SMOC is a stochastic circuit optimizer based on the NSGA-II genetic algorithm (GA) for Cadence Virtuoso, written in Python. The GA is implemented using the DEAP library.

This application has two components:

  • Optimizer: Performs the optimization of the circuit and communicates with the server to send circuit variables and get simulation results. This module is available here.
  • Server: Communicates with Cadence Virtuoso and with the Optimizer to exchange circuit variables, simulation results, etc. This module is available here.

For more info about the communication, please check the SOCAD project.

The circuit simulations are performed using the Cadence Virtuoso ADE-XL. If you only have access to ADE-L, you can modify SMOC to use it instead (this tutorial may be helpful). The ADE-XL was used because it allows to perform parallel simulations, thus reducing the optimization time.

Installation

This section refers only to the optimizer.

Although not mandatory, you can install the SMOC in your machine to simplify it's use (i.e. run it directly from the system's path). There are two options to install SMOC, as shown below.

Build from source

Go to the project folder and run:

python setup.py install

Install with pip

Although the project is not in PyPI, you can install it using pip. Go to the project folder and run:

pip install .

NOTE: run pip install smoc from the project directory doesn't work because pip will look for the package on PyPi.

After using one of these methods, all dependencies will be installed and SMOC will be added to your path as smoc.

If you prefer to not install SMOC, you can run it as like any Python program. To install the required depedencies please check the Requirements below.

Requirements

Python versions

The optimizer module requires Python 3.6 or above, and the server module requires Python 2.6 or above (including Python 3.0+ versions). The required packages are shown below.

SMOC server is compatible out of the box with Python 2.6+, so no additional packages are required.

Packages (optimizer)

SMOC requires the following packages, which are specified in requirements.txt:

  • DEAP - Implementation of the NSGA-II algorithm
  • SOCAD - Communication between the optimizer and Cadence Virtuoso
  • Bokeh - Plot of the pareto fronts resulting from the optimization process
  • PyYAML - Parse of the optimizer configuration file, which is written in YAML

You can install the packages manually or by using the following command:

pip install -r requirements.txt

Cadence Virtuoso

This app was tested with Cadence Virtuoso IC6.1.7-64b.500.15 and the ADE-XL environment.

Usage

Optimizer

The optimizer can be run from any machine that is able to communicate with the machine where Cadence Virtuoso is installed. It can be placed in the same machine (for more info about the communication, please check the SOCAD project).

$ smoc [-h] [-c FILE] [-d] CFG

positional arguments:
  CFG                   file with the optimizer parameters

optional arguments:
  -h, --help            show this help message and exit
  -c, --checkpoint FILE
                        continue the optimization from a checkpoint file
  -d, --debug           run the program in debug mode

Please note that if you didn't installed SMOC in your machine, you need to use the following command (from the project's root directory) to run the app:

python -m smoc [-h] [-c FILE] [-d] CFG

Server

The SMOC server should be placed in the machine where Cadence Virtuoso is installed.

$ python start_cadence.py [-h] FILE

SMOC - A Stochastic Multi-objective Optimizer for Cadence Virtuoso

positional arguments:
  FILE        file with the SMOC server parameters

optional arguments:
  -h, --help  show this help message and exit

Extras

You can find useful documents related to this project, but that doesn't fit in the project structure, in this public repository.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Versioning

We use SemVer for versioning. For the versions available, see the releases on the project repository.

Authors

License

This project is licensed under the GPLv3 License - see the project LICENSE file for details.

smoc's People

Contributors

dependabot[bot] avatar mdmfernandes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.