Algorithmic C Data Types
Version 1.2
Algorithmic CTM Bit Accurate Integer and Fixed Point C++ Data Types
General floating-point arithmetic is widely used for modeling designs at an algorithmic level. For efficient implementation, the floating-point arithmetic is replaced by fixed-point or integer arithmetic with carefully chosen precisions. Bit-accurate modeling of the fixed-point arithmetic is required to validate that the precision of the arithmetic is sufficient to preserve the intended behavior of the design.
The Algorithmic CTM arbitrary-length bit-accurate integer and fixed-point data types allow designers to easily model bit-accurate behavior in their designs. The data types were designed to approach the speed of plain C integers. It is no longer necessary to compromise on bit-accuracy for the sake of speed or to explicitly code fixed-point behavior using integers in combination with shifts and bit masking.
The arbitrary-length nature of the data types means that the types will scale to any size while uniformly preserving their semantics. This should be contrasted to limited-precision data types where the precision limit introduces corner cases that make such types harder to learn and use.
- Fast: Up to 200x faster simulation speeds than SystemCTM. It is also fast to compile.
- Consistent: Precise, consistent and complete definition of semantics for no differences between simulation and implementation (synthesis).
- Arbitrary-Length: scales to any signed/unsigned integer or fixed-point bit-width making the semantics uniform. This is a requirement for any arithmetic library for a hardware description language.
- Intuitive: Easy to learn and to use. Consistent and uniform semantics avoid hard-to-remember corner cases. For example signed and unsigned types can be correctly compared without unexpected signed to unsigned conversions taking place.
- Parameterizable: The precision is defined by template parameters. This makes it ideal for writing algorithmic IP where the precision of the algorithm is parameterized.
- Built-in Quantization and Overflow Modes: All the commonly used rounding and saturation functionality are built-in as part of the fixed-point types.
Performance data summarizes how the Algorithmic CTM integer and fixed-point data types compare with SystemCTM and native C integer types in terms of the allowed precisions, simulation speed and semantics.
The downloadable libraries are provided with detailed documentation and can be freely redistributed in accordance with the licensing agreement.
Support Request
Any defects or support issues can be submitted to the Algorithmic C data types group using the support request feedback form.
Denotes a required field.
Mentor Graphics and its agents will protect the information that is gathered on this site as stated in our Privacy Policy. It will not be shared with, bartered, or sold to ANY third party.
