Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

sxtd

sxtd( 
x_number 
x_bits 
) 
=> x_result

Description

Sign-extends the number represented by the rightmost specified number of bits in the given integer.

Sign-extends the rightmost x_bits bits of x_number. That is, sign-extends the bit field x_number<x_bits - 1:0> with x_number<x_bits - 1> as the sign bit.

Arguments

x_number

An integer.

x_bits

Number of bits.

Value Returned

x_result

x_number with the rightmost x_bits sign-extended.

Examples

sxtd( 7 4 )  
=> 7
sxtd( 8 4 )  
=> -8
sxtd( 5 2 )  
=> 5

Related Topics

Logical and Relational Functions

zxtd


Return to top
 ⠀
X