Coder Social home page Coder Social logo

nanotas's Introduction

nanoTAS

A tiny (hence nano) framework for characterizing stdcells with pyspice

Description

This experimental framework was created to support logic cell characterisation with PySpice. It is able to derive timing information for logic gate cells. It can compute delay and transition times for rising and falling transitions with different load capacitances and input slews.

The requirements are:

  • PySpice (https://pyspice.fabrice-salvaire.fr/index.html)
  • Transistor models in a format compatible with ngspice
  • Spice netlists for the gate cells
  • "driver" files which specify the gate ports, the test scenarios and other per-cell parameters
  • A configuration file called "config.py"

A sample for the configuration file can be found in config.py.sample. Copy the file to "config.py" and edit it. For details see the comments inside this file.

For the driver files, samples are provided in "drivers-examples".

Basic usage

Check out this script framework somewhere and set the path to the directory containing "nanotas.py".

Make sure the "config.py" file is in the current directory.

Run "nanoTAS":

nanotas.py

Details about the implementation

The implementation is based on PySpice which is a Python library wrapping libngspice ("shared ngspice") and combining it with NumPy. In effect this is a very convenient framework for running mass simulations on synthetic spice netlists and combining them with automated analysis. For details about the PySpice API see https://pyspice.fabrice-salvaire.fr/overview.html.

nanoTAS implements a context class collecting the setup from the driver files. Technically the driver files are Python scripts executed in the context of this object. Upon "collect", PySpice is used to prepare a netlist for each inslew/capa load pair with the stimulus pulse, the DC power source, dummy loads for ngspice convergence and the capacitance loads.

After this, the simulation is started using the time interval and time resolution provided by the config file.

The collected waveforms are analysed to get the measurements:

  • Input pin capacitances are computed by integrating over the input pin current (charge Q) and using C = Q/U.
  • The energy per transition is computed by integrating the power supply current (Q) and using the energy equation: E = Q*U.
  • The rise and fall times are computed as the time difference between the 10% and 90% levels.
  • The delay times are measured between the 50% transitions of input and output.

TODO

  • Simplify the production of driver files
  • Support for hold/setup time extraction for latches and FF's
  • Generation of .lib files
  • Assertions for checking the correctness of the driver's logic
  • Distributed simulations

nanotas's People

Contributors

klayoutmatthias avatar

Stargazers

 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.