Skip to main content

Ternary Neural Networks

Ternary Neural Networks enable very efficient implementation on FPGAs.

For more information, please read our initial paper on Ternary Neural Networks
This page contains our demonstration hardware implementation of a Ternary Neural Network, targeting the Xilinx VC709 FPGA board


Our works are built for GNU/Linux operating systems. The RIFFA framework is used to interface the hardware design with the software application. The RIFFA driver and library must be installed on your machine.

  • You will need root rights to ask the Linux kernel to scan/remove PCI-Express devices, when programming or re-programming the board.
  • To program the board, you will need either the Xilinx Vivado tool suite, or the open-source program xc3sprog (this is the default command in the provided Makefile).
  • To program the board and/or to use UART, you may need to install a library to talk to FTDI chips: libftdi and libftd2xx. Check what packages are provided by your distribution.
  • The power consumption is measured with the on-board PMBus, a bus based on I2C that enables to read the power directly from the on-board power converters.
  • To enable users to monitor the power consumption without interfering with PCI-Express workloads, our hardware design includes a simple UART-to-PMBus interface.
  • You need rights to use the UART ports, probably over USB.
  • You also need one VC709 board!


  • Frédéric Pétrot (permanent staff at Grenoble INP)
  • Adrien Prost-Boucle (CNRS Research engineer, located at TIMA)
  • Alban Bourge (now with Atos-Bull)

IJCNN 2017 paper

This section provides demonstration configurations for our IJCNN 2017 paper.

Note : our designs have been improved since the initial paper submission. FPGA power is now much lower than in the paper. We also reach slightly higher accuracy for datasets CIFAR10, GTSRB and SVHN (see our FPL2017 draft paper below).

FPL 2017 paper

  • This section provides demonstration configurations for our 
    FPL 2017 paper
  • We will participate to the Demo Night on Wednesday, September 6th, with a live demo of our accelerator designs on board VC709.
  • For instructions, see the file README inside the archive.
  • Data in this archive allows to reproduce speed and power and to verify functionality, but not accuracy yet. Some data was lost and we have to perform training again…
  • Link to training and ternarization project:

ACM TRETS 2018 paper

This paper is a (large) extension of our FPL 2017 paper in which we detail the way to extract parallelism, and designed many optimizations so that we can fit more efficient networks into the same FPGA. Quite a bit of a low level hacking! Note that this is yet another improvement as compared to the FPL 2017 version, and we reach a throughput of 60 kfps (32×32 frames) at 11 Watts (more than 5Kfps/W).

IEEE TVLSI 2019 paper

This paper focuses solely on the decompression of ternary sequences on binary strings. This is a must for ASIC implementation of TNN, but is by itself quite interesting. If anyone can come out with a better decompression scheme than ours, we’d like to know about it.

Submitted on March 16, 2022

Updated on March 16, 2022