c4Hardware - limited precision modelling in C++
The focus of c4Hardware is to provide a highly flexible and reusable framework of C++ classes and functions for the emulation of a wide range of hardware implementations of algorithms. It provides a high level interface to matrix, vector, and scalar operations to allow rapid application development without requiring knowledge of the underlying operations. Futhermore, it allows custom data types to be plugged-in with little change to the high level application. This allows bit-accurate modelling and analysis of algorithms under various limited precision numerical representations.
Typical use of the library
The intended use of c4Hardware is that it provides a middle layer of classes for use in the user's emulation project. That is, it provides an interface to a set of C++ classes, with procedure calls that remain constant across all uses of the library and should not require modification. The end user then writes an application to call these procedures to implement their emulator, independent of the numerical system in use.
At the lower level of the programming, one or more classes are needed to implement the specific numerical system required by the user. While c4Hardware also provides some examples of these (current floating point only), it is likely that the user will want to customise or replace these with their own versions. Each of these numerical classes will extend a predefined interface, which allows it to be called by the middle layer of classes. Changing the numeric system used in a simulation is only a matter of changing which class is connected to the lower layer.