Giter VIP home page Giter VIP logo

csim's Introduction

Coverage Status

CSIM

This is a SPICE-like analog circuit simulator, for DC/AC Sweep and Transient (time-domain) analysis.

It mainly supports the following device models:

  • BSIM3v3.2 (MOSFET Model)
  • CCCS (Current Controlled Current Source)
  • CCVS (Current Controlled Voltage Source)
  • VCCS (Voltage Controlled Current Source)
  • VCVS (Voltage Controlled Voltage Source)
  • DC and AC voltage and current sources
  • Resistor
  • Capacitor
  • Inductor
  • PN Junction
  • and more (by the dynamic link library loader)

And the following sweep methods:

  • Linear
  • Decade
  • Octave
  • Logarithm

What I have done:

  • MNA (Modified Nodal Analysis) with Newton-Raphson iteration
  • GEAR numerical integration
  • LU decomposition
  • HSPICE-like model parser
  • Some unit tests

TODO:

  • CLI/GUI Frontend
  • Improve the sparse matrix algorithm
  • Parallel computing acceleration (with GPU)
  • Mixed digital domain (with Verilator, IcarusVerilog, etc.)

Guides

Build

Build unit tests with code coverage:

  • mkdir build && cd build
  • cmake .. -Denable_testcases=ON -Denable_coverage=ON -DCMAKE_BUILD_TYPE=Debug
  • make -j

Run

Running tests with code coverage:

  • make coverage

The result will be reported in build/coverage.html

Running tests without coverage:

  • make check

or

  • export LD_LIBRARY_PATH=`pwd`
  • ./tstall

API document

Generating documents:

Before that, Doxygen needs to be installed. If not, rerun cmake after the installation.

  • make docs

csim's People

Contributors

cassuto avatar sunqiao520 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.