USBB13AP77016-XXX-B06 NEC Electronics, USBB13AP77016-XXX-B06 Datasheet

no-image

USBB13AP77016-XXX-B06

Manufacturer Part Number
USBB13AP77016-XXX-B06
Description
DSP middleware(AMR voice CODEC)
Manufacturer
NEC Electronics
Datasheet
Document No. U15165EJ3V0UM00 (3rd edition)
Date Published June 2002 N CP(N)
Printed in Japan
User’s Manual
µ µ µ µ SAP77016-B06
AMR Speech Codec Middleware
Target Devices
µ µ µ µ PD77018A
µ µ µ µ PD77019
µ µ µ µ PD77110
µ µ µ µ PD77111
µ µ µ µ PD77112
µ µ µ µ PD77113A
µ µ µ µ PD77114
2001

Related parts for USBB13AP77016-XXX-B06

USBB13AP77016-XXX-B06 Summary of contents

Page 1

User’s Manual µ µ µ µ SAP77016-B06 AMR Speech Codec Middleware Target Devices µ µ µ µ PD77018A µ µ µ µ PD77019 µ µ µ µ PD77110 µ µ µ µ PD77111 µ µ µ µ PD77112 µ µ ...

Page 2

User’s Manual U15165EJ3V0UM ...

Page 3

... Customers must check the quality grade of each semiconductor product before using particular application. "Standard": Computers, office equipment, communications equipment, test and measurement equipment, audio and visual equipment, home electronic appliances, machine tools, personal electronic equipment and industrial robots "Special": Transportation equipment (automobiles, trains, ships, etc.), traffic control systems, anti-disaster ...

Page 4

... Seoul Branch Seoul, Korea Tel: 02-528-0303 Fax: 02-528-4411 NEC Electronics Shanghai, Ltd. Shanghai, P.R. China Tel: 021-6841-1138 Fax: 021-6841-1137 NEC Electronics Taiwan Ltd. Taipei, Taiwan Tel: 02-2719-2377 Fax: 02-2719-5951 NEC Electronics Singapore Pte. Ltd. Novena Square, Singapore Tel: 253-8311 Fax: 250-3583 J02.4 ...

Page 5

Major Revisions in This Edition Page Deletion of µ PD77018 and 77113 from the target device Throughout p.12 Change of 1.3.1 Features p.12 Change of 1.3.2 (2) Required memory size p.13 Change of Table 1-3 Operation Quantity of AMR Speech ...

Page 6

Target Readers This manual is intended for users who wish to design and develop application systems using the µ PD77016 Family. The µ PD77016 Family includes the µ PD7701X Family ( µ PD77015, 77016, 77017, 77018A, 77019) and the µ ...

Page 7

... PD77111 µ PD77112 µ PD77113A µ PD77114 µ PD77115 Documents Related to Development Tools RX77016 User’s Manual RX77016 Application Note Caution The related documents listed above are subject to change without notice. Be sure to use the latest version of each document for designing. ...

Page 8

CHAPTER 1 INTRODUCTION ................................................................................................................................. 11 1.1 Middleware ........................................................................................................................................................ 11 1.2 AMR Speech CODEC........................................................................................................................................ 11 1.3 Outline of System .............................................................................................................................................. 12 1.3.1 Features...................................................................................................................................................... 12 1.3.2 Operating environment................................................................................................................................ 12 1.3.3 Performance ............................................................................................................................................... 13 1.3.4 Directory configuration ................................................................................................................................ 14 1.3.5 Combination of libraries ...

Page 9

Figure No. 2-1 Example of Application Processing Flow (Encoder) ...................................................................................... 16 2-2 Example of Application Processing Flow (Decoder) ...................................................................................... 17 3-1 Relationship Between Bit Allocation and Word.............................................................................................. 40 4-1 Example of Sample Program Evaluation System .......................................................................................... 42 LIST OF FIGURES ...

Page 10

Table No. 1-1 AMR Speech CODEC Bit Rates ....................................................................................................................11 1-2 Required Memory Size ..................................................................................................................................12 1-3 Operation Quantity of AMR Speech CODEC .................................................................................................13 1-4 Combination of Header File and Library ........................................................................................................15 1-5 Combination of Target Device and Library (Codec Library) ...........................................................................15 ...

Page 11

Middleware Middleware is the name given to a group of software that has been tuned so that it draws out the maximum performance of the processor and enables processing that is conventionally performed by hardware to be performed by ...

Page 12

... ROM/RAM space. 2. The required memory size shown in the table above does not include the buffers for speech data and bit stream data I/O. For details, refer to 2.3 Memory Structure. TM (3) Software tools (Windows DSP tools: Work bench High-speed simulator Debugger 12 CHAPTER 1 INTRODUCTION Note ...

Page 13

Performance Table 1-3 shows the MIPS values necessary for executing processing of one frame in real time (20 ms). [Measurement conditions] • High-speed simulator: HSM77016 • Evaluated speech: Speech file of 3GPP Test Sequences (TS 26.074) is used. • ...

Page 14

Directory configuration The directory configuration of the µ SAP77016-B06 is shown below. <include> <library> <smp> <amr> <include> <single> <multi> 14 CHAPTER 1 INTRODUCTION amr_lib.h: Header file for Codec library amr_libe.h: Header file for Encodecr library amr_libd.h: Header file for ...

Page 15

Combination of libraries Table 1-4 shows the combination of the header file and the library to be used. Table 1-5 shows the combination of the library and the DSP when using the Codec library. Table 1-4. Combination of Header ...

Page 16

CHAPTER 2 LIBRARY SPECIFICATIONS This chapter explains the function specifications and calling conventions of the µ SAP77016-B06. 2.1 Application Processing Flow Figures 2-1 and 2-2 show examples of application processing using the µ SAP77016-B06. Figure 2-1. Example of Application Processing ...

Page 17

CHAPTER 2 LIBRARY SPECIFICATIONS Figure 2-2. Example of Application Processing Flow (Decoder) Start Decoder initialization call amr_InitDecoder Speech output initialization processing • AD/DA initial settings • Interrupt enable, etc. No 160 samples? Yes Decoder data input processing Decode processing call ...

Page 18

Function Specifications 2.2.1 amr_InitEncoder function The amr_InitEncoder function initializes the constants, coefficient table, and buffers used for the encoder. Call this function only once when using the encoder. [Classification] Encoder initialization function [Function name] amr_InitEncoder [Summary of function] Initializes ...

Page 19

The amr_ResetEncoder function resets the constants, coefficient table, and buffers used for the encoder to the initial status. [Classification] Encoder reset function [Function name] amr_ResetEncoder [Summary of function] Resets the parameters necessary for processing the AMR speech ...

Page 20

The amr_EncodeFrame function compresses speech data of 16 bits × 160 samples at a specified bit rate. When the silence compression function is set to ON during initialization, the silence compression function is automatically enabled in accordance ...

Page 21

The amr_InitDecoder function initializes the constants, coefficient table, and buffers used for the decoder. Call this function only once when using the decoder. [Classification] Decoder initialization function [Function name] amr_InitDecoder [Summary of function] Initializes the RAM area ...

Page 22

The amr_ResetDecoder function resets the constants, coefficient table, and buffers used for the decoder to the initial status. [Classification] Decoder reset function [Function name] amr_ResetDecoder [Summary of function] Resets the parameters necessary for processing the AMR speech ...

Page 23

The amr_DecodeFrame function decompresses compressed bit stream data to speech data of 16 bits × 160 samples. [Classification] Decode processing function [Function name] amr_DecodeFrame [Summary of function] Decompresses speech of one frame (160 samples) from a bit ...

Page 24

The amr_sid_sync_init function initializes the constants, coefficient table, and buffers used for the SID (Silence Descriptor) synchronization function. Call this function only once when using the encoder. [Classification] SID synchronization initialization function [Function name] amr_sid_sync_init [Summary of ...

Page 25

The amr_sid_sync function determines the transmit frame type in accordance with the encode mode used for compression. Call this function once per encode processing of one frame. [Classification] SID synchronization function [Function name] amr_sid_sync [Summary of function] ...

Page 26

The amr_TX_to_RX function converts a transmit frame type (TX_TYPE receive frame type (RX_TYPE). [Classification] Frame type conversion function [Function name] amr_TX_to_RX [Summary of function] Converts a transmit frame type to a receive frame type. [Format] ...

Page 27

The amr_ehf_test function checks whether the input speech signal is the homing frame of the encoder. [Classification] Encoder homing frame test function [Function name] amr_ehf_test [Summary of function] Identifies the homing frame of the speech data. [Format] ...

Page 28

The amr_GetVersion function returns the version information of the AMR speech CODEC library. [Classification] Version information acquisition function [Function name] amr_GetVersion [Summary of function] Returns the version information. [Format] call amr_GetVersion [Argument] None [Return value] Type Register ...

Page 29

Memory Structure This section explains the structure of the memory required for the µ SAP77016-B06 library. In the µ SAP77016-B06, scratch memory and static memory areas must be defined separately. Be sure to use the PUBLIC quasi directive to ...

Page 30

I/O buffer This is an area that is used to input/output speech data and bit stream data. The user can use the I/O buffer used by the encoder/decoder after encoding/decoding one frame. encoding/decoding processing, normal operation of the µ ...

Page 31

Macros 2.4.1 AMR_AllocateScratchMemory macro [Classification] Scratch memory allocation [Macro name] AMR_AllocateScratchMemory [Summary of function] Allocates the scratch memory necessary for AMR speech CODEC processing and declares a symbol name. [Format] %AMR_AllocateScratchMemory [Argument] None [Return value] None [Definition symbol] ib_Scratch_x, ...

Page 32

Tables 3-1 through 3-9 show the bit allocation of the bit stream in each mode of the µ SAP77016-B06. Bit Position index of 1st LSF submatrix b8 to b15 index of 2nd LSF submatrix b16 to b23 ...

Page 33

CHAPTER 3 BIT STREAM FORMAT Table 3-2. Bit Allocation in MR102 Mode Bit Position index of 1st LSF subvector b9 to b17 index of 2nd LSF subvector b18 to b26 index of 3rd LSF subvector First subframe ...

Page 34

Bit Position index of 1st LSF subvector b10 to b18 index of 2nd LSF subvector b19 to b27 index of 3rd LSF subvector b28 to b35 adaptive codebook index b36 to b39 position of 4th pulse b40 ...

Page 35

CHAPTER 3 BIT STREAM FORMAT Table 3-4. Bit Allocation in MR74 Mode Bit Position index of 1st LSF subvector b9 to b17 index of 2nd LSF subvector b18 to b26 index of 3rd LSF subvector First subframe ...

Page 36

Bit Position index of 1st LSF subvector b9 to b17 index of 2nd LSF subvector b18 to b26 index of 3rd LSF subvector b27 to b34 adaptive codebook index b35 to b38 position of 3rd pulse b39 ...

Page 37

CHAPTER 3 BIT STREAM FORMAT Table 3-6. Bit Allocation in MR59 Mode Bit Position index of 1st LSF subvector b9 to b17 index of 2nd LSF subvector b18 to b26 index of 3rd LSF subvector First subframe ...

Page 38

Bit Position index of 1st LSF subvector b9 to b16 index of 2nd LSF subvector b17 to b23 index of 3rd LSF subvector b24 to b31 adaptive codebook index b32 position subset b33 to b35 position of ...

Page 39

CHAPTER 3 BIT STREAM FORMAT Table 3-8. Bit Allocation in MR475 Mode Bit Position index of 1st LSF subvector b9 to b16 index of 2nd LSF subvector b17 to b23 index of 3rd LSF subvector First subframe ...

Page 40

The relationship between the bit allocation (b1 through b242) in Tables 3-1 through 3-9 and word data is shown below. Figure 3-1. Relationship Between Bit Allocation and Word Offset MSB ...

Page 41

... The following is an example of when files are copied from the A drive to the C drive. A:\>amr_mw.exe<CR> <3> A dialog box to specify the directory for installing the µ SAP77016-B06 is displayed. Specify a directory. Any directory may be specified. In this example assumed that C:\DSPTools is specified. <4> Click the OK button and expansion of the files begins. ...

Page 42

Sample Creation Procedure The sample programs for a single channel and multiple channels (2 channels) are stored in the smp directory (refer to 1.3.4 Directory configuration). For the source program for a single channel, refer to APPENDIX A SAMPLE ...

Page 43

Change of Location The section names shown in Table 4-1 are given to the library of the µ SAP77016-B06. The location can be changed in accordance with the user target system. Section Name _ _AMR_CONST_X_ _ _ _AMR_CONST_Y_ _ ...

Page 44

APPENDIX A SAMPLE PROGRAM SOURCE This appendix shows a sample source of the µ SAP77016-B06 (AMR speech CODEC middleware). This sample source was created by referring to the sample source of 3GPP (3rd Generation Partnership Project). For details of each ...

Page 45

APPENDIX A SAMPLE PROGRAM SOURCE • sample.asm d_mode prev_d_mode dtx_mode: dw DTX f_e_reset f_d_reset f_d_reset_old:ds 1 r7save dp7save mode_cnt frame_cnt WORK_Y YRAMSEG at 0x0000 ...

Page 46

APPENDIX A SAMPLE PROGRAM SOURCE • sample.asm /* ========================================================================= * Programe code section * =========================================================================*/ MAIN_CODE IMSEG at 0x4000 StartUp: ;;==============================================================;; ;; Initialize uPD7701x ;;==============================================================;; %InitializeSystemRegister %ClearAllRegister ;;==============================================================;; ;; Initialize Register & Peripheral Units ;;==============================================================;; r0l = 0x0200 *SST1:x = ...

Page 47

APPENDIX A SAMPLE PROGRAM SOURCE • sample.asm MODE_COUNT = r0l FRAME_COUNT = r0l r0l = 1 D_RESET_FLAG_OLD = r0l ;;==============================================================;; ;; Set interrupt mask ;;==============================================================;; %DisableInterrupt %SetMask(SR_ALL) %UnSetMask(SR_SI1) %EnableInterrupt ;;==============================================================;; ;; Main routine ;;==============================================================;; MainLoop: /* check reset codec flag ...

Page 48

APPENDIX A SAMPLE PROGRAM SOURCE • sample.asm /* multi rate mode */ r0 = F_MULTI if( call MultiRateMode ; /* encode speech */ clr(r0) r0l = E_MODE dp4 = speech_in dp0 = bitstream call amr_EncodeFrame USED_MODE = r0l ...

Page 49

APPENDIX A SAMPLE PROGRAM SOURCE • sample.asm /* if homed: check if this frame is another homing frame */ r0 = D_RESET_FLAG_OLD if( jmp proc_dec_next_1 ; /* only check until end of first subframe */ clr(r6) R6l = ...

Page 50

APPENDIX A SAMPLE PROGRAM SOURCE • sample.asm /* ========================================================================= [Function Name] MultiRateMode =========================================================================*/ MultiRateMode: clr(r0) r0l = MODE_COUNT & 0x7 E_MODE = r1l MODE_COUNT = r1l ret /* ========================================================================= [Handler Name] SI1Handler ...

Page 51

APPENDIX B RELATED DOCUMENTS The recommendations related to the AMR speech CODEC published by 3GPP are as follows. • 3GPP TS 26.071 AMR speech Codec; General description • 3GPP TS 26.073 AMR speech Codec; C-source code • 3GPP TS 26.074 ...

Page 52

User’s Manual U15165EJ3V0UM ...

Page 53

... Thank you for your kind support. Taiwan NEC Electronics Taiwan Ltd. Fax: +886-2-2719-5951 Asian Nations except Philippines NEC Electronics Singapore Pte. Ltd. Fax: +65-250-3583 Japan NEC Semiconductor Technical Hotline Fax: +81- 44-435-9608 Page number: Acceptable Poor CS 02 ...

Related keywords