Variable Precision DSP Blocks User Guide: Agilex™ 5 FPGAs and SoCs

ID 813968
Date 9/20/2024
Public
Document Table of Contents

11.3.1. Operation Mode Tab

Table 152.  Operation Mode Tab
Parameter IP Generated Parameter Value Default value Description
Select Operation Mode dsp_mode

Tensor Floating-Point

Tensor Fixed-Point

Tensor Accumulation

Tensor Floating-Point

Select operation mode.

Tensor Floating-Point:

Represents and manipulates rational numbers via a minimum of 32 bits in a manner similar to scientific notation, where a number is represented with a mantissa (27bits) and an exponent (8bits). Refer to the following example.

Tensor Fixed-Point:

Represents and manipulates integers – positive and negative whole numbers. Refer to the following example.

Tensor Accumulation:

Accumulates the output results of the other DSP.

Select type of feed in dsp_side_feed_ctrl

data_feed_in

side_feed_in

data_feed_in

Control signal to select the input source feeds.

This option is available in Tensor Floating-Point and Tensor Fixed-Point.

Cascade/Accumulation/Zeroing
Enable Cascade Data In dsp_chain_tensor

Yes

No

No

Enable cascade data in port.

Used to indicate that signal that goes through the cascade data in port will be the output from another DSP that is intended to do the cascading between two or multiple DSP blocks.

Enable Cascade Data Out enable_cascade_data_out

Yes

No

No

Enable cascade data out port.

Used to indicate that the output result will flow through the cascade data out port and that it can be used for cascading two or multiple DSP blocks.

Enable 'acc_en' port enable_acc_en

Yes

No

No

A dynamic control signal to specify whether to enable the accumulation feature.

When the accumulate parameter is enabled, it will accumulate the current result to the previous accumulation result.

Enable 'zero_en' port enable_zero_en

Yes

No

No

A dynamic control signal to disable the input to the FP32 ALU or CPA adder.

Used to clear the accumulation result.

When this parameter is enabled, it will disable all the input signals from either the accumulator or the input from a cascade DSP block.

To choose either one of the input data, it must be configured with the ‘acc_en’ port value.

Single Precision Floating Point Operation
Select Single-Precision Floating-Point Operation dsp_fp32_sub_en

Addition

Subtraction

Addition

Single-Precision Floating-Point Operation on the FP32 ALU.

This option is available in Tensor Floating-Point and Tensor Accumulation.

Used to set either to perform an addition or a subtraction on accumulator.

Enable 'load_bb_one' port enable_load_bb_one

Yes

No

No

A dynamic signal to pre-load first set of register

This option is available in Tensor Floating-Point and Tensor Fixed-Point

Enable 'load_bb_two' port enable_load_bb_two

Yes

No

No

A dynamic signal to pre-load second set of register

This option is available in Tensor Floating-Point and Tensor Fixed-Point

Enable 'load_buf_sel' port enable_load_buf_sel

Yes

No

No

A dynamic control signal used to switch the set of ping pong registers to perform computation

This option is available in Tensor Floating-Point and Tensor Fixed-Point

Tensor Floating-Point

Floating point number : 1.234567, 123456.7, 0.00001234567, 1234567000000000, …
  • 1 bit for the sign
  • 8 bits for the exponent
  • 23 bits for the fraction (or mantissa)

The value of the floating point number is calculated as:

(-1)sign × (1 + fraction) × 2exponent-127

Subnormal numbers are used to represent numbers that are very close to zero, where the exponent is all zeros and has an implicit leading bit of zero instead of one.

(-1)sign × (fraction) × 2-127

Example calculation:

Given a small input value: fp32_a1 = 32'h00000001 (or in binary 00000000000000000000000000000001), which is represented as:
  • sign bit: 0
  • exponent: 00000000
  • fraction: 00000000000000000000001

As a subnormal number:

(-1)0 x (0.00000000000000000000001) x 2-126, which is considered as a relatively small number, resulting to the output to become 32'h00000000.

Tensor Fixed-Point

Fixed point number : 123.45, 1234.56, 12345.67, …