Git Product home page Git Product logo

xls's Introduction

XLS Logo

XLS: Accelerated HW Synthesis Continuous Integration

Docs | Quick Start

What is XLS?

The XLS (Accelerated HW Synthesis) project aims to enable the rapid development of hardware IP that also runs as efficient host software via "software style" methodology.

XLS implements a High Level Synthesis (HLS) toolchain which produces synthesizable designs from flexible, high-level descriptions of functionality. It is fully Open Source: Apache 2 licensed and developed via GitHub.

XLS is used inside of Google for generating feed-forward pipelines from "building block" routines / libraries that can be easily retargeted, reused, and composed in a latency-insensitive manner.

Not yet available, but active work in progress is the implementation of XLS concurrent processes, in Communicating Sequential Processes (CSP) style, that allow pipelines to communicate with each other and induct over time.

XLS is still experimental, undergoing rapid development, and not an officially supported Google product. Expect bugs and sharp edges. Please help by trying it out, reporting bugs, and letting us know what you think!

Building From Source

Currently, XLS must be built from source using the Bazel build system.

Note: Binary distributions of the XLS library are not currently available, but we hope to enable them via continuous integration, see this issue.

The following instructions are for the Ubuntu 20.04 (Focal) Linux distribution. Note that we start by assuming Bazel has been installed.

~$ git clone https://github.com/google/xls.git
~$ cd xls

~/xls$ # Follow the bazel install instructions:
~/xls$ # https://docs.bazel.build/versions/master/install-ubuntu.html
~/xls$ # Afterwards we observe:
~/xls$ bazel --version
bazel 4.0.0

~/xls$ # Note we're going to tell Ubuntu that `/usr/bin/env python` is actually python3
~/xls$ # here, since that is not the case by default on Ubuntu 20.04.
~/xls$ sudo apt install python3-distutils python3-dev libtinfo5 python-is-python3

~/xls$ # Now build/test everything in optimized build mode.
~/xls$ bazel test -c opt ...

A reference build/test environment setup is also provided via Dockerfile:

~$ git clone https://github.com/google/xls.git
~$ cd xls
~/xls$ docker build . -f Dockerfile-ubuntu-20.04 # Performs optimized build and test.

Stack Diagram and Project Layout

Navigating a new code base can be daunting; the following description provides a high-level view of the important directories and their intended organization / purpose, and correspond to the components in this XLS stack diagram:

XLS Stack Diagram
  • dependency_support: Configuration files that load, build, and expose Bazel targets for external dependencies of XLS.

  • docs: Generated documentation served via GitHub pages: https://google.github.io/xls/

  • docs_src: Markdown file sources, rendered to docs via mkdocs.

  • xls: Project-named subdirectory within the repository, in common Bazel-project style.

    • build: Build macros that create XLS artifacts; e.g. convert DSL to IR, create test targets for DSL code, etc.
    • codegen: Verilog AST (VAST) support to generate Verilog/SystemVerilog operations and FSMs. VAST is built up by components we call generators (e.g. PipelineGenerator, SequentialGenerator for FSMs) in the translation from XLS IR.
    • common: "base" functionality that layers on top of standard library usage. Generally we use Abseil versions of base constructs wherever possible.
    • contrib/xlscc: Experimental C++ syntax support that targets XLS IR (alternative path to DSLX) developed by a sister team at Google, sharing the same open source / testing flow as the rest of the XLS project. May be of particular interest for teams with existing C++ HLS code bases.
    • data_structures: Generic data structures used in XLS that augment standard libraries; e.g. BDDs, union find, min cut, etc.
    • delay_model: Functionality to characterize, describe, and interpolate data delay for XLS IR operations on a target backend process. Already-characterized descriptions are placed in xls/delay_model/models and can be referred to via command line flags.
    • dslx: A DSL (called "DSLX") that mimics Rust, while being an immutable expression-language dataflow DSL with hardware-oriented features; e.g. arbitrary bitwidths, entirely fixed size objects, fully analyzeable call graph. XLS team has found dataflow DSLs are a good fit to describe hardware as compared to languages designed assume von Neumann style computation.
    • fuzzer: A whole-stack multiprocess fuzzer that generates programs at the DSL level and cross-compares different execution engines (DSL interpreter, IR interpreter, IR JIT, code-generated-Verilog simulator). Designed so that it can easily be run on different nodes in a cluster simultaneously and accumulate shared findings.
    • examples: Example computations that are tested and executable through the XLS stack.
    • experimental: Artifacts captured from experimental explorations.
    • interpreter: Interpreter for XLS IR - useful for debugging and exploration. For cases needing throughput, consider using the JIT (below).
    • ir: XLS IR definition, text parser/formatter, and facilities for abstract evaluation.
    • jit: LLVM-based JIT for XLS IR. Enables native-speed execution of DSLX and XLS IR programs.
    • modules: Hardware building block DSLX "libraries" (outside the DSLX standard library) that may be easily reused or instantiated in a broader design.
    • netlist: Libraries that parse/analyze/interpret netlist-level descriptions, as are generally given in simple structural Verilog with an associated cell library.
    • passes: Passes that run on the XLS IR as part of optimization, before scheduling / code generation.
    • scheduling: Scheduling algorithms, determine when operations execute (e.g. which pipeline stage) in a clocked design.
    • simulation: Code that wraps Verilog simulators and generates Verilog testbenches for XLS computations.
    • solvers: Converters from XLS IR into SMT solver input, such that formal proofs can be run on XLS computations; e.g. Logical Equalence Checks between XLS IR and a netlist description.
    • synthesis: Interface that wraps backend synthesis flows, such that tools can be retargeted e.g. between ASIC and FPGA flows.
    • tests: Integration tests that span various top-level components of the XLS project.
    • tools: Many tools that work with the XLS system and its libraries in a decomposed way via command line interfaces.
    • uncore_rtl: Helper RTL that interfaces XLS-generated blocks with device top-level for e.g. FPGA experiments.
    • visualization: Visualization tools to inspect the XLS compiler/system interactively. See IR visualization.

Community

Discussions about XLS - development, debugging, usage, and anything else - should go to the xls-dev mailing list.

Contributors

The following are contributors to the XLS project, see our contributing documentation and good first issues!

xls's People

Contributors

albert-magyar avatar blaok avatar brajiang avatar briansrls avatar cbalint13 avatar cdleary avatar cjdrake avatar d0k avatar dkillebrew-g avatar dmlockhart avatar felixzhuologist avatar grebe avatar hmontero1205 avatar hongted avatar jbaileyhandle avatar julianviera99 avatar kevineharlley avatar lromor avatar meheffernan avatar per-gron avatar rchen152 avatar rhundt avatar robspringer avatar ted-xie avatar vincent-mirian-google avatar

Watchers

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