Unit-Testing of Hardware Accelerators

Added to Process


In a large system-on-chip design we needed to integrate hardware accelerators and control them using software drivers. When errors or unexpected results occur we need to know whether it was a hardware change or a software error. Finding and solving bugs is a slow and frustrating process. We needed to find an easy and fast way to check the hardware accelerators instead of running slow simulations.


We took advantage of the Unity unit-testing framework in software. Unity is completely written in C, this eases the integration to our design which is written entirely in C. It took me about half a day to integrate the framework and set-up a unit-test fixture. Next, some example tests were implemented to show my colleagues how it works. The two other designers were quickly away with it and started actually using it the same day. The test-fixture is used for testing all aspects of the accelerators and incrementally extend them when new hardware features are implemented. The test setup runs entirely on target and outputs a nice and clean text-based test report.



We are still developing the system but the unit-tests are already indispensable. Potential side effects of hardware changes are captured immediately and without any visible effort. The unit-test framework in software makes it easy to quickly add more tests for the same hardware accelerator. This is useful to give a more precise description to hardware designers in which cases where it produces unexpected results. We avoided slow simulation cycles and, more important, we avoided a lot of bugs very early in development phase. Bugs which would not (yet) have been noticed otherwise.


Robbie Vincke
Barco Silex
robbie dot vincke at barco dot com

This is an Agile Alliance community blog post. Opinions represented are personal and belong solely to the author. They do not represent opinion or policy of Agile Alliance.

Agile2023 Registration

Stay Up-to-Date!

Get updates on Agile events, programs, and more by subscribing to the Agile Alliance Newsletter.

Agile MiniCon Basics

Recent Posts

BYOC Member Lean Coffee