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

We hope you found this post informative

Before you move on, please consider supporting our non-profit mission by making a donation to Agile Alliance todayThis is a community blog post. The opinions contained within belong solely to the author or authors, and may not represent the opinion or policy of Agile Alliance.

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

Join Agile Alliance!

$5 per month (paid annually)*

*Corporate plans are also available

Post your comments or questions

Recent Agile Alliance Blog Posts

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.

IMPORTANT: We have transitioned to a new membership platform. If you have not already done so, you will need to set up an account on the new platform to establish your user profile.

When you see the login screen, choose “Set up Account” and follow the prompts to create your new account. You can choose to log in using your social credentials for either Google or Linkedin (recommended), or you can set up your account using an email address.

Not yet a member? Sign up now