Block Preview

Introduction

This block performs sign extension on standard (non-TM) data streams. It extends signed two’s complement numbers to wider formats while preserving both the sign and numeric value.

Used for signed two’s complement numbers only. For unsigned numbers, use Zero Fill instead.

Pin Description

IN Input Variable bit BIT VECTOR
Input binary data (signed two’s complement), non-TM. MSB is sign bit.
Default: Must be connected
OUT Output Variable bit BIT VECTOR
Sign-extended output (signed), non-TM, combinational.

Properties

Property window

Input Size InputWordSize

Set the input word size in bits

Default: 16

Range: 2 – 16384

Output Size OutputSize

Set the output word size in bits

Number of bits per output sample. Range: 0 – 128. Must be ≥ Input Width.

Default: 32

Range: 0 – 16384

InputWidth InputWidth
Number of bits per input sample. Range: 2 – 128. MSB is sign bit.

Functional description

Sign extension preserves the value of two’s complement signed numbers by replicating the sign bit (MSB) into all additional MSB positions.

Examples

Positive: 8-bit 01101100 (+108) → 16-bit 00000000 01101100 (+108) Negative: 8-bit 11010110 (-42) → 16-bit 11111111 11010110 (-42)

Timing

Purely combinational with zero latency.