GithubHelp home page GithubHelp logo

cicsim's Introduction

Custom IC Creator Simulation Tools

tests

Why

This is a script package I use to control ngspice, it can

  • Run corner simulations
  • Create IPs (used in wulffern/aicex )
  • Create simulation directories
  • View waveforms

Changelog

Version Status Comment
0.0.1 First version of cicsim
0.0.3 All in on open source tools
0.1.2 First version on pipy
0.1.3 github action update
0.1.4 Added waveform viewer
0.1.5 Update waveform viewer

Install this module

If you want to follow the latest and greatest

git clone https://github.com/wulffern/cicsim
cd cicsim
python3 -m pip install --user -e . 

If you want the latest stable

python3 -m pip install cicsim

Get started with simulation

Head over to Open source analog integrated circuit flow on Skywater 130nm to see cicsim in action.

Get started with waveform viewer

Make sure you install a python version with tk. On my mac it was

brew install python-tk

Once installed, I do

cicsim wave output_tran/tran_SchGtTtKffVh_*

Commands

Usage: cicsim [OPTIONS] COMMAND [ARGS]...

  Custom IC Creator Simulator Tools

  This package provides helper scripts for simulating integrated circuits

Options:
  --help  Show this message and exit.

Commands:
  plot         Plot from rawfile
  portreplace  Replace ${PORTS} and ${VPORTS} with the subcircuit ports...
  results      Results of single runfile
  run          Run a ngspice simulation of TESTBENCH
  simcell      Create a ngspice simulation directory for a Cell
  srun         Run a spectre simulation of TESTBENCH
  summary      Generate simulation summary for results
  wave         Open waveform viewer

cicsim's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cicsim's Issues

Add support for --replace (JSON|YAML) file option

The testbench allow for {str} replacements. Currently there is a limited set of replacements allowed, for example {cicname}.

It should be easy to add option for taking input from a JSON or YAML file for replacements

Add expression support

ngspice does not allow for expressions with parameters in analysis or some other expressions.

Extend cicsim to do search for [expr] pattern (excluding \w+[expr] for busses) and run the expression.

For example:
tran [({nbpt} + 5)*PERIOD_CLK]

  1. Read parameters in testbench, so it's possible to use parameters?
  2. Find expressions
  3. Replace {str} patterns
  4. Run eval() and convert to string.

Should I add something to try and avoid code injection??

  • Excluding lines with \n in them should reject most python code maybe, but for sure, not a guarantee.

Remove cicsim ip

Moved to cicconf. "Make a program that does one thing well" so cicsim ip does not belong to cicsim

Missing License

I'm working on packaging cicsim and cicconf as Nix Flakes and noticed the cic* packages are missing licenses. Probably not a critical problem, but having a clear license generally makes things easier.

Add hash of spice netlist

To avoid re-simulation if the inputs have not changed, I should make a hash of files.

Calculate a sha hash for most included files. If they are a match, then don't run the sim, but do run the measurement.

  1. Figure out how deep I should check. I probably don't want to hash the PDK files.
  2. Need a option to override "--force-run"

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.