Intel FPGA Integer Arithmetic IP Cores User Guide

ID 683490
Date 10/05/2020
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

5.5. Ports

The following tables list the input and output ports for the LPM_ADD_SUB IP core.

Table 15.  LPM_ADD_SUB IP Core Input Ports
Port Name Required Description
cin No Carry-in to the low-order bit. For addition operations, the default value is 0. For subtraction operations, the default value is 1.
dataa[] Yes Data input. The size of the input port depends on the LPM_WIDTH parameter value.
datab[] Yes Data input. The size of the input port depends on the LPM_WIDTH parameter value.
add_sub No Optional input port to enable dynamic switching between the adder and subtractor functions. If the LPM_DIRECTION parameter is used, add_sub cannot be used. If omitted, the default value is ADD. Intel® recommends that you use the LPM_DIRECTION parameter to specify the operation of the LPM_ADD_SUB function, rather than assigning a constant to the add_sub port.
clock No Input for pipelined usage. The clock port provides the clock input for a pipelined operation. For LPM_PIPELINE values other than 0 (default), the clock port must be enabled.
clken No Clock enable for pipelined usage. When the clken port is asserted high, the adder/subtractor operation takes place. When the signal is low, no operation occurs. If omitted, the default value is 1.
aclr No Asynchronous clear for pipelined usage. The pipeline initializes to an undefined (X) logic level. The aclr port can be used at any time to reset the pipeline to all 0s, asynchronously to the clock signal.
Table 16.  LPM_ADD_SUB IP Core Output Ports
Port Name Required Description
result[] Yes Data output. The size of the output port depends on the LPM_WIDTH parameter value.
cout No Carry-out (borrow-in) of the most significant bit (MSB). The cout port has a physical interpretation as the carry-out (borrow-in) of the MSB. The cout port detects overflow in UNSIGNED operations. The cout port operates in the same manner for SIGNED and UNSIGNED operations.
overflow No Optional overflow exception output. The overflow port has a physical interpretation as the XOR of the carry-in to the MSB with the carry-out of the MSB. The overflow port asserts when results exceed the available precision, and is used only when the LPM_REPRESENTATION parameter value is SIGNED.