# Basic HDL Algorithms

Create simple HDL designs using basic Simulink® blocks

The HDL Coder block library contains many basic blocks that you can add to your Simulink modeling environment and develop your HDL algorithm. These blocks include input sources, output sinks, and blocks that perform basic to complex math and trigonometric operations.

To filter the Simulink Library Browser to show only HDL-supported blocks, enter `hdllib`. The blocks listed in this section include those blocks that are only available in the HDL Coder library. Blocks such as Add and Product are available in the Simulink library in the Library Browser.

For a filtered list of Simulink blocks supported for HDL code generation, see Simulink Block List (HDL Code Generation).

## Functions

 `hdllib` Display blocks that are compatible with HDL code generation

## Checks

expand all

 Check for infinite and continuous sample time sources Check for large matrix operations

## Blocks

expand all

 Bit Concat Concatenates up to 128 input words into single output Bit Reduce AND, OR, or XOR bit reduction on all input signal bits to single bit Bit Rotate Rotate input signal by bit positions Bit Shift Logical or arithmetic shift of input signal Bit Slice Return field of consecutive bits from input signal Bits to Word Convert vector of bits to integer (Since R2023a) Word to Bits Converts real numbers to vector of bits (Since R2023a)
 Sine HDL Optimized and Cosine HDL Optimized Implement fixed-point sine and cosine wave by using lookup table approach optimized for HDL code generation
 HDL Counter Free-running or count-limited hardware counter
 Atan2 Implement control signal based `atan2` function (Since R2020b) Sin Implement control signal based sine function (Since R2020b) Cos Implement control signal based cosine function (Since R2020b) Cos+jSin Implement control signal based `Cos+jSin` function (Since R2020b) SinCos Implement control signal based sine and cosine function (Since R2020b) rSqrt Implement control-signal-based reciprocal square root function (Since R2020b) Sqrt Implement control-signal-based square root function (Since R2020b) Divide Implement control-signal-based division operation (Since R2020b) Reciprocal Implement control-signal-based reciprocal operation (Since R2020b)