+1 855-VERIFYY
+

Newsletter:Format property in IDS/ISS

Format property implementation for IDS/ISS

Introduction

Normally only integers are represented in fixed point numbers. This implicitly means that the decimal point is at the right most corner of a number. Also, integers can be signed (2’s complement) or unsigned. However, in Math intensive applications, fixed point numbers can also be used to represent real numbers. In this case the decimal point moves towards left of the number.

A new property is introduced called “format”. Its value will be of the form “fixdt(,,)”. This property constructs fixed-point numeric values from real values. It works in the similar manner as the “fi” function used in MATLAB, to construct fixed-point numeric object.

The integer value is calculated using the following formula –

Real value = (Integer value) x 2(-fractional bits)

In case the calculated Integer value is bigger than the field length, of register field on which the “format” property is applied, then the integer value saturates to the field length.

Eg: “{format=fixdt(1,,5)}”, applied on the register field of length ‘8’ and having value ‘30.5’, with ‘5’ fractional bits, returns value 127. From the above formula the integer value comes out to be ‘976’ but as the field length is only ‘8’ including the sign bit, so, the returned integer value saturates to (27 – 1) i.e. ‘127’.

The value of fractional bits can be negative also. It can also be greater than the length of the field. The integer value is calculated in the same manner described above. Eg:

  • {format=fixdt(0,,-3)}”, applied on the register field of length ‘9’ and having value ‘100.1’, with ‘-3’ returns value ‘13’.
  • {format=fixdt(1,,10)}”, applied on the register field of length ‘7’ and having value ‘0.0048725’, with ‘10’ returns value ‘-5’.

Implementation

Proposed “format” property can be defined on register fields in ISS sequence sheet or on the register fields in the IDS document, if format property is defined on a field both in the IDS document and sequence sheet then, one on the sequence sheet takes precedence. A user can define a real value, in following manner using format property.

format1

Eg: {format=fixdt (0,,3)}, where ‘0 ‘is the sign value and ‘3’ is the fractional length. The word length will be the field length of the corresponding field on which the property is defined, i.e. 16 (as reg1.f1 is defined from [15:0] in IDS/ISS as shown below)

{format= fixdt(1,,-5)}, where ‘1 ‘is the sign value and ‘-5’ is the fractional length. The word length will be the field length of the corresponding field on which the property is defined, i.e. 16 (as reg1.f2 is defined from [31:16] in IDS/ISS as shown below)

Conclusion-

With the use of format property, we are able to represent real numbers in fixed point numbers along with the integers, which was not supported earlier. By doing this, we have successfully supported the MATLAB’s ‘fi’ functionality, to construct fixed-point numeric object.

By: Abhishek Bora