Unit-Testing of Hardware Accelerators

Problem

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.

Action

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.

Vincke_unittest

Result

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.

SUBMITTER:

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 may not represent the opinion or policy of Agile Alliance.

Add to Bookmarks Remove Bookmark
Add to Bookmarks Remove from Bookmarks
Add to Bookmarks Remove from Bookmarks
Picture of Agile Alliance

Agile Alliance

Agile Alliance is a nonprofit organization with global membership, supporting and serving the Agile software community since 2001. We support people who explore and apply Agile values, principles, and practices to make building software solutions more effective, humane, and sustainable. We share our passion to deliver software better every day.

Recent Blog Posts

Recent Posts

Your Bookmarks

No favorites to display. You must have cookies enabled to add bookmarks.

Recent Agile Alliance Blog Posts

Post your comments or questions

Discover the many benefits of membership

Your membership enables Agile Alliance to offer a wealth of first-rate resources, present renowned international events, support global community groups, and more — all geared toward helping Agile practitioners reach their full potential and deliver innovative, Agile solutions.

Privacy Preference Center

Not yet a member? Sign up now