All Projects → nlsynth → karuta

nlsynth / karuta

Licence: other
Karuta HLS Compiler: High level synthesis from prototype based object oriented script language to RTL (Verilog) aiming to be useful for FPGA development.

Programming Languages

C++
36643 projects - #6 most used programming language
Verilog
626 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to karuta

verilog-sid-mos6581
MOS6581 SID chip emulator in SystemVerilog
Stars: ✭ 22 (-75.28%)
Mutual labels:  fpga, verilog
SpinalCrypto
SpinalHDL - Cryptography libraries
Stars: ✭ 36 (-59.55%)
Mutual labels:  fpga, verilog
LVDS-7-to-1-Serializer
An Verilog implementation of 7-to-1 LVDS Serializer. Which can be used for comunicating FPGAs with LVDS TFT Screens.
Stars: ✭ 33 (-62.92%)
Mutual labels:  fpga, verilog
spu32
Small Processing Unit 32: A compact RV32I CPU written in Verilog
Stars: ✭ 51 (-42.7%)
Mutual labels:  fpga, verilog
verifla
Fork of OpenVeriFla - FPGA debugging logic analyzer to use with your designs - examples (so far) for ice40/IceStorm
Stars: ✭ 21 (-76.4%)
Mutual labels:  fpga, verilog
sphinxcontrib-hdl-diagrams
Sphinx Extension which generates various types of diagrams from Verilog code.
Stars: ✭ 37 (-58.43%)
Mutual labels:  fpga, verilog
MobileNet-in-FPGA
Generator of verilog description for FPGA MobileNet implementation
Stars: ✭ 107 (+20.22%)
Mutual labels:  fpga, verilog
platform-lattice ice40
Lattice iCE40: development platform for PlatformIO
Stars: ✭ 34 (-61.8%)
Mutual labels:  fpga, verilog
fpga-nn
NN on FPGA
Stars: ✭ 16 (-82.02%)
Mutual labels:  fpga, verilog
pdp6
PDP-6 Emulator
Stars: ✭ 47 (-47.19%)
Mutual labels:  fpga, verilog
virtio
Virtio implementation in SystemVerilog
Stars: ✭ 38 (-57.3%)
Mutual labels:  fpga, verilog
FPGA RealTime and Static Sobel Edge Detection
Pipelined implementation of Sobel Edge Detection on OV7670 camera and on still images
Stars: ✭ 14 (-84.27%)
Mutual labels:  fpga, verilog
gateware-ts
Hardware definition library and environment for designing and building digital hardware for FPGAs, using only open source tools
Stars: ✭ 83 (-6.74%)
Mutual labels:  fpga, verilog
ZYNQ-NVDLA
NVDLA (An Opensource DL Accelerator Framework) implementation on FPGA.
Stars: ✭ 144 (+61.8%)
Mutual labels:  fpga, verilog
cnn open
A hardware implementation of CNN, written by Verilog and synthesized on FPGA
Stars: ✭ 157 (+76.4%)
Mutual labels:  fpga, verilog
async fifo
A dual clock asynchronous FIFO written in verilog, tested with Icarus Verilog
Stars: ✭ 117 (+31.46%)
Mutual labels:  fpga, verilog
ics-adpcm
Programmable multichannel ADPCM decoder for FPGA
Stars: ✭ 18 (-79.78%)
Mutual labels:  fpga, verilog
drec-fpga-intro
Materials for "Introduction to FPGA and Verilog" at MIPT DREC
Stars: ✭ 66 (-25.84%)
Mutual labels:  fpga, verilog
Hard-JPEG-LS
FPGA-based JPEG-LS image compressor.
Stars: ✭ 52 (-41.57%)
Mutual labels:  fpga, verilog
yarvi
Yet Another RISC-V Implementation
Stars: ✭ 59 (-33.71%)
Mutual labels:  fpga, verilog

Karuta HLS Compiler

Author: Yusuke TABATA ([email protected])

What's this?

TL;DR: High level synthesis (HLS) from scripting language (Karuta) to RTL (Verilog). The main objective is to make FPGA development productive.

See the document at https://karuta.readthedocs.io (or docs/index.rst in this repository) for more details.

If you are using recent Ubuntu, just

 $ sudo snap install karuta

to install the Karuta package. For most of other distributions (including WSL2), your can use following script to install Karuta.

 $ curl -o install-karuta.sh https://raw.githubusercontent.com/nlsynth/karuta/master/install-karuta.sh
 ## Please take a quick look what this script does. You may have to additional software packages to fix errors to build Karuta.
 $ sh install-karuta.sh

Please follow @karutalang on Twitter for updates and tips.

Quick overview

Karuta's language is an object oriented scripting language. The syntax is similar to recently popular programming languages like JavaScript, Python, Go or so on. Minimum code looks like as follows.

 output led #1
 process {
   // Do computation, call other methods and do I/O.
   led.write(1)
 }

The code above defines some computation within the default object, so Karuta compiler can take a snapshot of the object and transform it into RTL.

 $ karuta compile mod.karuta
 (karuta writes a synthesizable Verilog file mod.v)

Important features

This project designed Karuta's language just to describe hardware designs instead of reusing existing languages for software. So, some of following features are incorporated in the language constructs to make them easy to use.

  • Prototype based object system to model design structures
  • Communication primitives for processes
    • Shared memory, mailboxe, channel and so on
    • AXI, RPC like handshake, GPIO, embedded Verilog code and so on
  • Flexible data types
    • Integer with arbitrary width (not only typical 1, 8, 16, 32, 64 and so on)
    • Custom operators for defined data types like FP16, SIMD and so on
  • HDL generators and optimizers
    • Generates Verilog or HTML
    • SSA based optimizers
    • Profile guided optimizer
    • Scheduling and allocation based on device parameters

How the code looks like

Karuta is designed to describe process networks easily by using processes and communication primitives. Following example code shows some of primitives.

 // I/Os.
 input dipsw #4
 output led #4
 // Primitives for data and communication.
 reg r0 int
 ram a int[32]
 maibox mb int
 channel ch int
 shared subMod object = ...

 // processes can do computation and calculation.
 process {
   dipsw.read()
   led.write(12)
   r0 = 1
   a[123] = 345
   ch.write(234)
   mb.put(345)
 }

 process {
   wait(1000000)  // Waits 1M clocks.
   ch.read()
   mb.get()
   r0 += 1
   a[123] += 1
 }

 process {
   ...
   subMod.f()
 }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].