Chaptertitle - chapter 5 – arithmetic functions, Heading1 - alu, Figure - figure 5-1: logic symbol – Achronix Speedster22i User Macro Guide User Manual
Page 103: Heading2 - pins, Table - table 5-1: pin descriptions, Chapter 5 – “arithmetic functions, Chapter 5 – arithmetic functions, Pins

Speedster Macro Cell Library
PAGE 86
Chapter 5 – Arithmetic Functions
ALU
Two Input Adder / Subtractor with Programmable Load
ALU
a[1:0]
b[1:0]
d[1:0]
load
cin
s[1:0]
cout
Figure 5-1: Logic Symbol
ALU implements either a two‐bit adder or two‐bit subtractor with adder/subtractor inputs
(a[1:0], b[1:0]), load value (d[1:0]), Load Enable (load) and carry‐in (cin) inputs. It generates
the sum/difference (s[1:0]) and carry‐out (cout) outputs. Asserting the load signal high
overrides the s[1:0] output with the value of the Load Value d[1:0] input. Multiple ALU blocks
may be combined by connecting the cout output of one slice to the cin input of the next
significant two‐bit slice. Selection of whether the ALU is configured as an adder or subtractor
is determined by the value of the invert_b parameter.
Pins
Table 5-1: Pin Descriptions
Name
Type
Description
a[1:0]
Data Input a. Data Input a is a 2-bit two’s complement signed input,
where bit 1 is the most significant bit. In subtraction mode, Data Input a is
the minuend.
b[1:0]
Data Input b. Data Inputs b is a 2-bit two’s complement signed input,
where bit 1 is the most significant bit. In subtraction mode, Data Input b is
the subtrahend.
d[1:0]
Load Value input. Input d[1:0] is the value that is loaded onto the outputs
s[1:0] upon the active-high assertion of the load input.
load
Load input (active-high). Asserting the load input high set the s[1:0] out-
put equal to the d[1:0] input.
cin
Carry In input(active-high). The cin is the carry-in to the ALU. Note that
for subtraction, cin should be tied high.
s[1:0]
Sum/Difference output. If the invert_b parameter is set to 1’b0, the s[1:0]
output will reflect the sum of the a, b, and cin inputs if the load input is
low. If the invert_b parameter is set to 1’b1, the s[1:0] output will reflect
the difference of the a, b, cin inputs if the load input is low.
cout
Carry-out output. The cout is set high during an add when the s[1:0] out-
put overflows.
input
input
input
input
output
output