Skip to main content

Logik is a light weight FPGA tool chain based on mature open source technologies.

Project description

Logik

Regression Lint


Logik is an open source FPGA toolchain that fully automates converting RTL to bits, including synthesis, placement, routing, bitstream generation, and analysis. Users enter design sources, constraints, and compile options through a simple SiliconCompiler Python API. Once setup is complete, automated compilation can be initiated with a single line run command.

logik_flow

Logik supports most of the features you would expect in a commercial proprietary FPGA tool chain.

Feature Status
Design languages Verilog, SystemVerilog, VHDL
ALU synthesis Supported
RAM synthesis Supported
Timing constraints (SDC) Supported
Pin Constraints (PCF) Supported
Bitstream generation Supported
IP management Supported
Remote compilation Supported
Multi-clock designs In progress
FPGA devices ZA

Getting Started

The Logik project is available through PyPi and can be installed using pip. If you want to run locally on your machine, you will need to install all of the pre-requisites or launch the Logik Docker image.

python -m pip install --upgrade logik

The following example illustrate some essential Logik features. For complete documentation of all options available, see the SiliconCompiler project.

from siliconcompiler import Chip
from logik.targets import logik_target

def hello_adder():

    # Create compilation object
    chip = Chip('adder')

    # Specify design sources
    chip.input('adder.v')

    # Specify pin constraints
    chip.input('adder.pcf')

    # Compiler options
    chip.set('option', 'quiet', True)
    chip.set('option', 'remote', True)

    # Select target fpga
    chip.set('fpga', 'partname', 'logik_demo')

    # Load target settings
    chip.load_target(logik_target)

    # Run compiler
    chip.run()

    # Display compiler results
    chip.summary()

if __name__ == "__main__":
    hello_adder()

This code can be run with ./adder.py -remote in the examples/adder directory, resulting in an FPGA bitstream at build/adder/job0/convert_bitstream/0/outputs/adder.bin.

To test out the generated bitstream, you can upload it to an emulated FPGA device running in the Zero ASIC Digital Twin Platform.

More Examples

Documentation

Installation

Logik is available as wheel packages on PyPI for macOS, Windows and Linux platforms. For a Python 3.8-3.12 environment, just use pip to install.

python -m pip install --upgrade logik

Running natively on your local machine will require installing a number of prerequisites:

Automated Ubuntu based install scripts are included for convenience within the SiliconCompiler project. Detailed instructions for installing all tools can be found in the SiliconCompiler Installation Guide.

Running Docker

A Docker image is provided for users who wish to avoid the installation of the pre-requisite tools. The following command starts a new container from that image and maps the local directory sc_work to the path /sc_work in the container.

docker run -it -v "${PWD}/sc_work:/sc_work" ghcr.io/siliconcompiler/sc_runner:latest

License

MIT

Issues / Bugs

We use GitHub Issues for tracking requests and bugs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logik-0.0.5.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

logik-0.0.5-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file logik-0.0.5.tar.gz.

File metadata

  • Download URL: logik-0.0.5.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for logik-0.0.5.tar.gz
Algorithm Hash digest
SHA256 d27241a29332fe3b670d523e8fd3d2e9c6b96b2e0ca1f71ba3ad160e664b453d
MD5 9469801f3c2b1a1d5f203975fc08aacf
BLAKE2b-256 010551c5197f5ee3b2da3fb4dd27ba18a0e763b9100292b99b3987aa8051f5c6

See more details on using hashes here.

File details

Details for the file logik-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: logik-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for logik-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0cc7774cd51b60ea85a9a8e2b0ce298959074c8c1b6deff66518d9980e9d754c
MD5 47665e923c8177ce03376eca372b3caa
BLAKE2b-256 6d0a4df7cce8fd6466c0f14176de6d5833509fd006e5ce3da3f7922cbc1969a5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page