Code Monkey home page Code Monkey logo

circt-stream's Introduction

CIRCT Stream

This project aims to add a streaming abstraction on top of CIRCT which in itself depends on MLIR.

Setup

Prerequisites

Apart from cmake and Ninja, this project does not come with any prerequisites. To reduce the amount of memory required, it is beneficial to install llvm's lld, as it is much more memory efficent than ld.

Cloning

This project has a pinned version of CIRCT which in turn comes with a pinned verison of LLVM. These submodules can directly be initialized when the repository is cloned:

git clone --recurse-submodules [email protected]:Dinistro/circt-stream.git

Building

Before the circt-stream project can be built, its dependencies need to be built.

To make things easier, one should build CIRCT together with LLVM as follows:

mkdir circt/build && cd circt/build
cmake -G Ninja ../llvm/llvm \
    -DCMAKE_BUILD_TYPE=Debug \
    -DLLVM_ENABLE_PROJECTS=mlir \
    -DLLVM_ENABLE_ASSERTIONS=ON \
    -DLLVM_EXTERNAL_PROJECTS=circt \
    -DLLVM_EXTERNAL_CIRCT_SOURCE_DIR=.. \
    -DLLVM_USE_LINKER=lld \ # remove if lld isn't present
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++ \
    -DLLVM_CCACHE_BUILD=1 # remove if CCache isn't present
ninja

After CIRCT has been built, one can build this project as follows:

mkdir build && cd build
cmake -G Ninja .. \
    -DLLVM_DIR=$PWD/../circt/build/lib/cmake/llvm \
    -DMLIR_DIR=$PWD/../circt/build/lib/cmake/mlir \
    -DCIRCT_DIR=$PWD/../circt/build/lib/cmake/circt \
    -DLLVM_EXTERNAL_LIT=$PWD/../circt/build/bin/llvm-lit \
    -DLLVM_ENABLE_ASSERTIONS=ON \
    -DCMAKE_BUILD_TYPE=DEBUG \
    -DLLVM_USE_LINKER=lld \ # remove if lld isn't present
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++
ninja

Testing

There are two types of tests. FileCheck tests can be executed with the following command:

ninja check-stream

To execute the integration tests, an installation of Icarus Verilog and pythons cocotb and cocotb-test packages are required.

ninja check-stream-integration

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.