USBB17AP77016-XXX-B11 NEC Electronics, USBB17AP77016-XXX-B11 Datasheet

no-image

USBB17AP77016-XXX-B11

Manufacturer Part Number
USBB17AP77016-XXX-B11
Description
DSP middleware(WMA (Windows Media Audio)decoder)
Manufacturer
NEC Electronics
Datasheet
Document No. U15683EJ1V0UM00 (1st edition)
Date Published January 2002 N CP(N)
©
Printed in Japan
User’s Manual
µ µ µ µ SAP77016-B11
WMA Decoder Middleware
Target Devices
µ µ µ µ PD77113A
µ µ µ µ PD77114
µ µ µ µ PD77210
µ µ µ µ PD77213
1999
2002

Related parts for USBB17AP77016-XXX-B11

USBB17AP77016-XXX-B11 Summary of contents

Page 1

User’s Manual µ µ µ µ SAP77016-B11 WMA Decoder Middleware Target Devices µ µ µ µ PD77113A µ µ µ µ PD77114 µ µ µ µ PD77210 µ µ µ µ PD77213 Document No. U15683EJ1V0UM00 (1st edition) Date Published January ...

Page 2

User’s Manual U15683EJ1V0UM ...

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

... Milano, Italy Tel: 02- Fax: 02- NEC Electronics (UK) Ltd. Milton Keynes, UK Tel: 01908-691-133 Fax: 01908-670-290 User’s Manual U15683EJ1V0UM NEC Electronics Hong Kong Ltd. Hong Kong Tel: 2886-9318 Fax: 2886-9022/9044 NEC Electronics Hong Kong Ltd. Seoul Branch Seoul, Korea Tel: 02-528-0303 Fax: 02-528-4411 NEC Electronics Singapore Pte ...

Page 5

This manual is for users who design and develop µ PD77016 Family application Target Readers systems. µ PD77016 Family is the generic name for the µ PD7701x family ( µ PD77015, 77016, 77017, 77018A, 77019), the µ PD77111 Family ( ...

Page 6

... Part Number µ PD77113A U12395E µ PD77114 µ PD77210 µ PD77213 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. 6 Data Sheet User’ ...

Page 7

CHAPTER 1 INTRODUCTION .................................................................................................................10 1.1 Middleware...................................................................................................................................10 1.2 WMA Decoder..............................................................................................................................10 1.3 Product Overview........................................................................................................................10 1.3.1 Features ...........................................................................................................................................10 1.3.2 Operating environment .....................................................................................................................12 1.3.3 Performance .....................................................................................................................................13 1.3.4 Directory configuration......................................................................................................................14 CHAPTER 2 LIBRARY SPECIFICATIONS.............................................................................................15 2.1 Library Overview .........................................................................................................................15 2.2 Application Processing Flow.....................................................................................................16 2.3 Function Specifications ...

Page 8

A.1.3 smp_user.asm ................................................................................................................................. 55 A.2 Sample Header File .................................................................................................................... 61 A.2.1 wma_dec.h....................................................................................................................................... 61 A.3 Sample Timing Files................................................................................................................... 63 A.3.1 smp_input.tmg ................................................................................................................................. 63 A.3.2 smp_serout.tmg ............................................................................................................................... 65 A.3.3 clk_for_2ch.tmg................................................................................................................................ 68 8 User’s Manual U15683EJ1V0UM ...

Page 9

... Predecode Processing Flow .......................................................................................................................... 39 4-5 Main Decode Processing Flow ...................................................................................................................... 40 Table No. 1-1 Bit Rates and Sampling Frequencies Supported by Each Codec.................................................................. 11 1-2 Required Memory Size .................................................................................................................................. 12 1-3 Software Tools............................................................................................................................................... 12 1-4 MIPS Values Required for WMA Decode Processing ................................................................................... 13 2-1 Library Function List ...................................................................................................................................... 15 2-2 User-Defined Function List ............................................................................................................................ 15 2-3 Error Code List .............................................................................................................................................. 25 2-4 Memory Size Required for Each Bit Rate ...................................................................................................... 26 2-5 Recommended Output Buffer Size ...

Page 10

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 11

Table 1-1. Bit Rates and Sampling Frequencies Supported by Each Codec Bit Rate [bps] Sampling Frequency [Hz] 192,000 48,000 160,000 48,000 128,000 48,000 192,000 44,100 160,000 44,100 128,000 44,100 96,000 44,100 80,000 44,100 64,000 44,100 48,000 44,100 32,000 44,100 48,000 ...

Page 12

... The memory size does not include PCM data and bit stream data buffers. Note also that the required memory size can be reduced by limiting the supported bit rates. For details, refer to 2.5 Memory Configuration. (3) Software tools (Windows™ version): Target DSP µ PD77016 Family ...

Page 13

Performance The MIPS values required to perform WMA decoding in real time are shown in Table 1-4 MIPS Values Required for WMA Decode Processing. [Measurement conditions] • Simulator: HSM77016 • Evaluation results: Measure the processing capacity when each WMA ...

Page 14

Directory configuration The directory configuration in the µ SAP77016-B11 is shown below. Figure 1-1. µ µ µ µ SAP77016-B11 Directory Configuration library smp wmadec The directories are outlined below. (1) library Stores the library files. • wmad.lib: Library file ...

Page 15

CHAPTER 2 LIBRARY SPECIFICATIONS This chapter describes the function specifications and function call regulations in the µ SAP77016-B11. 2.1 Library Overview The µ SAP77016-B11 provides the following five functions. Function Name wmad_FileDecodeInit wmad_FileDecodeData wmad_FileGetPCM wmad_GetVersion wmad_FileDecodeInfo The following function must ...

Page 16

Application Processing Flow An example of the application processing flow is shown below. Input data acquisition processing wmad_FileCBGetData Input data Reception processing for data input from host interface, etc. PCM data Serial output processing 16 CHAPTER 2 LIBRARY SPECIFICATIONS ...

Page 17

Function Specifications The specifications for calling each library function are as follows. 2.3.1 wmad_FileDecodeInit function [Classification] WMA decoder initialization processing function [Function name] wmad_FileDecodeInit [Summary of function] Initializes the RAM area and sets the parameters used by the µ ...

Page 18

WMA decode processing function [Function name] wmad_FileDecodeData [Summary of function] Decodes the bit stream data and creates the data required for PCM data creation. [Format] call wmad_FileDecodeData [Arguments] None [Return value] Return Value R0 [Function] This ...

Page 19

WMA decode processing function [Function name] wmad_FileGetPCM [Summary of function] Creates PCM data from the results of decoding wmad_FileDecodeData. [Format] call wmad_FileGetPCM [Arguments] Argument R0L R1L [Return value] Return Value R1 [Function] This function converts the ...

Page 20

Version information acquisition function [Function name] wmad_GetVersion [Summary of function] Returns the versions of the library and corresponding Windows Media Player. [Format] call wmad_GetVersion [Arguments] None [Return value] Return Value R0H R0L R1H R1L [Function] This ...

Page 21

File information acquisition function [Function name] wmad_FileDecodeInfo [Summary of function] Acquires WMA file information. [Format] call wmad_FileDecodeInfo [Arguments] Argument R0L [Return value] Return Value R0 [Function] This function acquires file information such as the bit rate ...

Page 22

Input data acquisition function [Function name] wmad_FileCBGetData [Summary of function] Supplements the input buffer with the bit stream data required for decoding. [Format] The wmad_FileDecodeInit and wmad_FileDecodeData functions call this function in call DP0 ...

Page 23

CHAPTER 2 LIBRARY SPECIFICATIONS [Function request specifications] • Store data of the requested size (argument: R0 bytes) in the user-defined input buffer in the X memory starting from the position of the offset from the start of the bit stream ...

Page 24

Input bit stream data Offset from start [bytes] When arguments are offset = 8, requested size = 3 Input buffer MSB 0x12 0x34 0x56 * * * * * * * * * * * * = Any value 24 ...

Page 25

Error Information Details of the error codes returned by the functions of the µ SAP77016-B11 are shown in the table below. Error cWMA_NoErr cWMA_Failed cWMA_BadArgument cWMA_BadAsfHeader cWMA_BadPacketHeader cWMA_BrokenFrame cWMA_NoMoreFrames cWMA_BadSamplingRate cWMA_BadNumberOfChannels cWMA_BadVersionNumber cWMA_BadWeightingMode cWMA_BadPacketization cWMA_BadDRMType cWMA_DRMFailed cWMA_DRMUnsupported cWMA_DemoExpired cWMA_BadState ...

Page 26

Memory Configuration The configuration of the data memory used by the µ SAP77016-B11, including details of the static area and how to secure area for buffers, is described here. With the µ SAP77016-B11, the scratch memory area and static ...

Page 27

Table 2-4. Memory Size Required for Each Bit Rate (2/2) Bit Rate Sampling Number of [bps] Frequency [Hz] Channels 16,000 22,050 1 16,000 22,050 1 16,000 16,000 2 16,000 16,000 1 12,000 16,000 1 12,000 8,000 2 10,000 16,000 1 ...

Page 28

Static area This area is used to store data permanently. If this area is manipulated by the user following initialization processing, the normal operation of this library cannot be guaranteed. Secure the static area under the label names wmad_lib_Static_x1, ...

Page 29

I/O buffers In order for the µ SAP77016-B11 to perform decoding, an input buffer is required to input the bit stream data (X memory) and an output buffer is required to store the PCM data of the decoding results ...

Page 30

Table 2-5. Recommended Output Buffer Size Sampling Frequency [Hz] 8,000 11,025 16,000 22,050 32,000 44,100 48,000 30 CHAPTER 2 LIBRARY SPECIFICATIONS Size [Words] Mono 512 512 512 1,024 2,048 2,048 2,048 User’s Manual U15683EJ1V0UM Stereo 1,024 1,024 1,024 2,048 4,096 ...

Page 31

Structures The following structures must be prepared in order to acquire WMA file information or contents information. (1) File information structure To acquire WMA file information, prepare the following structure in the X memory and execute the wmad_FileDecodeInfo function. ...

Page 32

Installation Procedure Install the µ SAP77016-B11 (WMA decoder middleware) in the host machine following the procedure shown below. (1) Create a work directory in the host machine. (2) Copy all the files and directories on the supplied medium to ...

Page 33

Change of Location The segment names used by the µ SAP77016-B11 are shown in Table 3-1 Segment Names. The location can be changed to accord with the user’s target by separating the object files from the library files using ...

Page 34

Environment Required for Simulation Using Timing Files The decode processing can be simulated by using the sample program and sample timing files. [Example of software environment] • High-speed simulator: HSM77016 Ver.2.32 or later • Sample program: sample.lnk (program created ...

Page 35

... Edit the timing file to accord with the prepared input data file (refer to A.3 Sample Timing Files). (2) Start up the HSM77016 (high-speed simulator). (3) Select the model file in accordance with the target. Example Select [tools → Simulation Model] and specify the model file. (4) Open sample.lnk created in 3.2 Sample Creation Procedure. Example Select [file → open] and specify sample.lnk. ...

Page 36

Sample Program Outline 4.4.1 Sample program The sample program of the µ SAP77016-B11 is designed based on a system in which input data is transmitted to the DSP via a host interface. Input data is transmitted sequentially from the ...

Page 37

The value of the FileCBGetData_fp variable is compared with the value r1 of the requested offset position and branching to the following label occurs depending on the result: Branch to the case000 label if FileCBGetData_fp = r1 Branch to ...

Page 38

Sample Program Processing Flow The sample program processing flow is shown below. Figure 4-3. Initialization and Decode Processing Flow Start Initialization of registers, user variables, etc. Version information acquisition processing wmad_GetVersion Decoder initialization processing Contents information acquisition processing wmad_FileDecodeInit ...

Page 39

CHAPTER 4 SYSTEM EXAMPLE Figure 4-4. Predecode Processing Flow Start of predecode processing Decode processing wmad_FileDecodeData End of file? Yes No Any errors? Yes No Requested sample number, output buffer address setting Decode processing wmad_FileGetPCM Acquired sample number = 0? ...

Page 40

Figure 4-5. Main Decode Processing Flow Start of main decode processing Requested sample number, output buffer address setting Decode processing wmad_FileGetPCM Acquired sample number = 0? No Has data equal to the processing unit been No output? Yes Is the ...

Page 41

APPENDIX A SAMPLE PROGRAM SOURCE The sample program source of the µ SAP77016-B11 is shown in this chapter. A.1 Sample Source Files A.1.1 sample.asm This file is used to control the overall decode processing. /*-----------------------------------------------------------------*/ /* File Information /*-----------------------------------------------------------------*/ /* ...

Page 42

APPENDIX A SAMPLE PROGRAM SOURCE /* =============================================================== * DEFINE & EQU * ============================================================= */ #define USE_SO 1 #define STRING_SIZE 64 #define MAX_PCMSIZE 2048 MAX_RINGSIZE equ MAX_PCMSIZE*2 /* =============================================================== * LOCAL VARIABLES AND BUFFER * ============================================================= */ _ _ SAMPLE_X_RAM XRAMSEG ...

Page 43

APPENDIX A SAMPLE PROGRAM SOURCE sample_rate Num_Channels ds 1 duration packet_size first_packet_offset last_packet_offset has_DRM bit_rate SAMPLE_X_DEC_OUTPUT XRAMSEG output_buffer: ds MAX_PCMSIZE SAMPLE_X_SER_OUTPUT XRAMSEG ...

Page 44

APPENDIX A SAMPLE PROGRAM SOURCE ; int2 vector nop reti nop nop ; int3 vector nop reti nop nop ; int4 vector nop reti nop nop ; SI1 vector nop reti nop nop ; SO1 vector jmp _so_interrupt reti nop ...

Page 45

APPENDIX A SAMPLE PROGRAM SOURCE reti nop nop ; Hardware signal vector nop reti nop nop ; Timer vector nop reti nop nop /* =============================================================== * PROGRAM CODE * ============================================================= */ MAIN IMSEG AT 0x240 start: clr(r0) r0l = EIR ...

Page 46

APPENDIX A SAMPLE PROGRAM SOURCE dn4 = r0l dn5 = r0l dn6 = r0l dn7 = r0l DMX = r0l DMY = r0l ;;=========================================================;; ;; Initialize Register & Peripheral Units ;;=========================================================;; r0l = 0x0000 *DWTR:x=r0l r0l = 0x0081 *HST:x = ...

Page 47

APPENDIX A SAMPLE PROGRAM SOURCE *desc_description_len:x = r0l *desc_rating_len:x = r0l call Init_FileCBGetData ;;=========================================================;; ;; Get Version Information ;;=========================================================;; call wmad_GetVersion ;;=========================================================;; ;; Initialize WMA Decoder and Get Content Information ;;=========================================================;; r0l = wmad_FileCBGetData clr(r1) r1l = 0x0001 r2l = ...

Page 48

APPENDIX A SAMPLE PROGRAM SOURCE *f_dec_unit_end:x = r0l *n_get_pcm:x = r0l ;;=========================================================;; ;; Previous Decode routine ;;=========================================================;; _pre_DecodeData: call wmad_FileDecodeData /*** decode is finished ? ***/ cWMA_NoMoreFrames if(r1==0) jmp finish cWMA_Failed if(r1==0) ...

Page 49

APPENDIX A SAMPLE PROGRAM SOURCE r2l = 1 *f_dec_unit_end:x = r2l *start_flag:x = r2l clr(r2) _pre_GetPCM_end: *n_get_pcm:x = r2l /* chekc decode unit is end ? */ r2 = *f_dec_unit_end:x if(r2==0) jmp _pre_GetPCM #if USE_SO call _SetPCM #else *f_dec_unit_end:x = ...

Page 50

APPENDIX A SAMPLE PROGRAM SOURCE r3 = *n_sample sra sra 16 clr(r4) r4l = *Num_Channels if(r4== r0l = output_buffer r0 ...

Page 51

APPENDIX A SAMPLE PROGRAM SOURCE jmp _loop_GetPCM ;;=========================================================;; ;; Finish ;;=========================================================;; finish *ring_entries:x if(r2>0) jmp $- *n_get_pcm:x if(r2==0) jmp serout_finish *n_sample:x = r2h #if USE_SO call _SetPCM #else *f_dec_unit_end:x = r2l #endif r2 = *ring_entries:x if(r2>0) ...

Page 52

APPENDIX A SAMPLE PROGRAM SOURCE dmx = MAX_RINGSIZE-1 clr(r4) r4l = *Num_Channels clr(r3) r3l = *n_sample:x Loop r3l { r2 = *dp0++ *dp1%% = r2h if(r4==0) jmp $+ *dp0++ *dp1%% = r2h nop ...

Page 53

APPENDIX A SAMPLE PROGRAM SOURCE r0l = *ring_read_ptr: dp0 = r0l r0l = *ring_dn0:x dn0 = r0l dmx = MAX_RINGSIZE *dp0%% *SDT1:x=r0h r0l = dp0 *ring_read_ptr:x = r0l r0l = *ring_entries *ring_entries:x = ...

Page 54

APPENDIX A SAMPLE PROGRAM SOURCE A.1.2 smp_data.asm This file is used to secure the static and scratch areas. /* =============================================================== * PUBLIC * ============================================================= */ public wmad_lib_static_x1 public wmad_lib_static_x2 public wmad_lib_static_y1 public wmad_lib_static_y2 public wmad_lib_scratch_x public wmad_lib_scratch_y /* =============================================================== * ...

Page 55

APPENDIX A SAMPLE PROGRAM SOURCE A.1.3 smp_user.asm This file is the source file of the user-defined function wmad_FileCBGetData. /*-----------------------------------------------------------------*/ /* File Information /*-----------------------------------------------------------------*/ /* Name : smp_user.asm /* Type : Assembler program module /* Version : 1.00 /* Date : ...

Page 56

APPENDIX A SAMPLE PROGRAM SOURCE _ _ SMP_USER_XRAM_ _ FileCBGetData_fp read_ptr write_ptr tmp_dn0 tmp_dmx SMP_USER_BUFFER_ _ XRAMSEG align at 0 host_in_buffer: ds CW_BUFF_SIZE*2 ; buffer for input data ...

Page 57

APPENDIX A SAMPLE PROGRAM SOURCE /* =============================================================== [Function Name] wmad_FileCBGetData [Argument required size [byte offset [byte] [Return obtained size [byte] r2l : address of input buffer [Call Function] non [Use Register] r0, r1, r2, ...

Page 58

APPENDIX A SAMPLE PROGRAM SOURCE ;;=========================================================;; ;; case000 ( ;;=========================================================;; case000: r6l = *write_ptr:x *read_ptr:x = r6l srl 1 jmp get_data ;;=========================================================;; ;; case002 ( r5 > r1 ...

Page 59

APPENDIX A SAMPLE PROGRAM SOURCE get_data_next: if(r3==0) jmp set_data r6l = *write_ptr:x dp0 = r6l loop r3l { %READ_HOST(R4,R4) *dp0%% = r4h r6l = dp0 *write_ptr:x = r6l ;;=========================================================;; ;; Set Data ;;=========================================================;; set_data: ...

Page 60

APPENDIX A SAMPLE PROGRAM SOURCE r4l = *tmp_dn0:x dn0 = r4l r4l = *tmp_dmx:x dmx = r4l r2l= input_buffer ret END set r2l ; User’s Manual U15683EJ1V0UM (6/6) ...

Page 61

APPENDIX A SAMPLE PROGRAM SOURCE A.2 Sample Header File A.2.1 wma_dec.h This is the header file for the sample program. /*-----------------------------------------------------------------*/ /* File Information /*-----------------------------------------------------------------*/ /* Name : wma_dec.h /* Type : Assembler header file /* Version : 1.00 /* ...

Page 62

APPENDIX A SAMPLE PROGRAM SOURCE if(Y !=0) jmp $- *HDT =============================================================== * DEFINE (ERROR CODE) * ============================================================= */ #define cWMA_NoErr #define cWMA_Failed #define cWMA_BadArgument #define cWMA_BadAsfHeader #define cWMA_BadPacketHeader #define cWMA_BrokenFrame #define cWMA_NoMoreFrames #define cWMA_BadSamplingRate #define cWMA_BadNumberOfChannels ...

Page 63

APPENDIX A SAMPLE PROGRAM SOURCE A.3 Sample Timing Files A.3.1 smp_input.tmg This timing file fetches data from the input data file (sample_20_16s.dat) and inputs data via the host interface. The input data file name on the 10th line should be ...

Page 64

APPENDIX A SAMPLE PROGRAM SOURCE set pin hcs = 0 set port hd = (data>>8)&0xFF wait 100ns set pin hwr = 1 set pin hcs = 1 enddo ;;--------------------------------------------------------------------;; ;; File Close ;;--------------------------------------------------------------------;; close input break end 64 ; perform ...

Page 65

APPENDIX A SAMPLE PROGRAM SOURCE A.3.2 smp_serout.tmg This timing file is used to save the 16-bit linear PCM data output from the serial interface to a file (so_sample_20_16s_l.dat, so_sample_20_16s_r.dat). Set any name for the file names on the 9th and ...

Page 66

APPENDIX A SAMPLE PROGRAM SOURCE wait cond pin sck1 == 0 wait cond pin sck1 == 1 close output #3 ;;----------------------------------------------------------------------;; ;; Main Output Loop ;;----------------------------------------------------------------------;; do ;;----------------------------------------------------------------------;; ;; For ch 1 ;;----------------------------------------------------------------------;; if pin soen1 == 0 wait cond ...

Page 67

APPENDIX A SAMPLE PROGRAM SOURCE rept 15 wait cond pin sck1 == 0 wait cond pin sck1 == 1 endrept wait 5ns output #2 port so1&0xFFFF if pin sorq1 == 1 set pin soen1 = 1 endif wait cond pin ...

Page 68

APPENDIX A SAMPLE PROGRAM SOURCE A.3.3 clk_for_2ch.tmg This timing file creates the clock signals used to generate the serial output interrupt. Create clock signals with an appropriate cycle in accordance with the input data sampling frequency. This file is described ...

Page 69

... Please complete this form whenever you'd like to report errors or suggest improvements to us. Thank you for your kind support. 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: ...

Related keywords