← Open Source
google

CFU-Playground

Want a faster ML processor. Do it yourself! -- A framework for playing with custom opcodes to accelerate TensorFlow Lite for Microcontrollers (TFLM). . . . . . Online tutorial: https://google.github.io/CFU-Playground/ For reference docs, see the link below.

InfrastructureInference service optimizationVerilog
Open on GitHub
Momentum
+0stars in 24 hours0.0%
569
Stars
160
Forks
+0
This week
25
Contributors
Created 2021-03-09 · Updated 2026-09-28 · #16853 today
Top developers

google/CFU-Playground is ranked 16,853 with 569 stars.

Same-category comparison

google/CFU-Playground is ranked 16,853 among these 8 peers; felafax/felafax is ranked 16,851.

Same-category comparison
NameRankMetrics
monatis/clip.cpp16,816
Language:
C++
Stars:
571
Forks:
51
Description:
CLIP inference in plain C/C++ with no extra dependencies.
b-nnett/codex-plusplus-ios-simulator16,825
Language:
JavaScript
Stars:
570
Forks:
53
VictoriaMetrics/helm-charts16,847
Language:
Go Template
Stars:
569
Forks:
427
Description:
Helm charts for VictoriaMetrics, VictoriaLogs and ecosystem.
felafax/felafax16,851
Language:
Jupyter Notebook
Stars:
569
Forks:
40
Description:
Felafax is building AI infra for non-NVIDIA GPUs.
LeoYeAI/openclaw-guardian16,860
Language:
Shell
Stars:
568
Forks:
104
raids-lab/crater16,874
Language:
Go
Stars:
568
Forks:
76
Description:
Crater is a cloud-native AI training & inference platform.
diggerhq/opencomputer16,902
Language:
TypeScript
Stars:
566
Forks:
66
Description:
The easiest way to build and deploy an agent.
dme-compunet/YoloSharp16,903
Language:
C#
Stars:
566
Forks:
95
Description:
🚀 A high performance real-time object detection solution using YOLO11 ⚡️ powered by ONNX-Runtime.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguageVerilog
CategoryInfrastructure
SubcategoryInference service optimization
Stars569
Forks160
Contributors25
Created date2021-03-09
Updated date2026-09-28
Stars in 1 day0
Stars in 7 days0
Rank16,853
Previous rank16,645
Rank change-208
7-day stars rank15,765
Previous 7-day stars rank15,772
7-day stars rank change7
Total stars rank17,518
Previous total stars rank17,483
Total stars rank change-35
CountryUSA
README summary

CFU Playground Want a faster ML processor? This project provides a framework that an engineer, intern, or student can use to design and evaluate **enhancements** to an FPGA-based “soft” processor, specifically to increase the performance of machine learning (ML) tasks. The goal is to abstract away most infrastructure details so that the user can get up to speed quickly and focus solely on adding new processor instructions, exploiting them in the computation, and measuring the results. This is how

it works: Choose a TensorFlow Lite model; a quantized person detection model is provided, or bring your own. Execute the inference on the Arty FPGA board to get cycle counts per layer. Choose an TFLite operator to accelerate, and dig into that code. Design new instruction(s) that can replace multiple basic operations. Build a custom function unit (a small amount of hardware) that performs the new instruction(s). Modify the TFLite/Micro library kernel to use the new instruction

(s), which are available as intrinsics with function call syntax. Rebuild the FPGA Soc, recompile the TFLM library, and rerun to measure improvement. The focus here is performance, not demos. The inputs to the ML inference are canned/faked, and the only output is cycle counts. It would be possible to export the improvements made here to an actual demo, but currently no pathway is set up for doing so. With the exception of Vivado, everything used by this project

is open source. **Disclaimer: This is not an officially supported Google project. Support and/or new releases may be limited. ** _This is an early prototype of a ML exploration framework; expect a lack of documentation and occasional breakage. If you want to collaborate on building out this framework, reach out to tcal@google. _ Required hardware/OS One of the boards supported by LiteX Boards. Most of LiteX Boards targets should work. \ It has been tested on the **Arty A7-35T

/100T**, **iCEBreaker**, **Fomu**, **OrangeCrab**, **ULX3S**, and **Nexys Video** boards. The only supported host OS is Linux (Debian / Ubuntu). You don't need any board if you want to run Renode or Verilator simulation. Assumed software FPGA Toolchain: that depends on a chosen board. If you already have a toolchain installed for your board, you can use that. For a board with a Xilinx XC7 part, you can use either Vivado, which must be manually installed (here's our guide), or the open

-source SymbiFlow tool chain, which can be easily installed using Conda (see the Setup Guide). For boards with Lattice iCE40, ECP5, or Nexus FPGAs, you can install the appropriate set of open source tools either via Conda (see the Setup Guide) or on your own by building from source. Or, you can use the Lattice toolchain (Radiant/Diamond). If you want to try things out using Renode simulation, then you don't need either the board or toolchain. You can also

perform Verilog-level cycle-accurate simulation with Verilator, but this is much slower. Renode is installed by the setup script.

Frequently asked questions

How many stars and forks are recorded?

google/CFU-Playground has 569 stars and 160 forks.

What is the repository rank?

google/CFU-Playground is ranked 16,853.

What language and category are recorded?

google/CFU-Playground has 569 stars, uses Verilog and belongs to Infrastructure.

Which repository is closest in rank?

google/CFU-Playground is compared with felafax/felafax, ranked 16,851 with 569 stars.

README

CFU Playground

Want a faster ML processor? Do it yourself!

This project provides a framework that an engineer, intern, or student can use to design and evaluate enhancements to an FPGA-based “soft” processor, specifically to increase the performance of machine learning (ML) tasks. The goal is to abstract away most infrastructure details so that the user can get up to speed quickly and focus solely on adding new processor instructions, exploiting them in the computation, and measuring the results.

This project enables rapid iteration on processor improvements -- multiple iterations per day.

This is how it works:

  • Choose a TensorFlow Lite model; a quantized person detection model is provided, or bring your own.
  • Execute the inference on the Arty FPGA board to get cycle counts per layer.
  • Choose an TFLite operator to accelerate, and dig into that code.
  • Design new instruction(s) that can replace multiple basic operations.
  • Build a custom function unit (a small amount of hardware) that performs the new instruction(s).
  • Modify the TFLite/Micro library kernel to use the new instruction(s), which are available as intrinsics with function call syntax.
  • Rebuild the FPGA Soc, recompile the TFLM library, and rerun to measure improvement.

The focus here is performance, not demos. The inputs to the ML inference are canned/faked, and the only output is cycle counts. It would be possible to export the improvements made here to an actual demo, but currently no pathway is set up for doing so.

With the exception of Vivado, everything used by this project is open source.

Disclaimer: This is not an officially supported Google project. Support and/or new releases may be limited.

This is an early prototype of a ML exploration framework; expect a lack of documentation and occasional breakage. If you want to collaborate on building out this framework, reach out to tcal@google.com! See "Contribution guidelines" below.

Required hardware/OS

  • One of the boards supported by LiteX Boards. Most of LiteX Boards targets should work.
    It has been tested on the Arty A7-35T/100T, iCEBreaker, Fomu, OrangeCrab, ULX3S, and Nexys Video boards.
  • The only supported host OS is Linux (Debian / Ubuntu).

You don't need any board if you want to run Renode or Verilator simulation.

Assumed software

  • FPGA Toolchain: that depends on a chosen board. If you already have a toolchain installed for your board, you can use that.

For a board with a Xilinx XC7 part, you can use either Vivado, which must be manually installed (here's our guide), or the open-source SymbiFlow tool chain, which can be easily installed using Conda (see the Setup Guide).

For boards with Lattice iCE40, ECP5, or Nexus FPGAs, you can install the appropriate set of open source tools either via Conda (see the Setup Guide) or on your own by building from source. Or, you can use the Lattice toolchain (Radiant/Diamond).

If you want to try things out using Renode simulation, then you don't need either the board or toolchain. You can also perform Verilog-level cycle-accurate simulation with Verilator, but this is much slower. Renode is installed by the setup script.

Other required packages will be checked for and, if on a Debian-based system, automatically installed by the setup script below.

Setup

Clone this repo, cd into it, then get run:

scripts/setup

Use with board

The default board is Arty. If you want to use different board you must specify target, e.g. TARGET=digilent_nexys_video.

  1. Build the SoC and load the bitstream onto Arty:
cd proj/proj_template
make prog

This builds the SoC with the default CFU from proj/proj_template. Later you'll copy this and modify it to make your own project.

  1. Build a RISC-V program and execute it on the SoC that you just loaded onto the Arty:
make load

Use without board

If you don't have any board supported by LiteX Boards you can use Renode or Verilator to simulate it.

To use Renode to execute on a simulator on the host machine (no Vivado or Arty board required), execute:

make renode

To use Verilator to execute on a cycle-accurate RTL-level simulator (no Vivado or Arty board required), execute:

make PLATFORM=sim load

Most useful make flags

Option Explanation Example Default
PLATFORM Choose which SoC platform you want to build: hps or sim or common_soc make bitstream PLATFORM=hps common_soc
TARGET Choose one of many targets from LiteX Boards repository, common_soc will take BaseSoC from specified target.py make bitstream TARGET=nexys_video_board digilent_arty
USE_VIVADO Use Vivado toolchain make bitstream USE_VIVADO=1 0
USE_SYMBIFLOW Use Symbiflow toolchain make bitstream USE_SYMBIFLOW=1 0
UART_SPEED Choose UART baudrate make bitstream UART_SPEED=115200 3686400
IGNORE_TIMING Ignore timing contraints (only for Vivado) make bitstream USE_VIVADO=1 IGNORE_TIMING=1 0

Underlying open-source technology

  • LiteX: Open-source framework for assembling the SoC (CPU + peripherals)
  • VexRiscv: Open-source RISC-V soft CPU optimized for FPGAs
  • Amaranth: Python toolbox for building digital hardware

Licensed under Apache-2.0 license

See the file LICENSE.

Contribution guidelines

If you want to contribute to CFU Playground, be sure to review the contribution guidelines. This project adheres to Google's code of conduct. By participating, you are expected to uphold this code.

Nearby in the ranking
Similar items