`
`United States Patent
`McMahon et al.
`
`(10) Patent No.:
`(45) Date of Patent:
`
`US 8.489,860 B1
`Jul. 16, 2013
`
`USOO848986OB1
`
`(54) MOBILE ELECTRONIC DEVICE HAVINGA
`HOST PROCESSOR SYSTEM CAPABLE OF
`DYNAMICALLY CANGING TASKS
`PERFORMED BY A COPROCESSORN THE
`DEVICE
`
`(75) Inventors: Michael McMahon, Plano, TX (US);
`Marion C. Lineberry, Dallas, TX (US);
`Matthew A. Woolsey, Plano, TX (US);
`Gerard Chauvel, Antibes (FR)
`
`(*) Notice:
`
`(73) Assignee: Texas Instruments Incorporated,
`Dallas, TX (US)
`Subject to any disclaimer, the term of this
`patent is extended or adjusted under 35
`U.S.C. 154(b) by 0 days.
`(21) Appl. No.: 08/995,606
`
`Dec. 22, 1997
`
`(2006.01)
`
`(22) Filed:
`(51) Int. Cl.
`G06F 9/30
`(52) U.S. Cl
`USPG
`(58) Field of Classification Search
`USPC ...... 712/32, 33, 35,34, 38, 29, 39, 31; 717/1,
`717/2, 3, 4, 5; 707/36, 39, 227,501, 503,
`707/509, 104.1, 103.1, 27, 28, 103 Y, 103 X;
`709/208, 227, 201, 218, 315, 316, 317, 332,
`709/321; 713/191, 188: 775/222; 716/16,
`716/17
`See application file for complete search history.
`
`712/34
`
`(56)
`
`References Cited
`
`U.S. PATENT DOCUMENTS
`4,727.545 A * 2/1988 Glackemeyer et al. ......... T14? 33
`4,878,002 A * 10/1989 Heatzig et al. ............. 318.568.2
`5,287,515 A * 2/1994 Murai et al. .................. 395,712
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`PORTABLE
`CODE
`
`DYNAMIC CROSS
`COMPLER
`
`UNLINKED
`TARGET CODE
`
`DYNAMIC CROSS
`COMPLER
`
`HOST PROCESSOR 12
`
`3. Side fal. ...............366
`3.2 A :
`render et al. ....
`5,371,860 A * 12/1994 Mura et al. .....
`... 395,325
`5,471,612 A * 1 1/1995 Schlafly ......
`TO7 104
`5,559,548 A * 9/1996 Davis et al. ....................... 348.6
`5,577.250 A * 1 1/1996 Anderson et al. ............. 395/670
`5,613,098 A * 3/1997 Landau et al. .....
`... 395,500
`5,748,650 A * 5/1998 Blaker et al. .......
`T14f786
`5,768,593 A * 6/1998 Walters et al. ...
`395,705
`5,771.275 A * 6/1998 Brunner et al. ................. 379/67
`5,826,039 A * 10/1998 Jones .............
`TO9,206
`5,892,966 A * 4/1999 Petricket al. ................... T12/36
`5,923,892 A * 7/1999 Levy ............................... T12/31
`5,953,741 A * 9/1999 E
`tal. ..
`... 711,132
`5,961,586 A * 10/1999 E.
`TO9,201
`6,003,065 A * 12/1999 Yan et al. ...
`TO9,201
`6,009,507 A * 12/1999 Brooks et al. ................... T12/28
`6,029,000 A
`22000 Woolsey et al. ............. 717,147
`6,075,863 A * 6/2000 Krishnan ...................... T13, 191
`(Continued)
`OTHER PUBLICATIONS
`Yuchi Nakao, Java on M32R/D, Sun's Worldwide Java Developer
`Conference, CA, May 1996.*
`(Continued)
`Primary Examiner — Robert Fennema
`(74) Attorney, Agent, or Firm — Ronald O. Neerings; Wade
`James Brady, III; Frederick J. Telecky, Jr.
`(57)
`ABSTRACT
`A wireless data platform comprises a plurality of processors.
`Channels of communication are set up between processors
`Such that they may communicate information as tasks are
`performed. A dynamic cross compiler executed on one pro
`cessor compiles code into native processing code for another
`processor. A dynamic cross linker links the compiled code for
`other processor. Native code may also be downloaded to the
`platform through use of a JAVA Bean (or other language type)
`which encapsulates the native code. The JAVA Bean can be
`encrypted and digitally signed for security purposes.
`
`46 Claims, 3 Drawing Sheets
`
`LINKED
`TARGET CODE
`
`
`
`Ex.1017
`APPLE INC. / Page 1 of 18
`
`
`
`US 8,489,860 B1
`Page 2
`
`
`
`U.S. PATENT DOCUMENTS
`6,078,736 A * 6/2000 Guccione ........................ T16, 16
`6,173,438 B1* 1/2001 Kodosky et al.
`717/109
`6,330,659 B1* 12/2001 Poffet al. ....................... T12/34
`OTHER PUBLICATIONS
`Mamoru Sakamoto, M32R/D in Silicon , Sun's Worldwide Java
`Developer Conference, CA, May 1996.*
`Eric Ngyuen, Java based Devices from Mitsumishi, Sun's Worldwide
`Java Developer Conference, CA, May 1996.*
`Brook Crothers, “Mitsumishi Shows Off Java Chips'. News.com,
`May 1996.*
`
`Hoff, Arthur, “Java and Internet Programming”. Aug. 1, 1995. pp.
`1-5.
`Obtained
`via
`http://www.dd.com/web-development?
`1844O96O7.
`Business Wire: “Ericsson annonunces its M2190 OEM Wireless
`Modem, first PCMCIA modem for mobile data connectivity”. Nov. 2,
`1994, pp. 1-7.*
`Goodman, David. Holtzman, Jack. “Packet Communication Tech
`nology for Advanced Wireless Networks”. 1990, pp. 1-6.*
`Schwartz, J.P. et al. “OPAL: A High Level Language and Environ
`ment for DSP Boards on PC”. 4 pages, 1989.*
`* cited by examiner
`
`Ex.1017
`APPLE INC. / Page 2 of 18
`
`
`
`U.S. Patent
`U.S. Patent
`
`Jul. 16, 2013
`
`Sheet 1 of 3
`
`US 8,489,860 B1
`US 8,489,860 B1
`
`G97
`
`40
`
`O3GIA
`
`¥¢
`
`Ya
`
`W08
`
`aoeLilAVAVA 2YITIOYLNOD
`cy|u3710yN094G01ONY
`SEEaieeeeovoFmNEE
`
`Ol97|WVIOSLIB-91
`imJa)
`boltwyfags|nvud
`J14VUL9g)aeCNYAYONSM
`
`YOLVYR1300VSz)om|
`2¢2Su/As
`omGWIGSwows—_|CHOI
`tba
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`Ary)JOVINIIN!
`YYOMLIN
`
`OWO
`ovG
`
`olany
`
`oF
`
`9¢
`
`BP
`
`ve
`
`Ex.1017
`APPLEINC./ Page 3 of 18
`
`Ex.1017
`APPLE INC. / Page 3 of 18
`
`
`
`
`
`U.S. Patent
`
`Jul. 16, 2013
`
`Sheet 2 of 3
`
`US 8,489,860 B1
`
`
`
`
`
`APPLET
`40
`
`DSP AP CLASS
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`
`HOST-DSP
`52-1INTERFACELAYER
`HOST RTOS
`DSP DEVICE DRIVER
`
`
`
`
`
`
`
`HOST-DSP
`INTERFACE
`
`FIC.. 2
`
`TASK
`
`TASK
`
`
`
`TASK
`
`HOST-DSP INTERFACE LAYER
`62
`DSP RTOS
`HOST DEVICE DRIVER
`
`
`
`PORTABLE
`CODE
`
`DYNAMIC CROSS
`COMPLER
`
`UNLINKED
`TARGET CODE
`
`DYNAMIC CROSS
`COMPLER
`
`HOST PROCESSOR 12
`
`LINKED
`TARGET CODE
`
`ATTRIBUTES
`
`
`
`
`
`
`
`90-N-
`
`JAVA BEAN
`
`PERSISTENT BINARY DATA
`92N NATIVE code
`
`
`
`
`
`96-1
`
`LOAD CODE
`
`960
`
`96b
`
`EXECUTE
`
`96C
`
`FIC. 4
`
`Ex.1017
`APPLE INC. / Page 4 of 18
`
`
`
`U.S. Patent
`
`Jul. 16, 2013
`
`Sheet 3 of 3
`
`US 8,489,860 B1
`
`
`
`
`
`
`
`
`
`
`
`
`CLIENT HOST
`42,44,46
`
`100
`
`RETRIEVE
`WRAPPER
`
`RETURN
`WRAPPER
`
`
`
`JAWA WRAPPER
`WITH NATIVE CODE
`
`
`
`
`
`
`
`
`
`
`
`
`
`EXCEPTION
`PROCESSING
`
`114
`
`FIG. 6
`
`DOWNLOAD SIGNED,
`ENCRYPTED BEAN
`
`110
`
`112
`
`VERIFY
`SECNATURE
`FROM A TRUSTED
`SOURCE?
`
`116
`
`118
`
`CHECK ATTRIBUTES
`
`SUFFICIENT
`RESOURCES
`AVAILABLE?
`
`
`
`YES 120
`
`LINK CODE FOR
`DESIRED PROCESSOR
`
`EXECUTE CODEON
`DESIRED PROCESSOR
`
`Ex.1017
`APPLE INC. / Page 5 of 18
`
`
`
`US 8,489,860 B1
`
`1.
`MOBILE ELECTRONIC DEVICE HAVINGA
`HOST PROCESSOR SYSTEM CAPABLE OF
`DYNAMICALLY CANGING TASKS
`PERFORMED BY A COPROCESSORN THE
`DEVICE
`
`CROSS-REFERENCE TO RELATED
`APPLICATIONS
`
`This application is related U.S. Ser. No. 08/995,600
`10
`entitled “Mobile Communication System with Cross Com
`piler and Cross Linker” to Woolsey et al, now U.S. Pat. No.
`6,029,000, U.S. Ser. No. 08/995,597, entitled Method and
`Apparatus for Providing Downloadable Functionality to an
`Embedded Coprocessor” to Brewer, now U.S. Pat. No. 6.295,
`645, and U.S. Ser. No. 08/995,603, entitled Method and
`Apparatus for Extending Security Model to Native Code' to
`Brewer, now U.S. Pat. No. 6,219,787, all filed on even date
`herewith and incorporated by reference herein.
`
`15
`
`STATEMENT OF FEDERALLY SPONSORED
`RESEARCH ORDEVELOPMENT
`
`Not Applicable
`
`BACKGROUND OF THE INVENTION
`
`25
`
`30
`
`35
`
`1. Technical Field
`This invention relates in general to mobile electronic
`devices and, more particularly, to a hardware and Software
`platform for mobile electronic devices.
`2. Description of the Related Art
`Handheld portable devices are gaining popularity as the
`power and, hence, functionality of the devices increases. Per
`sonal Digital Assistants (PDAs) are currently in widespread
`use and Smartphones, which combine the Some of the capa
`bilities of a cellular phone and a PDA, are expected to have a
`significant impact on communications in the near future.
`Some devices currently incorporate one or more DSPs
`(digital signal processor) or other coprocessors for providing
`certain discrete features. Such as Voice recognition, and a
`general purpose processor for the other data processing func
`tions. The code for the DSP and the code for the general
`purpose processor is generally stored in ROMs or other non
`Volatile memories, which are not easily modified. Thus, as
`45
`improvements and new features become available, it is often
`not possible to upgrade the capabilities of the device. In
`particular, it is not possible to maximize the use of the DSPs
`or other coprocessor which may be present in the device.
`Therefore, a need exists for a data processing architecture
`which can be upgraded and optimizes use of multiple proces
`sors and coprocessors.
`
`40
`
`50
`
`BRIEF SUMMARY OF THE INVENTION
`
`55
`In the present invention, a mobile electronic device com
`prises a coprocessor for executing native code, a host proces
`Sor system operable to execute native code corresponding to
`the host processor system and processor independent code.
`The host processor System is operable to dynamically change
`60
`the tasks performed by the digital signal coprocessor. Com
`munication circuitry provides for communication between
`the host processor System and the coprocessor.
`The present invention provides significant advantages over
`the prior art. Because the host processor System can dynami
`cally allocate the tasks being performed by the coprocessor,
`which may be a digital signal processor, to fully use the
`
`65
`
`2
`coprocessor. The host processor system may direct a routine
`to one of a plurality of coprocessors, depending upon a variety
`of factors, such the present capabilities of each processor.
`
`BRIEF DESCRIPTION OF THE SEVERAL
`VIEWS OF THE DRAWINGS
`
`For a more complete understanding of the present inven
`tion, and the advantages thereof, reference is now made to the
`following descriptions taken in conjunction with the accom
`panying drawings, in which:
`FIG.1 illustrates a block diagram of a platform architecture
`particularly Suited for general wireless data processing:
`FIG. 2 illustrates a functional block diagram of the plat
`form of FIG. 1;
`FIG. 3 illustrates a functional block diagram of dynamic
`cross compiling and dynamic cross linking functions;
`FIG. 4 illustrate an embodiment of native code for execu
`tion on a processor being encapsulated in a JAVA Bean wrap
`per for downloading to a device;
`FIG. 5 illustrates the operation of transferring the encap
`sulated native code to a processor on a device from a JAVA
`Bean located on a remote server, and
`FIG. 6 illustrates a flow diagram describing security fea
`tures associated with the operation of FIG. 5.
`
`DETAILED DESCRIPTION OF THE INVENTION
`
`The present invention is best understood in relation to
`FIGS. 1-6 of the drawings, like numerals being used for like
`elements of the various drawings.
`FIG. 1 illustrates a preferred embodiment of a general
`wireless data platform architecture, which could be used for
`example, in the implementation of a Smartphone or PDA. The
`wireless data platform 10 includes a general purpose (Host)
`processor 12 coupled to bus structure 14, including data bus
`14a, address bus 14b and control bus 14c. One or more DSPs
`(or other coprocessors) 16, including the core processor 16a
`and the peripheral interface 16b, are coupled to bus 14 and to
`memory and traffic controller 18, which includes a DSP cache
`memory 18a, a CPU cache 18b, and a MMU (memory man
`agement unit) 18c. A hardware accelerator circuit 20 (for
`accelerating a portable language Such as JAVA) and a video
`and LCD controller 22 are also coupled to the memory and
`traffic controller 18. The output of the video and LCD con
`troller is coupled to a LCD or video display 24.
`Memory & traffic controller 18 is coupled to bus 14 and to
`the main memory 26, shown as an SDRAM (synchronous
`dynamic random access memory). Bus 14 is also connected to
`I/O controller 28, interface 30, and RAM/ROM32. A plural
`ity of devices could be coupled to the wireless data platform
`10, such as Smartcard 34, keyboard 36, mouse 38, or one or
`more serial ports 40, such as a USB (universal serial bus) port
`or an RS232 serial port. Interface 30 can couple to a flash
`memory card 42 and/or a DRAM card 44. The peripheral
`interface 16b can couple the DSP 16 to a DAC (digital to
`analog converter) 46, a network interface 48 or to other
`devices.
`The wireless data platform 10 of FIG. 1 utilizes both a
`general purpose processor 12 and a DSP 16. Unlike current
`devices in which the DSP 16 is dedicated to specific fixed
`functions, the DSP 16 of FIG. 1 can be used for any number
`of functions. This allows the user to derive the full benefit of
`the DSP 16.
`One main area in which the DSP 16 can be used is in
`connection with the man-machine interface (MMI). Impor
`tantly, functions like speech recognition, image and video
`
`Ex.1017
`APPLE INC. / Page 6 of 18
`
`
`
`3
`compression and decompression, data encryption, text-to
`speech conversion, and so on, can be performed much more
`efficiently using the DSP 16. The present architecture allows
`new functions and enhancements to be easily added to wire
`less data platform 10.
`It should be noted that the wireless data platform 10 is a
`general block diagram and many modifications could be
`made. For example, FIG. 1 illustrates separate DSP and pro
`cessor caches 18a and 18b. As would be known to one skilled
`in the art, a unified cache could also be used. Further, the
`hardware acceleration circuit 20 is an optional item. Such
`devices speed the execution of languages such as JAVA; how
`ever, the circuit is not necessary for operation of the device.
`Further, although the illustrated embodiment shows a single
`DSP multiple DSPs (or other coprocessors) could be coupled
`to the buses.
`FIG. 2 illustrates a functional software architecture for the
`wireless data platform 10. This block diagram presumes the
`use of JAVA; it should be noted that languages other than
`JAVA could be used as well. Functionally, the software is
`divided into two groups, Host processor software and DSP
`software. The Host software includes one or more applets 40.
`The DSP API class 42 is a JAVA API package for JAVA
`applications or applets to access the functionality of the DSP
`API 50 and Host DSP Interface Layer 52. A JAVA virtual
`machine (VM) 44 interprets the applets. The JAVA native
`interface 46 is the method which the JAVAVM executes host
`processor or platform specific code. Native tasks 48 are non
`JAVA programs which can be executed by the Host processor
`12 without using the JAVA native interface. The DSP API 50,
`described in greater detail hereinbelow, is an API (application
`program interface) used the Host 12 to call to make use of the
`capabilities of the DSP 16. The Host-DSP Interface Layer 52
`provides an API for the Host 12 and DSP 16 to communicate
`with each other, with other tasks, or other hardware using
`channels via the Host-DSP Communication Protocol. The
`DSP device driver 54 is the Host based device driver for the
`Host RTOS 56 (real time operating system) to communicate
`with the DSP 16. The Host RTOS 56 is an operating system,
`such as NUCLEUS PLUS by Accelerated Technology Incor
`porated. Alternatively a non-real time operating system, Such
`as WINDOWS CE by Microsoft Corporation, could be used.
`The DSP Library 58 contains programs stored for execution
`on the DSP 16.
`On the DSP side, one or more tasks 60 can be stored in
`memory for execution by the DSP 16. As described below, the
`tasks can be moved in and out of the memory as desired. Such
`that the functionality of the DSP is dynamic, rather than static.
`The Host-DSP Interface layer 62 on the DSP side performs
`the same function as the Host-DSP Interface layer 52 on the
`50
`Host side, namely it allows the Host 12 and DSP 16 to com
`municate. The DSP RTOS 64 is the operating system for the
`DSP processor. The Host Device driver 66 is a DSP based
`device driver for the DSP RTOS 64 to communicate with the
`Host 12. The Host-DSP Interface 70 couples the DSP 16 and
`Host 12.
`In operation, the software architecture shown in FIG. 2
`uses the DSP 16 as a variable function device, rather than a
`fixed function device as in the prior art. Accordingly, the DSP
`functions can be downloaded to the mobile device incorpo
`rating the architecture of FIG. 2 to allow the DSP 16 to
`perform various signal processing functions for the Host 12.
`DSP-API
`The DSP-API provides a device independent interface
`from the Host 12 to the DSP 16. The functions provide the
`Host 12 with the ability to load and schedule tasks on the DSP
`16 and to control and communicate with those tasks. The API
`
`30
`
`35
`
`40
`
`45
`
`55
`
`60
`
`65
`
`US 8,489,860 B1
`
`10
`
`15
`
`25
`
`4
`functions include calls to: determine the DSPs available
`resources, create and control Host 12 and DSP tasks, create
`and control data channels between Host 12 and DSP tasks,
`and communicate with tasks. These functions are described
`below. Each function returns a BOOLean result, which will
`be SUCCESS for a successful operation, or FAILURE. If the
`result is FAILURE, the erroode should be checked to deter
`mine which error occurred.
`DSP Get MIPS
`BOOL DSP Get MIPS(T DeviceID DeviD, U32*mips,
`U16*errcode):
`This function returns the current MIPS available on the
`DSP. This consists of the MIPS capability of the DSP 16
`minus a base MIPS value (the MIPS value with no additional
`dynamic tasks, i.e. the kernel plus API code plus drivers),
`minus the sum of the MIPS ratings for all loaded dynamic
`tasks. The errcode parameter will contain the following pos
`sible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP Get Memory Available
`BOOL
`DSP Get Memory Available(T DeviceID
`DevID. T. Size
`progmemo, T. Size *datamem.
`U16*errcode):
`This function will query the DSP 16 specified by DevID for
`the amounts of available memory for both program memory
`and data memory. The resultant values are returned in the
`progmem and datamem parameters. The sizes are specified in
`T DSP Words. The errcode parameter will contain the fol
`lowing possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP Alloc Mem
`BOOL DSP Alloc MemcT DeviceID DeviD, U16 mem
`page,
`T. Size
`size, T DSP Word **memptr.
`U16*errcode):
`This function will allocate a block of memory on a DSP16.
`The Dev ID specifies which device on which to allocate the
`memory. The mempage is 0 for program space, and 1 for data
`space. The size parameter specifies the memory block size in
`T DSP Words. The returned memptr will be a pointer to the
`memory block on the DSP 16, or NULL on failure. The
`erreode parameter will contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP INVALID MEMPAGE
`DSP NOT ENOUGH MEMORY
`DSP Free Mem
`BOOL DSP Free MemcT DeviceID DevID, U16 mem
`page, T DSP Word *memptr, U16*errcode):
`This function will free a block of memory on a DSP that
`was allocated with the DSP Alloc Mem function. The
`DevilD specifies on which device the memory resides. The
`mempage is 0 for program space, and 1 for data space. The
`memptr parameter is the pointer to the memory block. The
`erreode parameter will contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP INVALID MEMPAGE
`DSP MEMBLOCK NOT FOUND
`DSP Get Code Info
`BOOL DSP Get Code Info(char *Name, T CodeIdr
`*codehdr, U16*errcode):
`
`Ex.1017
`APPLE INC. / Page 7 of 18
`
`
`
`US 8,489,860 B1
`
`6
`TABLE 1-continued
`
`Task Creation Structure.
`
`5
`
`Data Type
`
`Field
`Name
`
`Description
`
`T DSP Ptr
`
`T HOST Ptr
`
`10
`
`T DSP Ptr
`
`T DSP Ptr
`
`T DSP Ptr
`
`T DSP Ptr
`
`15
`
`T DSP Ptr
`
`CallBack
`
`Create
`
`Start
`
`MsgHandler Pointer to code to handle messages to the
`task.
`Pointer to Host code to handle messages
`from the task.
`Pointer to code to execute when task is
`created.
`Pointer to code to execute when task is
`started.
`Pointer to code to execute when task is
`Suspended.
`Pointer to code to execute when task is
`(SUCC.
`Pointer to code to execute when task is
`stopped.
`
`Suspend
`
`Resume
`
`Stop
`
`5
`This function will access the DSP Library table and return
`the code header for the DSP function code specified by the
`Name parameter. On return, the location pointed to by the
`codehdrparameter will contain the code header information.
`The errcode parameter will contain the following possible
`results:
`DSP SUCCESS
`DSP NAMED FUNC NOT FOUND
`DSP Link Code
`BOOL DSP Link Code(T DeviceID Dev.D, T Code
`Hdr*codehdr, T TaskCreate *tcs, U16*errcode):
`This function will link DSP function code so that it will run
`at a specified address on the DSP specified by DeviD. The
`codehdrparameter points to the code header for the function.
`The dynamic cross linker will link the code based on infor
`mation in the code header, and in the code (COFF file). The
`dynamic cross linker will allocate the memory as needed, and
`link and load the code to the DSP 16. The tcs parameter is a
`pointer to the task creation structure needed in the DSP Cre
`ate Task function. DSP Link Code will fill in the code entry
`points, priority, and quantum fields of the structure in prepa
`ration for creating a task. The errcode parameter will contain
`the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP NOT ENOUGH PROG MEMORY
`DSP NOT ENOUGH DATA MEMORY
`DSP COULD NOT LOAD CODE
`DSP Put BLOB
`BOOL DSP Put BLOB(T DeviceID DeviD, T HostPtr
`srcaddr, T DSP Ptr destaddr, U16 mempage, T. Size
`size, U16*errcode):
`This function will copy a specified Binary Large Object
`(BLOB) to the DSP 16. The DevID specifies on which DSP
`16 to copy the object. The srcaddrparameter is a pointer to the
`object in Host memory. The destaddr is a pointer to the loca
`tion to which to copy the object on the DSP 16. The mempage
`is 0 for program space, and 1 for data space. The size param
`eter specifies the size of the object in T DSP Words. The
`errcode parameter will contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP INVALID MEMPAGE
`DSP Create Task
`DeviD,
`BOOL
`DSP Create Task(T DeviceID
`T TaskCreate *tcs, T TaskID *TaskID, U16*errcode):
`DSP Create Task requests the DSP 16 to create a task
`given the task parameters and the code locations in the DSP's
`program space. The Task Creation Structure is show in Table
`1:
`
`TaskID,
`
`TaskID,
`
`Once the task is created, the Create entry point will be
`called, giving the task the opportunity to do any necessary
`preliminary initialization. The Create, Suspend, Resume, and
`Stop entry points can be NULL. The resultant TaskID con
`tains both the device ID (DevID), and the DSP's taskID. If the
`TaskID is NULL, the create failed. The errcode parameter
`will contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP INVALID PRIORITY
`DSP CHANNEL NOT FOUND
`DSP ALLOCATION ERROR
`DSP Start Task
`BOOL
`DSP Start Task(T TaskID
`U16*errcode):
`This function will start a DSP task specified by TaskID.
`Execution will begin at the task’s Start entry point. The
`erreode parameter will contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP TASK NOT FOUND
`DSP Suspend Task
`BOOL
`DSP Suspend Task(T TaskID
`U16*errcode):
`This function will suspenda DSP task specified by TaskID.
`Prior to being suspended, the tasks Suspend entry point will
`be called to give the task a chance to perform any necessary
`housekeeping. The errcode parameter will contain the follow
`ing possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP TASK NOT FOUND
`DSP Resume Task
`BOOL
`DSP Resume Task(T TaskID
`U16*errcode):
`This function will resume a DSP task that was suspended
`by DSP Suspend Task. Prior to being resumed, the tasks
`Resume entry point will be called to give the task a chance to
`performany necessary housekeeping. The errcode parameter
`will contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP TASK NOT FOUND
`
`TaskID,
`
`25
`
`30
`
`35
`
`40
`
`45
`
`50
`
`55
`
`60
`
`65
`
`TABLE 1.
`
`Task Creation Structure.
`
`Data Type
`
`T DSP Name
`U32
`T ChanD
`T ChanD
`T StrmID
`T StrmID
`U16
`U32
`T. Size
`
`Field
`Name
`
`Name
`MIPS
`Chann
`Chanout
`Strmn
`StrmCout
`Priority
`Quantum
`StackReq
`
`Description
`
`User defined name for the task.
`MIPS used by the task.
`The channel ID used for task input.
`The channel ID used for task output.
`The stream ID used for task input.
`The stream ID used for task output.
`The task's priority.
`The tasks timeslice in system ticks.
`The amount of stack required.
`
`Ex.1017
`APPLE INC. / Page 8 of 18
`
`
`
`7
`DSP TASK NOT SUSPENDED
`DSP Delete Task
`BOOL
`DSP Delete Task(T TaskID
`U16*errcode):
`This function will delete a DSP task specified by TaskID.
`Prior to the deletion, the tasks Stop entry point will be called
`to give the task a chance to perform any necessary cleanup.
`This should include freeing any memory that was allocated by
`the task, and returning any resources the task acquired. The
`errcode parameter will contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP TASK NOT FOUND
`DSP Change Task Priority
`BOOL DSP Change Task Priority(T TaskID TaskID,
`U16 new priority, U16 *oldpriority, U16*errcode):
`This function will change the priority of a DSP task speci
`fied by TaskID. The priority will be changed to new priority.
`The possible values of new priority are RTOS dependent.
`Upon return, the oldpriority parameter will be set to the
`previous priority of the task. The errcode parameter will
`contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP TASK NOT FOUND
`DSP INVALID PRIORITY
`DSP Get Task Status
`BOOL DSP Get Task Status(T TaskID
`U16*status,
`U16*priority, T ChanID
`T ChanD*Output U16*errcode):
`This function returns the status for a DSP task specified by
`TaskID. The status will be one of the following values:
`DSP TASK RUNNING
`DSP TASK SUSPENDED
`DSP TASK WAITFOR SEM
`DSP TASK WAITFOR QUEUE
`DSP TASK WAITFOR MSG
`The priority parameter will contain the task’s priority, and
`the Input and Output parameters will contain the tasks input
`and output channel IDs, respectively. The errcode parameter
`will contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP TASK NOT FOUND
`DSP Get ID From Name
`BOOL DSP Get ID From Name(T DeviceID DeviD,
`T DSP Name Name, T DSP ID *ID, U16*errcode):
`This function returns the ID for a named object on the DSP
`16. The named object may be a channel, a task, a memory
`block, or any other supported named DSP object. The errcode
`parameter will contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP NAME NOT FOUND
`DSP Dbg Read Mem
`BOOL DSP Dbg Read Mem(DEVICE ID DeviD, U8
`60
`mempage, DSP PTR addr, U32 count, DSP WORD
`*buf, U16*errcode):
`This function requests a block of memory. The mempage
`specifies program memory (O) or data memory (1). The addr
`parameter specifies the memory starting address, and the
`count indicates how many T DSP Words to read. The buf
`parameter is a pointer to a caller provided buffer to which the
`
`TaskID,
`*Input,
`
`25
`
`30
`
`35
`
`40
`
`45
`
`50
`
`55
`
`65
`
`US 8,489,860 B1
`
`TaskID,
`
`5
`
`10
`
`15
`
`8
`memory should be copied. The errcode parameter will con
`tain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP INVALID MEMPAGE
`DSP Dbg Write Mem
`BOOL DSP Dbg Write MemcT DeviceID DevID, U16
`mempage, T DSP Ptr addr, T Count count, T DSP
`Word *buf, U16*errcode):
`This function writes a block of memory. The mempage
`specifies program memory (O) or data memory (1). The addr
`parameter specifies the memory starting address, and the
`count indicates how many T DSP Words to write. The buf
`parameter is a pointer the buffer containing the memory to
`write. The errcode parameter will contain the following pos
`sible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP INVALID MEMPAGE
`DSP Dbg Read Reg
`BOOL DSP Dbg Read Reg(T DeviceID DevID, U16
`RegID, T DSP Word *regvalue, U16*errcode):
`This function reads a DSP register and returns the value in
`regvalue. The RegiD parameter specifies which register to
`return. If the RegiD is -1, then all of the register values are
`returned. The regvalue parameter, which is a pointer to a
`caller provided buffer, should point to sufficient storage to
`hold all of the values. The register IDs are DSP specific and
`will depend on a particular implementation. The errcode
`parameter will contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP INVALID REGISTER
`DSP Dbg Write Reg
`BOOL DSP Dbg Write Reg(T DeviceID DevID, U16
`RegID, T DSP Word regvalue, U16*errcode):
`This function writes a DSP register. The Reg|D parameter
`specifies which register to modify. regvalue contains the new
`value to write. The register IDs are DSP specific and will
`depend on a particular implementation. The errcode param
`eter will contain the following possible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP INVALID REGISTER
`DSP Dbg. Set Break
`BOOL DSP Dbg. Set Break(T DeviceID
`DeviD,
`DSP Ptraddr, U16*errcode):
`This function sets a break point at the given code address
`(addr). The errcode parameter will contain the following pos
`sible results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP Dbg. Clr Break
`BOOL DSP Dbg. Clr Break(T DeviceID
`DeviD,
`T DSP Ptraddr, U16 *errcode):
`This function clears a break point that was previously set
`by DSP Dbg. Set Break at the given code address (addr).
`The errcode parameter will contain the following possible
`results:
`DSP SUCCESS
`DSP DEVID NOT FOUND
`DSP DEVID NOT RESPONDING
`DSP BP DID NOT EXIST
`
`Ex.1017
`APPLE INC. / Page 9 of 18
`
`
`
`DSP DEVICE DRIVER
`The DSP Device Driver 54 handles communications from
`the Host 12 to the DSP 16. The driver functions will take the
`communication requests as specified in the Host-DSP Com
`munications Protocol and handle the transmission of the
`information via the available hardware interface. The device
`driver is RTOS dependent and communications hardware
`dependent.
`DSPLIBRARY
`The DSP Library 58 contains the blocks of code that can be
`downloaded to the DSP 16 for execution. Each block of code
`will be previously unlinked, or relocatably linked as a library,
`so that the dynamic cross linker can resolve all address ref
`erences. Each code block will also include information about
`the block's requirements for DSP MIPS (millions of instruc
`tions per second), priority, time slice quantum, and memory.
`The format for the code blockheader is shown in Table 2. The
`program memory and data memory sizes are approximations
`to give the Host 12 a quick check on whether the DSP can
`Support the tasks memory requirements. If there appears to
`be sufficient space, the dynamic cross linker can then attempt
`to link and load the code. It should be noted that the dynamic
`cross linker could still fail, due to page alignment and conti
`guity requirements. In the preferred embodiment, the code is
`in a version 2 COFF file format.
`
`TABLE 2
`
`Code Block Header.
`
`Data Type
`
`Field Name
`
`Description
`
`U16
`T DSP Name
`U32
`T. Size
`T. Size
`T. Size
`
`T. Size
`
`T. Size
`T. Size
`U16
`U32
`
`T. Size
`T. Size
`T DSP Ptr
`
`T DSP Ptr
`
`T DSP Ptr
`T DSP Ptr
`
`T DSP Ptr
`
`T DSP Ptr
`
`T Host Ptr
`
`Processor
`Name
`MIPS
`ProgSize
`DataSize
`InFrameSize
`
`InStrmSize
`OutStrmSize
`Priority
`Quantum
`
`StackReq
`CoffSize
`MsgHandler
`
`The target processor type.
`Task's name.
`Worst case MIPS required by the task.
`Total program memory size needed.
`Total data memory size needed.
`Size of a frame in the task's input
`channel.
`OutFrameSize Size of a frame in the task's output
`channel.
`Size of the task's input stream FIFO.
`Size of the task's output stream FIFO.
`Task's priority.
`Task's time slice quantum (number of
`system ticks).
`Stack required.
`Total size of the COFF file.
`Offset to a message handler entry
`point for the task.
`Offset to a create entry point that is
`called when the task is created.
`Offset to the start of the tasks code.
`Offset to a suspend entry point that is
`called prior to the task being
`Suspended.
`Offset to a resume entry point that is
`called prior to the task being resumed.
`Offset to a stop entry point that is
`called prior to the task being deleted.
`Pointer to the location of the COFF
`data in the DSP Library.
`
`Create
`
`Start
`Suspend
`
`Resume
`
`Stop
`
`Cofftr
`
`10
`
`15
`
`25
`
`30
`
`35
`
`40
`
`45
`
`50
`
`55
`
`Conversion of Portable Code into Linked Target Code
`A procedure for c