AE_PKSR32 — 32-bit biquad acceleration

Instruction Word

Slot
ae2_slot1
6
3
6
2
6
1
6
0
5
9
5
8
5
7
5
6
5
5
5
4
5
3
5
2
5
1
5
0
4
9
4
8
4
7
4
6
4
5
4
4
4
3
4
2
4
1
4
0
3
9
3
8
3
7
3
6
3
5
3
4
3
3
3
2
3
1
3
0
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
1
9
1
8
1
7
1
6
1
5
1
4
1
3
1
2
1
1
1
0
9876543210
Format ae_format2 - 64 bit(s)0000 1110
AE_PKSR32 1101 100 10100 01
ae_fld_pks_d 3210
ae_fld_pks_s 3210
ae_fld_imm2 1 0

Slot
ae_slot1
6
3
6
2
6
1
6
0
5
9
5
8
5
7
5
6
5
5
5
4
5
3
5
2
5
1
5
0
4
9
4
8
4
7
4
6
4
5
4
4
4
3
4
2
4
1
4
0
3
9
3
8
3
7
3
6
3
5
3
4
3
3
3
2
3
1
3
0
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
1
9
1
8
1
7
1
6
1
5
1
4
1
3
1
2
1
1
1
0
9876543210
Format ae_format - 64 bit(s) 1111
AE_PKSR32 11111001 0 1
ae_fld_pks_d 3210
ae_fld_pks_s 3210
ae_fld_imm2 10

Slot
Inst
6
3
6
2
6
1
6
0
5
9
5
8
5
7
5
6
5
5
5
4
5
3
5
2
5
1
5
0
4
9
4
8
4
7
4
6
4
5
4
4
4
3
4
2
4
1
4
0
3
9
3
8
3
7
3
6
3
5
3
4
3
3
3
2
3
1
3
0
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
1
9
1
8
1
7
1
6
1
5
1
4
1
3
1
2
1
1
1
0
9876543210
Format x24 - 24 bit(s) 0
AE_PKSR32 00100111 10 0100
ae_fld_pks_d 3210
ae_fld_pks_s 3210
ae_fld_imm2 10

Slot
ae_slot1
6
3
6
2
6
1
6
0
5
9
5
8
5
7
5
6
5
5
5
4
5
3
5
2
5
1
5
0
4
9
4
8
4
7
4
6
4
5
4
4
4
3
4
2
4
1
4
0
3
9
3
8
3
7
3
6
3
5
3
4
3
3
3
2
3
1
3
0
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
1
9
1
8
1
7
1
6
1
5
1
4
1
3
1
2
1
1
1
0
9876543210
Format ae_format1 - 64 bit(s)1 1110
AE_PKSR32 11111001 0 1
ae_fld_pks_d 3210
ae_fld_pks_s 3210
ae_fld_imm2 10

Assembler Syntax

AE_PKSR32 aed0..15(ae_pks_d), aed0..15(ae_pks_s), 0..3

C Syntax

#include <xtensa/tie/xt_hifi2.h>

extern void AE_PKSR32(ae_f32x2 d /*inout*/, ae_f64 ps, immediate pos);

Description

AE_PKSR32 move the low 32-bits of d into the high 32-bits of d. Sign extend the 17.47-bit value in d0 by three bits so that it becomes a 20.47-bit value. Logical Left Shift the result by 0 to 3 bits as encoded in the 2-bit immediate. Round the result, using an asymmetric round, to a 20.31-bit value, removing 16 bits from the low end. Saturate the result to a 1.31-bit value, removing 19 bits from the top. If saturation was needed, state AE_OVERFLOW is set to 1. Store the result in the low 32-bits of d. This instruction is useful for the acceleration of biquad filters.

Implementation Pipeline

In Out
AE_OVERFLOW Wstage, ae_pks_d Mstage, ae_pks_s Mstage AE_OVERFLOW Wstage, ae_pks_d Mstage

Protos that use AE_PKSR32

proto AE_PKSR32 { inout ae_f32x2 d, in ae_f64 ps, in immediate pos }{}{
AE_PKSR32 d, ps, pos + 0;
}