Coder Social home page Coder Social logo

animeshk-me / circuit-paths-enumerator Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 69 KB

This script lists out all paths from inputs to outputs of an input combinational circuit in the form of structural/gate-level modelling in verilog. The BFS graph algorithm is used.

Python 100.00%
graph-algorithms graph-algorithm bfs combinational-logic verilog python3 bfs-algorithm python-script circuit enumeration

circuit-paths-enumerator's Introduction

Circuit Paths Enumerator

This project enumerates all the paths from inputs to outputs of a given combinational circuit.

Overview of the Project:

  • This is a python script which reads and parses a verilog file as input
  • Then it creates a directed acyclic graph(DAG) to represent the equivalent combinational circuit.
  • Then it enumerates all the possible paths from the circuit inputs to outputs recursively.
  • The graph algorithm Breadth First Search(BFS) is used for this purpose.

Constraints:

This programs accepts a 'valid' verilog file as an input. A verilog file is 'valid' if,

  • It uses only the primitive gates, i.e. or, and, not, nor, xor, xnor and nand. These gates can have n inputs and 1 output.
  • It doesn't use any external verilog module.(i.e. `include's will not work)
  • It should look like this:

(Notice the absence of any tabs before any line of the file)


Execution method:

  • Run this command

      $ python3 enumerator.py
    
  • A prompt opens, enter the file name. The verilog file should satisfy above constraints

      $ Enter a valid verilog file name: <filename>
    
  • It prints out the graph equivalent to the combinational circuit specified in the form of the input verilog file and also enumerates all the paths from inputs to outputs.


circuit-paths-enumerator's People

Contributors

animeshk-me avatar

Stargazers

 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.