For sign extension from 18 to 32 bits
PEAK cycles: 3 cycle
Pseudo code:
if (18th bit == 1)
set(bits 18 to 32 HIGH)
sample_reg
sample_reg
For sign extension from 14 to 16 bits
PEAK cycles: 2 cycle
Pseudo code:
if (14th bit == 1)
set(bits 14 to 16 HIGH)
sample_reg
sample_reg
For sign extension from 16 to 32 bits
PEAK cycles: 2 cycle
Pseudo code:
if (16th bit == 1)
set(bits 17 to 32 HIGH)
sample_reg
sample_reg
For sign extension from 24 to 32 bits
PEAK cycles: 2 cycle
Pseudo code:
// set(bits 25 to 32 LOW)
if (24th bit == 1)
set(bits 25 to 32 HIGH)
sample_reg
sample_reg