Arithmetic Services

ASCET offers its users the ability to define so-called arithmetic services and use them to optimize elementary operations, such as addition operations, and to extend such operations by special properties, such as limiters or overflow handling.

An arithmetic service is a C function that is made available by the user and can be called, in place of a standard operation, from within the code generated by ASCET.

For example, in place of the normal add operation,

c = a + b

a function call is generated:

c = add(a, b)

The code generator can replace, among others, the following standard operations with user-defined service function calls:

Arithmetic services can be used for all physical specification types (ESDL, block diagrams) and all complex elements (classes, modules, finite automata or state machines), and are supported for all target types (micro-controller targets, experimental targets (rapid prototyping) and PC) both in offline and in online experiments with one of the implementation code experiments (Build Node).

ASCET finds the information on the presence and type of services from a services.ini file, which is stored for each target in a corresponding target directory (ASCET<n>\target\<target>). These files match the Windows standard for *.ini files. They can be created and edited using any common text editor.

The arithmetic services are not made available by ASCET directly. You can make the service functions available in a form best suited for your purpose: as a library, object code, C code, or with the aid of the ASCET C code editors.

See also

Using Arithmetic Services in ASCET

Arithmetic Services and Constants

Potential Error Conditions

Functionality of an Arithmetic Service

Defining Arithmetic Services

Arithmetic Services File

Project Editor – Build Node