Giter Club home page Giter Club logo

logic-simulator's Introduction

Logic Simulator

Course Assignment - EE 677 - Foundations of VLSI CAD

We can simulate any combinational circuit using this Logic Simulator

Author: Rohan Rajesh Kalbag

Open logic_simulator.ipynb to see the code working in action, and access the code, relevant markdown documentation, for the 2X1 MUX netlist example which is given at /circuit.txt

Instructions to use the Logic Simulator

  • Set up Python 3.x virtual environment and use the command in terminal pip install -r requirements.txt to make sure you have all the required dependencies.
  • If needed change the /circuit.txt in such a way as following the following netlist convention given after instructions
  • Run the python script logic_sim.py using python ./logic_sim.py and find the output truth table in truthtable.csv

Input Netlist Convention

We shall use .txt netlist file with a NGSPICE like style to describe the various components connected, to input the circuit configuration which we wish to simulate. This is an example


* this is a comment

* inp <nodes seperated by spaces> denotes input nodes to circuit

inp n1 n2 n4 n6


* outp <nodes seperated by spaces> denotes output nodes to circuit

outp n3 n5 n7


and n1 n2 n3

* denotes and gate with inputs n1 and n2, output as n3


or n3 n4 n5 

* denotes or gate with inputs n3 and n4, output as n5 


inv n6 n7

* denotes inverter with input n6 and output n7

logic-simulator's People

Contributors

rohankalbag 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.