Git Product home page Git Product logo

f4pga-v2x's Introduction

Verilog to Routing XML file generation from Verilog (f4pga-v2x)

Documentation Status

v2x is a tool for converting specialized annotated Verilog models into XML needed for Verilog to Routing flow.

Documentation can be found at https://f4pga-v2x.readthedocs.io/en/latest/.

Installation

v2x can be installed from a local git repository using pip.

cd f4pga-v2x
pip install .

Alternatively, it can be installed from GitHub directly.

pip install git+https://github.com/chipsalliance/f4pga-v2x.git#egg=f4pga-v2x

Usage

After installing v2x, you can run v2x to use it.

v2x -h
usage: __main__.py [-h] [--top TOP] [--outfile OUTFILE] [--includes INCLUDES]
                   [--mode {pb_type,model}]
                   input.v [input.v ...]

Verilog to XML

positional arguments:
  input.v               One or more Verilog input files, that will be passed
                        to Yosys internally. They should be enough to generate
                        a flattened representation of the model, so that paths
                        through the model can be determined.

optional arguments:
  -h, --help            show this help message and exit
  --top TOP             Top level module, will usually be automatically
                        determined from the file name im.v
  --outfile OUTFILE, -o OUTFILE
                        Output filename, default 'output.xml'
  --includes INCLUDES   Comma separate list of include directories.
  --mode {pb_type,model}
                        Output file type, possible values are: pb_type and
                        model. Default value is pb_type

For example, to generate a pb_type xml file from adder.v, run

v2x -o adder.pb_type.xml adder.v

Or, to generate a model xml file, run

v2x --mode model -o adder.model.xml adder.v

v2x expects the module name to be the same as the file name. If it is different, make sure to specifiy it with the --top argument.

v2x --top BLOCK -o adder.pb_type.xml adder.v

Tests

The test cases are stored in tests/, and pytest can be used to run them.

rm -rf build  # run this step so that pytest uses the latest files for the tests
pytest -vv

If you are making changes to any python code, make sure that they follow the PEP8 style guide by running flake8.

flake8 tests
flake8 v2x

Documentation

We use sphinx for our documentation and the files are stored in docs/. To host it locally (if you are planning to update it), you can use the Makefile inside.

First, run make env to prepare a Conda environment that contains the necessary packages to build and host the documentation site. After that, simply run make livehtml which starts a local server running at port 8000 with the documentation site.

cd docs
make env
make livehtml

Talks

VPR device models generation from Verilog with V2X - Karol Gugala - ORConf 2019

v2x orconf talk

f4pga-v2x's People

Contributors

mithro avatar kgugala avatar mkurc-ant avatar gatecat avatar acomodi avatar daniellimws avatar glatosinski avatar litghost avatar elms avatar tmichalak avatar umarcor avatar jhol avatar rw1nkler avatar liibin avatar dhiraj240 avatar johndmcmaster avatar mglb 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.