close By using this website, you agree to the use of cookies. Detailed information on the use of cookies on this website can be obtained on OneSpin's Privacy Policy. At this point you may also object to the use of cookies and adjust the browser settings accordingly.

Analysis of number representations for accuracy and efficiency

The verification of SystemC arithmetic blocks must ensure that a coded algorithm meets a predominantly mathematical specification for all possible usage scenarios, incorporates an appropriate level of accuracy, and can be implemented efficiently. This requires the analysis of number representations to ensure that a high degree of accuracy is maintained throughout a datapath, while also testing that the number precision is not too high, resulting in unused circuit elements. Failure to set the right precision can lead to redundancy in chip area and power consumption, or the incorrect operation of the algorithm for corner case scenarios. 

OneSpin's Arithmetic Analysis App exhaustively examines algorithmic implementations for loss of precision, as well as redundant bits, considering all possible operations of the algorithm.

Arithmetic Analysis for SystemC

Calculating the precision of a fixed point numbering system throughout a datapath is often a manual task, or is accomplished with basic tools such as spreadsheets. However, as the datapath elements become more complex and make use of numbers with a range of potential bit widths, this is a difficult and error prone task.

Formal methods can help with this by providing an exhaustive analysis of every possible value and mathematical operation that may be applied in the algorithm. This is the purpose of the OneSpin Arithmetic Analysis App. 

Using OneSpin’s Arithmetic Analysis App

The Arithmetic Analysis App for C++ and SystemC automatically performs two primary checks on SystemC fixed point and integral data types:

1. Ensuring that, throughout an arithmetic block, none of the registers holding data at any point in the datapath will overflow due to an inadequate number of bits when handling a calculation involving large numbers.

2. Ensuring that no bits are wasted throughout a datapath due to the wrong precision being set on any registers, resulting in the Most Significant Bit(s) (MSBs) never being used.

Other number representations, such as vendor specific fixed point data implementations, can be targeted by using pre-packaged assertion libraries.

The App is applied simply by specifying the registers to be tested. It will work back through the implementation of the algorithm to analyze potential values that may be loaded into the register, checking for both underflow and overflow. It is able to apply an exhaustive test to the numbering system, which in a typically complex algorithm would require extremely large simulation stimulus files to replicate. 

If an issue is identified, the app produces a simulation trace for debugging. The powerful debug system included in OneSpin 360 allows for tracing values through the source code, as well as in a waveform. It will highlight any problem, and demonstrate possible values and calculations that can result in a loss of precision. The app is designed to operate on C++ and SystemC code with minimal timing, targeted at High Level Synthesis (HLS).

The OneSpin arithmetic Analysis App is available as part of a SystemC extension to OneSpin 360-DV, as well as stand-alone.

Get in touch!

Optimize your algorithm implementations now and try the OneSpin 360 Arithmetic Analysis app on your synthesizable SystemC/C++ code!

» Contact