First processor for dividing long argument data into packets and storing total packet count and packets in shared buffer for subsequent execution by second processor

Information

  • Patent Grant
  • 5355485
  • Patent Number
    5,355,485
  • Date Filed
    Wednesday, March 3, 1993
    31 years ago
  • Date Issued
    Tuesday, October 11, 1994
    29 years ago
Abstract
A method is provided for adding extended functions to a multiprocessor system, specifically, functions that may be called from programming running on a first processor and executed by a second processor. The function may have an argument that requires a large amount of argument data. Each extended function is associated with a special entry point command, which is in turn, associated with a communications routine that handles the transfer of the large argument data from the first processor to the second processor in bursts.
Description

TECHNICAL FIELD OF THE INVENTION
This invention generally relates to computer processing, and more particularly to a method, used with a multiprocessor system, of calling a software function from a program running on a first processor but executed by a second processor.
BACKGROUND OF THE INVENTION
An important development in computer processing has been systems having more than one processor, each capable of independent action to execute applications programming. Different program tasks may be assigned to different processors, with the result that the execution time of the programming is substantially reduced. One approach to dividing tasks in a multiprocessor system is designating subprograms, which link into a main program running on a first processor, for execution by a second processor.
Where designated subprograms are to be executed by a second processor, a problem with implementing such a division of tasks is that the second processor needs certain information about the subprograms passed to it. Because of the difficulty in programming a solution to this problem, some multiprocessor systems have a second processor whose functions are fixed. The user cannot add new functions and is limited to the functions provided with the processor.
In other multiprocessor systems, a programmer may add functions, but must either create a support routine to permit the second processor to receive the function, or use a nonstandard format when defining the function. For this reason, regardless of whether the programmer wrote his or her own function definitions or obtained pre-written function definitions from another, substantial programming effort is required to ensure that the added function would operate in the multiprocessor system.
Thus, a need exists for a multiprocessor system in which functions are extensible. The programmer should not be limited to using only a set number of functions that the second processor is capable of understanding and should be able to add functions to be executed by the second processor with a minimum of programming effort.
One response to this need has been the use of a "generic entry point" method. A number of entry point commands are provided, each associated with certain characteristics of function arguments and return values, if any. Each entry point command invokes an associated communications routine that handles the transfer, from one processor system to another, of the particular argument format and return requirements of that entry point command. Typically, the communications routine uses a communications buffer accessible by both processors to transfer data. Yet, when the buffer has a fixed size, a need exists to handle situations in which the size of the argument data exceeds the size of the buffer.
SUMMARY OF THE INVENTION
All aspects of the invention deal with programming for a multiprocessor system, which has a first processor for running a main application program that calls designated functions to be executed by a second processor. The functions called by the first processor and executed by the second processor are referred to as "extended functions". One aspect of the invention is a method of programming an extended function that has an argument that requires a large amount of data. The function is redefined with a special entry point command, which is associated with a particular argument format, and which invokes an associated communications routine. The communications routine transfers the argument data from one processor to another by using a communications buffer as a circular queue to transfer the data in packets.
Another aspect of the invention is a method of programming an extended function that may include both a first argument that requires a small amount of data and a second argument that requires a large amount of data. The function is redefined with a special entry point, which is associated with a particular argument format as well as with a certain communications routine. The communications routine handles the transfer of the data from one processor to another by first transferring the small argument data, then using a service routine, which transfers the large argument data in bursts.
Another aspect of the invention is a method of using a multiprocessor computer system to call a function on one processor and execute that function on another processor. The computer is programmed to provide a means for passing large amounts of argument data, so that at run time, a memory space such as a communications buffer is used to pass the argument data in bursts. In a first embodiment, the buffer is used as a circular queue to pass the data in packets. In a second embodiment, small argument data as well as large argument data may be transferred. The small data is sent to a buffer at one time, but a service routine transfers the large data to the buffer in bursts.
Another aspect of the invention is a computer system that per,nits functions called from a main program running on one processor to be executed by a second processor. Each one of a set of entry points is associated with various function properties. Each entry point is also associated with a communications routine that enables the processors to exchange values for function arguments and return values, if any. These communications routines include routines especially designed to handle function arguments that require large amounts of data.
A technical advantage of the invention is that a function having a large amount of argument data can be used as an extended function in a multiprocessor computer system. The extended function is associated, via an entry point, with special communications programming that permits processing by the second processor to commence even while data is still being downloaded. Thus, rather than transferring data from the memory of the first processor to the second and then invoking a command for execution by the second processor, the communications programming permits parallelism.





BRIEF DESCRIPTION OF THE DRAWINGS
The novel features of the invention are set forth in the appended claims. The invention itself, however, as well as modes of use and further advantages, is best understood by reference to the following description of illustrative embodiments when read in conjunction with the accompanying drawings.
FIG. 1 is a flow diagram of the steps of the method of programming an extended function that has an argument that requires a large amount of data.
FIG. 2 is a flow diagram of the steps of the method of using a multiprocessor system to run a program on a first processor, which calls functions executed by a second processor.
FIG. 3 is a block diagram of a multiprocessor system typical of a system with which the invention is used.
FIG. 4 illustrates a communications buffer, such as is illustrated in FIG. 3.
FIG. 5 is a flow diagram of the run time method of using a multiprocessor computer system to execute an extended function, in accordance with the large data embodiment of the invention.
FIG. 6 is a flow diagram of the run time method of using a multiprocessor computer system to execute an extended function, in accordance with the small and large data embodiment of the invention.





DETAILED DESCRIPTION OF THE INVENTION
A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent disclosure, as it appears in the Patent and Trademark Office files or records, but otherwise reserves all copyright rights whatsoever.
For purposes of this description, a subprogram that a user might desire to add to a multiprocessor system, is referred to as an "extended function". More specifically, an extended function is a function that is to be called by a main program running on a first processor of a multiprocessor system, but executed by a second processor. The system running the main program is referred to as the "host processor system" or "host system". The system on which the extended function is to be executed is the "subprocessor system" or "subsystem".
It is assumed that the multiprocessor system has a communications system for handling the passing of data between processors. Hardware features of the multiprocessor system, including the communications system, are discussed below, in connection with FIG. 3.
The description of the invention is primarily directed to implementation of the invention with programs written in the C programming language. However, the programming environment in which the invention will operate is not unique to C. Some common programming language characteristics are described below, both for definitional purposes, and for the purpose of setting out those characteristics that permit the invention to be used with other languages.
The "user" of the invention may be various persons who provide parts of a multiprocessor system. For example, the user may be a programmer who wishes to use extended functions in a program. Or, the user may be a programmer who supplies extended functions for use by other programmers. The user may be someone actually running a program having extended functions. Furthermore, the invention may be made or sold by any one of these users. The various aspects of the invention discussed below are directed to different users and different physical embodiments of the invention. Finally, as is characteristic of computer methods and programs, the user may be another program which calls an extended function.
In a copending U.S. patent application Ser. No. 08/25,910 entitled "Extended Software Functions for a Multiprocessor System", also assigned to Texas Instruments, Inc., filed Mar. 3, 1993, still pending, a continuation of U.S. patent application Ser. No. 07/419,999 filed Oct. 11, 1989 and now abandoned, and incorporated by reference, a method is described for using special entry points for communicating the argument data of extended functions. This application is referred to herein as "the copending application".
As in the copending application, this invention is directed to extended functions, which are functions that are called by a program running on a first processor of a multiprocessor system but are executed by a second processor. The entry point is to a communications routine that handles that function's particular argument format. Generally, when an extended function is called, a communications routine handles the transfer of its argument data from host memory into a memory area of the second processor. For purposes of this description, that memory area is referred to as a communications buffer. If the buffer has a fixed size, it is easy for an extended function having a large amount of argument data to overflow this buffer.
A basic concept of this invention is that special entry points may be also used to invoke communications programming to accommodate data that would otherwise overflow the communications buffer. The argument data for which the invention is directed is referred to herein as "large argument data" or "poly data" to distinguish it from argument data that is "small" and will not overflow the buffer.
The invention has two embodiments, whose use depends on whether the extended function passes only large data, or small, as well as large data. The embodiment associated with the first situation is referred to herein as the "poly embodiment", and the embodiment associated with the second situation is referred to as the "immediate-poly embodiment".
FIG. 1 illustrates a method of programming an extended function in accordance with the two embodiments of the invention. Generally, the steps of the method are the same as for the above referenced copending application, except that the implementations are different because of the nature of the argument data.
Thus, in step 11, a subprogram is selected for execution on the second processor. In this invention, the subprogram is a function that requires a large amount of argument data.
Step 12 is assigning an identifier to the extended function, which, as in the copending application, permits the user to add more than one extended function, by identifying the function to both processor systems. Thus, the identifier provides a means for selecting the proper extended function to be executed at run time.
In step 13, the user selects an entry point command from a number of entry points commands recognized by the communications system. As discussed above, these entry point commands include commands that invoke a communications routine that handles the transfer of large argument data between processors. Here, the implementation of step 13 varies according to which embodiment of the invention is used. The entry point command is common to both the entry point code in the subprogram and its call in the main program. The entry point command's arguments are the extended function's identifier and information about its arguments.
The following examples are representative implementations of entry point commands, in accordance with the invention, shown in C language syntax. In each of the entry point command arguments, the "cmd.sub.-- number" is the function identifier discussed above in connection with step 12.
The poly embodiment is used when the argument contains only large data, and no small data. An entry point command invokes a communications routine that uses a buffer as a circular queue of packets to download the argument data to the subprocessor. The form of the entry point, herein referred to as a poly entry point command, is:
______________________________________void poly (cmd.sub.-- number, packet.sub.-- number, / packet.sub.-- size, packet.sub.-- ptr) short cmd.sub.-- number; short packet.sub.-- number; short packet.sub.-- size; char far *packet.sub.-- ptr;______________________________________
A second implementation of step 13 is the immediate-poly embodiment of the invention, which is used when small argument data, as well as large data, are to be passed to the second processor. The form of the entry point command, herein referred to as an ipoly entry point command, is:
______________________________________void ipoly (cmd.sub.-- number, nShorts, sData, /..., ItemSz, nItems, pData)unsigned short cmd.sub.-- number;unsigned short nShorts;unsigned short sData; . . .unsigned short ItemSz;unsigned short nItems;char far *pData;______________________________________
An explanation of each argument is:
______________________________________cmd.sub.-- number command numbernShorts number of immediate short words to sendsData short word of data to sendItemSz size of items that follow (in bytes)nItems number of items that follow*pData pointer of data to send______________________________________
Step 14 is defining the extended function's arguments consistent with the selected entry point command. For the poly embodiment, the argument data is parameterized with an argument that represents the large data. For the immediate-poly embodiment, the argument data is parameterized with an argument for the small data and an argument for the large data. If more than one of each of such arguments is desired, all steps of the invention can be easily modified to accommodate corresponding parameterization.
Step 15 is adding special communications programming at an entry point associated with the entry point command to handle the transfer of the extended function's argument data. Again, this communications programming varies according to the embodiment of the invention being used. Appendices A and B are examples of programming in accordance with the poly embodiment of the invention. Appendices C-E are examples of programming in accordance with the immediate-poly embodiment. These appendices are further explained below in connection with the run time aspects of the invention. Table 1 explains the instructions used in Appendices B, C and E.
Step 16 is adding a function call to the main program. For the poly embodiment, the call has the general form:
______________________________________poly (cmd.sub.-- number, packet.sub.-- number, packet.sub.-- size, packet.sub.-- ptr);______________________________________
For the immediate-poly embodiment, using the example of Appendix B, the call of polypixel in the host program would appear as:
______________________________________ipoly (cmd.sub.-- number, 2, color, rop, 4, nPoints, pData)______________________________________
where the arguments represent the following information:
______________________________________cmd.sub.-- number command number of function2 specifies that two immediate arguments followcolor the first immediate argumentrop the second immediate argument4 each item is a point, which in this case is two words, or 4 bytes. The first word is an x coordinate; the second word is a y coordinate.nPoints Specifies the number of points to be sentpData A pointer in memory of first processor where the point data resides.______________________________________
A means for invoking the entry point command upon calling the extended function is required, which in the preferred embodiment is accomplished with a processor that directs the programming to the entry point when the function is called.
FIG. 2 illustrates a run time aspect of the invention, which is a method of using a multiprocessor computer system to execute a single program having at least one extended function. The basic steps are similar to the basic steps of the copending application. As explained below in connection with steps 23 and 24, however, the implementations of these steps do not simply transfer argument data from one memory to another and require additional communications programming to monitor the transfer of data in blocks.
The method of FIG. 2 is for use on a multiprocessor system having a communication means. FIG. 2 is best understood with reference to FIG. 3, which is a block diagram of a computer system having both a host processor system 310 and a subprocessor system 320. Processors 311 and 321 each have their own memory, 312 and 322. A communication means between the two processors is embodied by bus 330 and communications buffer 323. Bus 330 is bidirectional and provides a sixteen bit data path and nine control lines. Communications buffer 323 can be accessed by both processor systems 310 and 320. In the preferred embodiment, communications buffer 323 is a storage structure, having separate locations for host messages and subprocessor messages and other data. Other hardware implementations of a communications storage means are possible, with the primary requirement being that each processor 311 and 321 have access to memory space, including parameter space for handshaking between processors, function identification space to identify the function being called, and data space to pass command arguments and additional data.
The configuration shown in FIG. 3 is only one of numerous means for providing interprocessor communications, and other means are easily developed. Furthermore, although FIG. 3 shows the two processor systems, 310 and 320, as having separate memories 312 and 322, the communications means may be a shared memory.
The multiprocessor system of FIG. 3 operates with various standard peripheral devices, notably a display 340, mass storage 350, and input devices 360, such as a keyboard or mouse. An I/O circuit 313 is used to communicate information in appropriate form between these input and output devices and the other parts of host system 310, via a host system bus 314. Display 340 and input devices 360 permit a user to interact with the host processor system 310. If subprocessor system 320 is used for graphics tasks, display 340 may be coupled to processor 321 rather than to host system 310.
Referring again to FIG. 2, step 21 is calling an extended function. As indicated above, the initial call is from a main program running on host processor system 310, but the extended function definition resides in memory 322 of subprocessor system 320. The call must be directed to subprocessor system 320. Thus, in step 21, the call in the main program directs the host processor to an entry point of communications programming, the latter being programmed to transfer data consistent with the properties of the function. In the C language embodiment, the call may be in the form of the preprocessor function calls described above in connection with step 16 with FIG. 1. This syntax is especially useful in the preferred embodiment, for redefining the function call as a call to the entry point, using an entry point command.
Step 22 is initiating communications between the two processor systems 310 and 320. This step involves using the communications programming and communications buffer 323 to perform handshaking routines. These handshaking routines are known in the art, and includes the passing of messages to indicate busy, idle, or message waiting conditions. Although, as indicated above, the memory space used to exchange data between processors is described herein as a communications buffer 323, any mutually accessible form of memory space could be used. Step 23 is loading the extended function's identifier and its argument data into communications buffer 323, using communications programming invoked at the entry point and executed by the host. However, a feature of the invention is that large argument data is not loaded at one time.
FIGS. 4 and 5 illustrate steps 22-24 of the poly embodiment of the invention in more specific detail. Generally, the extended function is associated with a communications routine that transfers the large data in bursts. FIG. 4 illustrates a buffer during run time and FIG. 5 illustrates the steps of the communications routine.
Referring to FIGS. 4 and 5, in step 22, the communications routine is invoked, such that certain values used by the communications routine are initialized. Specifically, values representing the total number of packets, TP, and the buffer size, BS, are obtained. Values representing the number of packets sent to the buffer, PS, and the packets downloaded from the buffer, PU, are set to zero.
In step 23, a packet of large data is uploaded to buffer 323. In step 53, the packets sent count is updated. In step 54, this count is compared to the total number of packets to be transferred. If the packets sent count is equal to the total number of packets to be transferred, the routine ends.
As indicated by FIG. 5, concurrently with step 23, step 24 is downloading the data from buffer 323 to memory 322 of the second processor system 320. In step 24, the data is removed from the buffer and matched with local variables of the extended function residing in the second processor system memory 322.
Step 55 is obtaining a packets used count. Step 56 is subtracting the packets used count from the packets sent count to ensure that there is enough room in buffer 323 to download more packets. If there is sufficient room, step 23 is repeated. If there is not sufficient room, the routine waits for step 24 to download more data. As indicated in FIG. 5, this process is repeated until all packets have been transferred.
An example of computer code to implement the steps of FIG. 5 is set out in Appendices A and B. Appendix A illustrates the steps performed by host processor 311, which are the steps of FIG. 5 except for step 24. Appendix B illustrates step 24. The example is a shell routine, in which the poly call set out above in connection with Step 16 of FIG. 1, is implemented as dm.sub.-- poly.
FIG. 6 illustrates steps 24 and 25 of the immediate-poly embodiment of the invention in further detail. As indicated in FIG. 6, these uploading and downloading steps actually occur twice: once for the small data and once for the large data.
Step 24a occurs after the extended function is called, and comprises generating a data pointer in memory 322 of the second processor system 320. The data at that address consists of the immediate data values, which in step 24a, are downloaded to local memory of the second processor system 320.
Step 61 is calling a service routine that processes the poly data and supplies a communications protocol. The use of a service routine is preferred to isolate these tasks from the extended function. The service routine has the following parameters:
______________________________________ srv.sub.-- ipoly (pItemSrv, pDataBuf) void (*pItemSrv) ( ); char *pDataBuf;______________________________________
The pItemSrv is the address of a function that will in turn be called by srv.sub.-- ipoly to handle one or more items. This function will be called repeatedly by srv.sub.-- ipoly until all the items have been received by the second processor and serviced, and has the following parameters:
______________________________________ (*pItemSrv) (nItems, pItems); unsigned short nItems; char *pItems;______________________________________
where nItems is the number of items requiring service and pItems is the address of a data buffer containing nItems of data.
Referring again to the parameters of srv.sub.-- ipoly, pDataBuf is the address immediately following the last immediate word received by the extended function. Thus, part of step 61 is passing an address of the large data to the second processor system 320, specifically, to a service routine.
An example of computer code to implement the steps of FIG. 6 is set out in Appendices C-E. Appendix C is an example of a user function that is called using the immediate-poly entry point, which is dm.sub.-- ipoly in the example. The user function, polypixel, is a graphics function that draws specified pixels on a display screen. It has two immediate arguments: the foreground color of the pixel and the raster op to be used to draw the pixels. The remaining data is poly data, more specifically, an array of points where pixels are to be drawn. The code for the ipoly entry point, which is executed by processor 311, is set out in Appendix D. In general, the poly data is retrieved by a callback communication service routine, which is turn called drawpixels until the received poly data is exhausted.
Thus, referring to FIG. 6, with reference to Appendix E, the user function is called with a pointer to the communication buffer 323 where the small (immediate) data exists. In step 24a, the user function retrieves and uses this data as necessary. In step 61, the function calls a standard service routine to process the receiving of large (poly) data. This service routine is called srv.sub.-- ipoly, and executed by processor 321. The srv.sub.-- ipoly routine provides the communications, and, as in step 24b of FIG. 6, retrieves data items from host system 310 in bursts. Consistent with step 62, once a burst has been received, an item service routine, whose address was specified by the user function as an argument to srv.sub.-- ipoly is called to service those received items. A pointer to the received data items and the length of the data (number of items) are passed to this item service routine. This process is then continued until all items have been received and serviced.
Although the invention has been described with reference to specific embodiments, this description is not meant to be construed in a limiting sense. Various modifications of the disclosed embodiment, as well as alternative embodiments of the invention will become apparent to persons skilled in the art upon reference to the description. It is, therefore, contemplated that the appended claims will cover such modifications that fall within the true scope of the invention.
APPENDICES
The disclosure of this patent application incorporates the attached appendices, which are summarized as follows:
Appendices A and B are an example of the computer code to implement the poly embodiment of the invention.
Appendices C-E are an example of computer code to implement the immediate-poly embodiment of the invention.
Table 1 explains the instructions used in Appendices B, C and E, which are used with a 340 family of processors manufactured by Texas Instruments Inc. The instructions of Appendices A and D are for a host processor such as one of the 80** family manufactured by Intel Corp.
TABLE 1__________________________________________________________________________ABS Rd Store Absolute Value Operation: Rd! .fwdarw. Rd Store the absolute value of the specified register back into the register.ADD Rs, Rd Add Registers Operation: Rs + Rd .fwdarw. Rd Add the contents of the source register to the contents of the destination register.ADDC Rs. Rd Add Registers with Carry Operation: Rs + Rd + C .fwdarw. Rd Add the contents of the source register and the carry bit to the contents of the destination register.ADDI IW. Rd. [W] Add Immediate - Short or LongADDI IL. Rd. [L] Operation: Immediate value + Rd .fwdarw. Rd Add an immediate value to the contents of the destination register. In the short form, the operand is a 16-bit sign-extended value. In the long form, the operand is a 32-bit signed value. You can force the assembler to use the short (16-bit) form of this instruction by using the W operand. You can force the assembler to use the long (32-bit) form of this instruction by using the L operand.ADDK K, Rd Add Constant (5 Bits) Operation: K + Rd .fwdarw. Rd Add a 5-bit constant to the contents of the destination register. The constant K is treated as an unsigned number in the range 1-32: K = 32 is converted to 0 in the opcode. The assembler issues an error if you try to add 0 to a register. -CALLA Address Call Subroutine - Absolute Operation: PC' .fwdarw. TOS Address .fwdarw. PC The assembler pushes the address of the next instruction (PC') onto the stack then jumps to the specified 32 bit address.CALLR Address Call Subroutine - Relative Operation: PC' .fwdarw. TOS PC + (displacement .times. 16) .fwdarw. PC The assembler pushes the address of the next instruction (PC') onto the stack, then jumps to the address specified by PC + displacement. The address must be within the current section.CLR Rd Clear Register Operation: Rd XOR Rd .fwdarw. Rd Set the contents of the register to 0CMP Rs, Rd Compare Registers Operation: set status bits on the result of Rd - Rs Set the status bits as if the contents of the source register were subtracted from the contents of the destination register. This is a nondestructive compare - the register contents do not change.CMPI IW.Rd.[W] Compare Immediate - Short or LongCMPI IL.Rd.[L] Operation: set status bits on the result of Rd - immediate value Set the status bits as if an immediate value were subtracted from the contents of the destination register. This is a nondestructive compare - the register contents do not change. CMPI is used with conditional jumps. In the short form, the operand is a 16-bit sign-extended value. In the long form, the operand is a 32-bit signed value. You can force the assembler to use the short (16-bit) form of this instruction by using the W operand. You can force the assembler to use the long (32-bit) form of this instruction by using the L operand.DSJ Rd. Address Decrement Register and Skip Jump - Short or LongDSJS Rd. Address Operation: Rd - 1 .fwdarw. Rd If Rd .noteq. 0, then (displacement .times. 16) + PC' .fwdarw. PC If Rd = 0, then go to next instruction Decrement the contents of the destination register by 1. If the results is nonzero, then jump to the address specified by (displacement .times. 16) + PC. If the result is 0, then skip the jump and continue execution at PC. This instruction has a short form and a long form. The assembler automatically chooses the short form if the displacement is .+-.5 bits or less which provides a jump range of 32 words (excluding 0). The assembler automatically chooses the long form if the displacement is greater than 5 bits, which provides a jump range of 32,768 to 32,767.JRcc Address Jump Relative conditional Operation: If cc = true, then displacement + PC' .fwdarw. PC If cc = false, then go to next instruction. If the conditions is true, jump to the address specified by displacement + PC'. If the condition is false, continue execution at PC'. cc is the condition code. This instruction has a short form and a long form. The assembler automatically chooses the short form if the displacement is 8 bits or less. This provides a jump range of .+-.127 words (excluding 0). The assembler automatically chooses the long form if the displacement is greater than 8 bits. This provides a jump range of .+-.32K words (excluding 0).MMFM Rs[, reg. list] Move Multiple Registers from Memory Operation: If Register n is in the register list. *Rs- .fwdarw. Rn (repeat for n = 0 to 15) Load the contents of a specified list of either A or B registers (not both) from a block of memory. Rs points to the first location in the memory block; Rs and the registers in the list must be in the same file. If you don't specify a register list, all the registers that are in the same file as Rs are moved.MMTM Rd[, reg. list] Move Multiple Registers to Memory Operation: If Register n is in the register list Rn .fwdarw. -*Rd (repeat for n = 0 to 15) Store the contents of a specified list of either A or B registers (not both) into a block of memory. Rd points to the first location in the memory block; Rd and the registers in the list must be in the same file. If you don't specifiy a register list, all the registers that are in the same file as Rd are moved.MOVE Rs, Rd Move - Register to Register Operation: Rs .fwdarw. Rd Move the contents of the source register into the destination register. It is not necessary for the registers to be in the same file.MOVE Rs, *Rd [.F] Move Field - Register to Indirect Operation: field in Rs .fwdarw. field in *Rd Move a field from the source register into a memory location specified by the contents of the destination register.MOVE Rs, *Rd+ [.F] Move Field - Register to Indirect (Postincrement) Operation: field in Rs .fwdarw. field in *Rd Rd + field size .fwdarw. Rd Move a field from the source register into a memory location specified by the contents of the destination register. After the move, increment the contents of Rd by the field size.MOVE Rs, -*Rd [.F] Move field - Register to Indirect (Predecrement) Operation: Rd - field size .fwdarw. Rd field in Rs .fwdarw. field in *Rd Decrement the contents of Rd by the field size. Move a field from the source register into a memory location specified by the contents of the destination register.MOVE Rs, *Rd(offset) [.F] Move Field - Register to Indirect with Offset Operation: field in Rs .fwdarw. field in * (Rd + offset) Move a field from the source register into a memory location. The destination address is formed by adding an offset to the contents of the destination register.MOVE Rs, @DAddress [.F] Move Field - Register to Absolute Operation: field in Rs .fwdarw. field in memory Move a field from the source register into the specified destination address.MOVE *Rs, Rd [.F] Move Field - Indirect to Register Operation: field in *Rs .fwdarw. field in Rd Move a field from contents of a memory address into the destination register. The source address is specified by the contents of the source register.MOVE *Rs, *Rd [.F] Move Field - Indirect to Indirect Operation: field in *Rs .fwdarw. field in *Rd Move a field from the contents of a memory address into another memory address. The source address is specified by the contents of the source register, and the destination address is specified by the contents of the destination register.MOVE *Rs+, Rd [.F] Move Field - Indirect (Postincrement) to Register Operation: field in *Rs .fwdarw. field in Rd Rs + field size .fwdarw. Rs Move a field from the contents of a memory address into the destination register. The source address is specified by the contents of the source register. After the move, increment the contents of the source register by the field size.MOVE *Rs+, *Rd+ [.F] Move Field - Indirect (Postincrement) to Indirect (Postdecrement) Operation: field in *Rs .fwdarw. field in *Rd Rs + field size .fwdarw. Rs Rd + field size .fwdarw. Rd Move a field from the contents of a memory address into another memory address. The source address is specified by the contents of the source register, and the destination address is specified by the contents of the destination register. After the move, increment the contents of both the source register and the destination register by the field size.MOVE -*Rs, Rd [.F] Move Field - Indirect (Predecrement) to Register Operation: Rs - field size .fwdarw. Rs field in *Rs .fwdarw. field in Rd Decrement the contents of the source register by the field size. Move a field from the contents of a memory address into the destination register. The source address is specified by the contents of the source register.MOVE -*Rs, Rd [.F] Move Field - Indirect (Predecrement) to Indirect (Predecrement) Operation: Rs - field size .fwdarw. Rs Rd - field size .fwdarw. Rd field in *Rs .fwdarw. field in *Rd Decrement the contents of both the source register and the destination register by the field size. Move a field from the contents of a memory address into another memory address. The source address is specified by the contents of the source register and the destination address is specified by the contents of the destination register.MOVE *Rs(offset), Rd [.F] Move Field - Indirect with Offset to Register Operation: field in *(Rs - offset) .fwdarw. field in Rd Move a field from the contents of a memory address into the destination register. The source address is formed by adding an offset to the contents of the source register.MOVE *Rs(offset), *Rd+ [.F] Move Field - Indirect with Offset to Indirect (Postincrement) Operation: field in *)Rs + offset) .fwdarw. field in (Rd Move a field from the contents of a memory address into the destination register. The source address is formed by adding an offset to the contents of the source register. After the move, increment the contents of the destination register by the field size.MOVE *Rs(offset), *Rd(offset) [.F] Move Field - Indirect with Offset to Indirect with Offset Operation: field in *(Rs + offset) .fwdarw. field in *(Rd + offset) Move a field from the contents of a memory address into another memory address. The source address is formed by adding an offset to the contents of the source register, and the destination address is formed by adding an offset to the contents of the destination register.MOVE @SAddress, Rd [.F] Move Field - Absolute to Register Operation: field in source address .fwdarw. field in Rd Move a field from the contents of the specified memory address into the destination register.MOVE @SAddress, *Rd+ [.F] Move Field - Absolute to Indirect (Postincrement) Operation: field in source address .fwdarw. field in *Rd Rd + field size .fwdarw. Rd Move a field from the contents of the specified source address into the memory address specified by the contents of the destination register. After the move, increment the contents of the destination register by the field size.MOVE @SAddress, @DAddress [.F] Move Field - Absolute to Absolute Operation: field in source address .fwdarw. field in destination address Move a field from the contents of the specified source address into the specified destination addressMOVI IW. Rd[W] Move Immediate - Short or LongMOVI IL. Rd.[Ll] Operation: Immediate operand .fwdarw. Rd Move an immediate value into the destination register. In the short form, the operand is a 16-bit sign-extended value. In the long form, the operand is a 32-bit signed value. You can force the assembler to use the short (16-bit) form of the instruction by using the W operand. You can force the assembler to use the long (32-bit) form of this instruction by using the L operand.MOVK K, Rd Move Constant - 5 Bits Operation: K .fwdarw. Rd Move a 5-bit constant into the destination register. Note that this instruction does not affect the status register.MPYS Rs. Rd Multiply Registers - Signed Operation: Rd even: Rs .times. Rd .fwdarw. Rd;Rd + 1 Rd odd: Rs .times. Rd .fwdarw. Rd Perform a signed multiply of a field in the source register by the 32-bit contents of the destination register. This produces a 32- bit to a 64-bit result, depending on the register and the field definition.PIXBLT XY, L Pixel Block Transfer - XY to Linear Operation: source pixel array .fwdarw. destination pixel array (with processing). Transfer and process a source pixel array with a destination pixel array according to the selected graphics operations. The starting address of the source array is an XY address, the starting address of the destination array is a linear address.PIXBLT XY, XY Pixel Block Transfer - XY to XY Operation: source pixel array .fwdarw. destination pixel array (with processing). Transfer and process a source pixel array with a destination pixel array according to the selected graphics operations. The starting addresses of the both arrays are XY addresses.PIXT Rs, *Rd Pixel Transfer - Register to Indirect Operation: pixel in Rs .fwdarw. pixel in *Rd Transfer a pixel from the source register to the linear address specified by the contents of the destination register.PIXT Rs, *Rd.XY Pixel Transfer - Register the Indirect XY Operation: pixel in Rs .fwdarw. pixel in *Rd.XY Transfer a pixel from the source register to the XY address specified by the contents of the destination register.PIXT *Rs, Rd Pixel Transfer - Indirect to Register Operation: pixel in *Rs .fwdarw. pixel in Rd Transfer a pixel from a linear address to the destination register. The source address is specified by the contents of the source register.PIXT *Rs, *Rd Pixel Transfer - Indirect to Indirect Operation: pixel in *Rs .fwdarw. pixel in *Rd Transfer a pixel from a linear address to another linear address. The source address is specified by the contents of the source register, and the destination address is specified by the contents of the source destination register.PIXT *RS.XY, Rd Pixel Transfer - Indirect XY to Register Operation: pixel in *Rs.XY .fwdarw. pixel in Rd Transfer a pixel from a XY address to the destination register. The source address is specified by the contents of the source register.PIXT *Rs.XY, *Rd.XY Pixel Transfer - Indirect XY to Indirect XY Operation: pixel in *Rs.XY .fwdarw. pixel in *Rd.XY Transfer a pixel from an XY address to another XY address. The source address is specified by the contents of the source register, and the destination address is specified by the contents of the source destination register.RETS [N] Return from Subroutine Operation: *SP .fwdarw. PC (N defaults to 0) SP + 32 + 16N .fwdarw. SP Return from a subroutine. Move the program counter from the stack and increment SP by 32 + 16N. If N is not specified, increment the SP by 32.SETF FS, FE [.F] Set Field Parameters Operation: (FS, FE) .fwdarw. ST Load the values specified for the field size and field extension bits into the status register. The remainder of the status register is not affected.SLL K, Rd Shift Left Logical - Constant Operation: left-shift Rd by K .fwdarw. Rd Left-shift the contents of the destination register by the value of K. (K specifies a value between 0-31). Os are left-shifted into the LSBs and the last bit shifted out is shifted into the carry bit. Note that this instruction does not affect the overflow bit.SLL Rs, Rd Shift Left Logical - Register Operation: left-shift Rd by Rs .fwdarw. Rd Left-shift the contents of the destination register by the value in the 5 LSBs in the source register. (The 5 LSBs of the source register specify a value between 0-31: the 27 MSBs are ignored.) Os are left-shifted into the LSBs and the last bit shifted out is shifted out is shifted into the carry bit. Note that this instruction does not affect the overflow bit.SUB Rs, Rd Subtract Registers Operation: Rd - Rs .fwdarw. Rd Subtract the contents of the source register from the contents of the destination register.SUBK K, Rd Subtract Constant Operation: Rd - K .fwdarw. Rd Subtract a 5-bit constant from the contents of the destination register. K is an unsigned number in the range 1-32. K-0 in the opcode corresponds to the value__________________________________________________________________________ 32. Key: Rs Source register RsX, Rdx X half (16 LSBs) of the Rs or Rd SAddress 32bit source address IW 16bit (short) immediate value Address 32bit address (label) K 5bit constant PC' Next instruction Rd Destination register RsY, RdY Y half (16 MSBs) of Rs or Rd DAddress 32bit destination address IL 32bit (long) immediate value F Field select: defaults to 0 F = 0 selects FS0 and FE0 F = 1 selects FS1 and FE1 ##SPC1## ##SPC2## ##SPC3## ##SPC4## ##SPC5##
Claims
  • 1. A method of using a multiprocessor computer system having a first processor for calling extended functions, a second processor for executing extended functions and a communications buffer of a predetermined data size for communications between the first and second processors, said communications buffer implemented as a shared address space accessible by both the first and second processor, each said extended function having at least one argument specifying data that is greater in size than the predetermined data size of the communications buffer, said method comprising the steps of:
  • calling one of said extended functions from a main program running on the first processor;
  • dividing the argument data corresponding to said called extended function into a plurality of data packets of predetermined packet size corresponding to said called extended function, said predetermined packet size permitting a plurality of said data packets to be simultaneously stored within the communications buffer;
  • executing a first communications routine running on the first processor via a first entry point command corresponding to said called extended function, the step of executing said first communications routine including
  • writing an extended function and a data packet count corresponding to said called extended function into the communications buffer, said data packet count indicating a total number of data packets of argument data to be sent to the second processor for said called extended function,
  • sequentially (a) writing one of said data packets into the communications buffer, (b) determining if one of said data packets has been read from the communications buffer by the second processor, (c) writing another one of said data packets into the communications buffer if a number of said data packets written into the communications buffer minus a number of said data packets read from the communications buffer indicates free data space within the communications buffer greater than said predetermined packet size, until said plurality of data packets have been written into the communications buffer;
  • reading said extended function identifier and said data packet count from the communications buffer by the second processor;
  • executing a second communications routine running on the second processor, the step of executing said second communications routine including
  • sequentially (a) reading one of said data packets from the communications buffer, (b) indicating one of said data packets has been read from the communications buffer, and (c) determining whether said one of said data packets read from said communications buffer is a last one of said data packets for said called extended function by comparing a number of data packets read from said communications buffer with said data packet count;
  • if it is determined in said determining step that said one of said data packets is not said last one of said data packets, repeating said reading, indicating, and determining steps for another one of said data packets, and
  • if it is determined in said determining step that said one of said data packets is said last one of said data packets, performing said called extended function corresponding to said extended function identifier on the second processor.
  • 2. The method as claimed in claim 1, wherein the first processor includes a memory for storing arguments of extended functions and wherein:
  • said first entry point command includes an indication of said data packet count, said predetermined packet size and an indication of a location of the argument data within the memory.
  • 3. The method as claimed in claim 1, wherein:
  • the extended function identifier consists of a command number.
  • 4. A method of using a multiprocessor computer system having a first processor for calling extended functions, a second processor for executing extended functions and a communications buffer of a predetermined data size for communications between the first and second processors, said communications buffer implemented as a shared address space accessible by both the first and second processor, each extended function having at least one first argument specifying data that is greater in size than the predetermined data size of the communications buffer and at least one second argument specifying data required for performing that extended function that is smaller in size than the predetermined data size of the communications buffer, said method comprising the steps of:
  • calling an extended function from a main program running on the first processor;
  • dividing the first argument data corresponding to said called extended function into a plurality of data packets of predetermined packet size corresponding to said called extended function, said predetermined packet size permitting a plurality of said data packets to be simultaneously stored within the communications buffer;
  • executing a first communications routine running on the first processor via a first entry point command corresponding to said called extended function, the step of executing said first communications routine including
  • writing an extended function identifier and a data packet count corresponding to said called extended function into the communications buffer, said data packet count indicating a total number of data packets of said first argument data to be sent to the second processor for said called extended function,
  • writing the second argument data into the communications buffer,
  • determining if the second argument data has been read from the communications buffer,
  • sequentially (a) writing one of said data packets into the communications buffer, (b) determining if one of said data packets has been read from the communications buffer by the second processor, (c) writing another one of said data packets into the communications buffer if a number of said data packets written into the communications buffer minus a number of said data packets read from the communications buffer indicates free data space within the communications buffer greater than said predetermined packet size, until said plurality of data packets have been written into the communications buffer;
  • reading said extended function identifier and said data packet count from the communications buffer by the second processor;
  • executing a second communications routine running on the second processor, the step of executing said second communications routine including
  • reading the second argument data from the communications buffer,
  • indicating the second argument data has been read from the communications buffer,
  • sequentially (a) reading one of said data packets from the communications buffer, (b) indicating one of said data packets has been read from the communications buffer, and (c) determining whether said one of said data packets read from said communications buffer is a last one of said data packets for said called extended function by comparing a number of data packets read from said communications buffer with said data packet count;
  • if it is determined in said determining step that said one of said data packets is not said last one of said data packets, repeating said reading, indicating, and determining steps for another one of said data packets, and
  • if it is determined in said determining step that said one of said data packets is said last one of said data packets, performing said called extended function corresponding to said extended function identifier on the second processor.
  • 5. The method as claimed in claim 4, wherein the first processor includes a memory for storing arguments of extended functions and wherein:
  • said first entry point command includes an indication of said data packet count, said predetermined packet size and an indication of a location of the first argument data within the memory.
  • 6. The method as claimed in claim 4, wherein the first processor includes a memory for storing arguments of extended functions and wherein:
  • said first entry point command includes an indication of a number of said second arguments, and each second argument.
  • 7. The method as claimed in claim 4, wherein the first processor includes a memory for storing arguments of extended functions and wherein:
  • said first entry point command includes an indication of said data packet count, said predetermined packet size, an indication of a location of the first argument data within the memory, an indication of a number of said second arguments, and each second argument.
  • 8. The method as claimed in claim 4, wherein:
  • the extended function identifier consists of a command number.
  • 9. A method of using a multiprocessor computer system having a first processor for calling extended functions, a second processor for executing extended functions and a communications buffer of a predetermined data size for communications between the first and second processors, said communications buffer implemented as a shared address space accessible by both the first and second processor, each extended function being one of (1) a first type extended function having at least one argument specifying data that is greater in size than the predetermined data size of the communications buffer, and (2) a second type extended function having at least one first argument specifying data that is greater in size than the predetermined data size of the communications buffer and at least one second argument specifying data required for performing that extended function that is smaller in size than the predetermined data size of the communications buffer, said method comprising the steps of:
  • calling an extended function from a main program running on the first processor;
  • dividing the first argument data corresponding to said called extended function into a plurality of data packets of predetermined packet size corresponding to said called extended function, said predetermined packet size permitting a plurality of said data packets to be simultaneously stored within the communications buffer;
  • if said extended function is a first type extended function, executing a first communications routine running on the first processor via a first entry point command corresponding to said called extended function, the step of executing said first communications routine including
  • writing an extended function identifier and a data packet count corresponding to said called extended function into the communications buffer, said data packet count indicating a total number of data packets of said argument data to be sent to the second processor for said called extended function,
  • sequentially (a) writing one of said data packets into the communications buffer, (b) determining if one of said data packets has been read from the communications buffer by the second processor, (c) writing another one of said data packets into the communications buffer if a number of said data packets written into the communications buffer minus a number of said data packets read from the communications buffer indicates free data space within the communications buffer greater than said predetermined packet size, until said plurality of data packets have been written into the communications buffer;
  • if said extended function is a second type extended function, executing the first communications routine running on the first processor via a second entry point command corresponding to said called extended function, the step of executing said first communications routine including
  • writing an extended function identifier and a data packet count corresponding to said called extended function into the communications buffer, said data packet count indicating a total number of data packets of said first argument data to be sent to the second processor for said called extended function,
  • writing the second argument data into the communications buffer,
  • determining if the second argument data has been read from the communications buffer,
  • sequentially (a) writing one of said data packets into the communications buffer, (b) determining if one of said data packets has been read from the communications buffer by the second processor, (c) writing another one of said data packets into the communications buffer if the number of data packets written into the communications buffer minus the number of data packets read from the communications buffer indicates free data space within the communications buffer greater than said predetermined packet size, until said plurality of data packets have been written into the communications buffer;
  • reading said extended function identifier and said data packet count from the communications buffer by the second processor;
  • if said extended function identifier indicates said extended function is the first type extended function, executing a second communications routine running on the second processor, the step of executing said second communications routine including
  • sequentially (a) reading one of said data packets from the communications buffer, (b) indicating one of said data packets has been read from the communications buffer, and (c) determining whether said one of said data packets read from said communications buffer is a last one of said data packets for said called extended function by comparing a number of data packets read from said communications buffer with said data packet count;
  • if it is determined in said determining step that said one of said data packets is not said last one of said data packets, repeating said reading, indicating, and determining steps for another one of said data packets, and
  • if it is determined in said determining step that said one of said data packets is said last one of said data packets, performing said called extended function corresponding to said extended function identifier on the second processor;
  • if said extended function identifier indicates said extended function is the second type extended function, executing a second communications routine running on the second processor, the step of executing said second communications routine including
  • reading second argument data from the communications buffer,
  • indicating the second argument data has been read from the communications buffer,
  • sequentially (a) reading one of said data packets from the communications buffer, (b) indicating one of said data packets has been read from the communications buffer, and (c) determining whether said one of said data packets read from said communications buffer is a last one of said data packets for said called extended function by comparing a number of data packets read from said communications buffer with said data packet count;
  • if it is determined in said determining step that said one of said data packets is not said last one of said data packets, repeating said reading, indicating, and determining steps for another one of said data packets, and
  • if it is determined in said determining step that said one of said data packets is said last one of said data packets, performing said called extended function corresponding to said extended function identifier on the second processor.
  • 10. The method as claimed in claim 9, wherein the first processor includes a memory for storing arguments of extended functions and wherein:
  • said first entry point command includes an indication of a number of said plurality of packets of said data packet count, said predetermined packet size and an indication of a location of the argument data within the memory.
  • 11. The method as claimed in claim 9, wherein the first processor includes a memory for storing arguments of extended functions and wherein:
  • said first entry point command includes an indication of a number of said second arguments, and each second argument.
  • 12. The method as claimed in claim 9, wherein the first processor includes a memory for storing arguments of extended functions and wherein:
  • said first entry point command includes an indication of said data packet count said predetermined packet size, an indication of a location of the first argument data within the memory, an indication of a number of said second arguments, and each second argument.
  • 13. The method as claimed in claim 9, wherein:
  • the extended function identifier consists of a command number.
Parent Case Info

This application is a continuation of application Ser. No. 07/420,440, filed Oct. 12, 1989now abandoned.

US Referenced Citations (39)
Number Name Date Kind
4374428 Barnes Feb 1983
4414624 Summer, Jr. et al. Nov 1983
4445176 Burk et al. Apr 1984
4486854 Yuni Dec 1984
4500960 Babecki et al. Feb 1985
4530051 Johnson et al. Jul 1985
4539637 DeBruler Sep 1985
4564901 Tomlinson et al. Jan 1986
4567562 Fassbender Jan 1986
4646231 Green et al. Feb 1987
4649473 Hammer et al. Mar 1987
4727537 Nichols Feb 1988
4768150 Chang et al. Aug 1988
4777588 Case et al. Oct 1988
4815039 Tai et al. Mar 1989
4825354 Agrawal et al. Apr 1989
4829475 Ward et al. May 1989
4839866 Ward et al. Jun 1989
4849877 Bishop et al. Jul 1989
4851988 Trottier et al. Jul 1989
4864543 Ward et al. Sep 1989
4873625 Archer et al. Oct 1989
4882674 Quint et al. Nov 1989
4891788 Kreifels Jan 1990
4901231 Bishop et al. Feb 1990
4914570 Peacock Apr 1990
4920483 Pogue et al. Apr 1990
4933901 Tai et al. Jun 1990
4949255 Gerth et al. Aug 1990
5056003 Hammer et al. Oct 1991
5062040 Bishop et al. Oct 1991
5073852 Siegel et al. Dec 1991
5124909 Blakely et al. Jun 1992
5132964 Esaki Jul 1992
5146593 Brandle et al. Sep 1992
5159686 Chastain et al. Oct 1992
5210874 Karger May 1993
5218699 Brandle et al. Jun 1993
5261095 Crawford et al. Nov 1993
Non-Patent Literature Citations (5)
Entry
Birrell et al, "Implementing Remote Procedure Calls", ACM Trans. on Computer Systems, vol. 2, No. 1, Feb. 1984, pp. 39-58.
Spector, A., "Performing Remote Operations Efficiently on a Local Computer Network," Communications of the ACM, vol. 25, No. 4, pp. 246-260 (Apr. 1982).
Jackson, P., "Unix variant opens a path to managing multiprocessor systems," Electronics, pp. 118-124 (Jul. 28, 1983).
Hughes, R. P., "The Transparent Remote File System," pp. 306-317.
Noren, G., IBM RT PC SNA Access Method Guide and Reference, pp. 9-34 to 9-52 (Aug. 15, 1986).
Continuations (1)
Number Date Country
Parent 420440 Oct 1989