AUXILIARY MEMORY DEVICE

Abstract: A data transmitting/receiving system for exchanging data between a micropressor (1) and an auxiliary memory device (10) connected to the microprocessor. The system has a plurality of common RAMs (24,25) for transmission and receiving of the data. The state of use of each common RAMs is stored in memory means (26, 27)) so that the data transmission is made through the common RAM (24) or (25) which is not being used, in accordance with the signal from the memory means, thus reducing the waiting time for the data transmission.

Description: The present invention relates to an auxiliary memory device connected to a microprocessor, and in particular to the exchange of data between the two. Data transmission between a microprocessor and an external auxiliary memory device is conventionally performed by using a common random access memory (to be referred to as a common RAM hereinafter). Such a conventional system is shown by a block diagram of Fig. 1. Reference numeral 1 denotes a microprocessor (to be referred to as an MPU hereinafter) of a main device; and 2, an auxiliary memory device. The auxiliary memory device 2 has a data transmission/reception common RAM 4, data bus transceivers 5 and 6, and a memory medium 9 such as a magnetic disk. Reference numerals 7 and 8 denote buses, respectively. With the above arrangement, when data is transmitted or received, (1) the MPU 1 in the main device writes command data in the common RAM 4, (2) the MPU 3 in the auxiliary memory device reads command data from the common RAM 4, (3) the MPU 3 writes an execution result in the common RAM 4, and (4) the MPU 1 reads the execution result from the common RAM 4. Among operations (1) to (4), operations (1) and (2) or operations (3) and (4) are often simultaneously performed. In this case, when the MPUs 1 and 3 simultaneously access the common RAM 4, one of the MPUs is halted while the other MPU is being operated according to the conventional system. For example, access from the MPU 1 is performed while the operation of the MPU 3 is halted. When the operation of the MPU 1 is completed, the operation of the MPU 3 is started. When one MPU must read or write access the common RAM 4 at high speed, this MPU must exclusively use the common RAM. For example, when the MPU 3 in the auxiliary memory device 2 exclusively uses the common RAM 4 for direct memory access transfer, the MPU 1 in the main device must wait for a long period of time when it accesses the common RAM 4. As a result, the MPU 1 cannot perform other operations. In order to allow access of the common RAM 4 by the MPU 1 even during this period, data transfer from the MPU 3 is delayed, resulting in inconvenience. A paper by T.W.Starnes in Electro/81 Conference Record, Vol.6, 7-9 April 1981, pages 1-8, discloses an auxiliary memory device having features corresponding to those of the preamble of accompanying claim 1. A common memory means is constituted as a dual-port RAM provided as a separate unit between the auxiliary device and a host processor. According to the present invention, there is provided an auxiliary memory device responsive to commands from an external microprocessor, the auxiliary memory device comprising a processing unit having access to a common memory means shared with the external microprocessor and operable to process commands from the external microprocessor; characterised in that the auxiliary memory device further comprises: said common memory means, in the form of a plurality of common random access memories each operable to receive and store commands from the external microprocessor and results of processing by the processing unit; a plurality of registers corresponding respectively to the common random access memories and accessible in common by the processing unit and the external microprocessor, for indicating the availability of the common random access memories ; and a plurality of priority order control circuits accessible in common by, and operable to determine a priority between, the processing unit and the external microprocessor in the event that both attempt simultaneously to access the same one of the common random access memories, said determination being made in favour of whichever of the processing unit and external microprocessor has the higher operation speed; wherein, in use: when the external microprocessor sends a command to the auxiliary memory device, the external microprocessor searches the registers to find an available one of the common random access memories and accesses that memory to store the command therein; when the processing unit detects said access by the external microprocessor, it sets the respective one of the registers to indicate non-availability of that common random access memory; and when the processing unit completes processing of said command stored in that common random access memory, it resets said respective register to indicate that the memory is again available. Thus, an embodiment of the present invention can provide an auxiliary memory device having a plurality of common RAMs to decrease a wait time and to transmit data to or receive it from an auxiliary memory device at high speed. An embodiment of the present invention can also provide an auxiliary memory device, wherein when a main MPU and an auxiliary memory MPU simultaneously access the same common RAM, one of the main and auxiliary memory MPUs has a priority over the other. Since a plurality of common RAMs are provided, the main device microprocessor can exchange data with the auxiliary memory device at high speed. At the same time, continuous processing can be performed without interrupting the operation of the auxiliary memory device and the main device. Even if the common RAM is simultaneously accessed by the main microprocessor and the auxiliary memory device microprocessor, the high-speed operation side is selected by the priority order control circuits, thereby achieving high efficiency. Reference is made, by way of example, to the accompanying drawings in which:- Fig. 1 is a block diagram showing a conventional system for exchanging data between the auxiliary memory device and the main device; Fig. 2 is a block diagram showing a system for exchanging data between a main device and an auxiliary memory device according to an embodiment of the present invention; Fig. 3A is a flow chart for explaining the operation of the main device of the system shown in Fig. 2; and Fig.3B is a flow chart for explaining the operation of the auxiliary memory device of the system shown in Fig. 2. An embodiment of the present invention will now be described in detail with reference to Figs. 2, 3A and 3B. Fig. 2 is a block diagram showing an embodiment of the present invention. Reference numeral 1 denotes an MPU of a main device used in a control device or the like; and 10, an auxiliary memory device as an embodiment of the present invention, connected to the MPU of the main device. Reference numeral 11 denotes a control MPU of the auxiliary memory device 10; and 12, a memory medium such as a magnetic disk in the auxiliary memory device 10. Reference numerals 24 and 25 denote first and second common RAMs, respectively; 13 and 14, data bus transceivers, respectively; and 26 and 27, memory means for storing data representing that the first or second common RAM 24 or 25 is occupied by the MPU 11. The memory means 26 and 27 are referred to as first and second latches 26 and 27 hereinafter. Reference numerals 17 to 20 denote data bus buffers, respectively. Reference numerals 21 and 22 denote priority order control circuits, respectively. When the MPUs 1 and 11 simultaneously access the first or second common RAM, the priority order control circuits 21 and 22 control priority order. Reference numerals 7 and 23 denote buses, respectively. With this arrangement, the auxiliary memory device 10 performs high-speed operation. Data exchange operation between the main device MPU 1 and the auxiliary memory device 10 will be described with reference to Figs. 3A and 3B. Fig. 3A shows the operation of the MPU 1 of the main device. When the MPU 1 supplies a command to the external auxiliary memory device 10, e.g., when the MPU 1 generates a command to fetch a file F1, the MPU 1 checks through the data bus buffer 17 whether or not the first latch 26 is set (step 101). In a manner to be described later, since the first latch 26 is held set while the MPU 11 in the auxiliary memory device 10 accesses the first common RAM 24, the MPU 1 determines whether or not the first common RAM 24 is occupied by the MPU 11 in accordance with the state of the first latch 26. If NO in step 101, i.e., when the first common RAM 24 is not occupied by the MPU 11, the command data is written in the first common RAM 24 (step 102). However, if the MPU 1 determines that the first latch 26 is set, the MPU 1 then determines through the data bus buffer 19 whether or not the second latch 27 is set (step 103). If NO in step 103, the command is written in the second common RAM 25 (step 104). When the second latch 27 is also set, it indicates that the second common RAM 25 is also being accessed by the MPU 11. In this case, the MPU 1 performs other processing (step 105). The above processing has been described for writing command data from the MPU 1 to the first and second common RAMs 24 and 25. In the read access of the first and second common RAMs 24 and 25, the above operation can be applied. More specifically, the operating state of the first or second latch 26 or 27 is checked, and the data is fetched from one of the first and second common RAMs 24 and 25 which is available. The MPU 1 repeats the above operation every time the auxiliary memory device is accessed. The MPU 11 in the auxiliary memory device 10 performs the sequence shown in Fig. 3B. The MPU 11 checks through the data bus transceivers 14 and 16 whether or not the command is supplied from the MPU 1 to the first or second common RAM 24 or 25 (step 201). When the MPU 11 determines that command data is received by the first or second common RAM 24 or 25, the first or second latch 26 or 27 which corresponds to the first or second common RAM 24 or 25 receiving the command data is set. For example, when the first common RAM 24 receives the command data, the first latch 26 corresponding to the first common RAM 24 is set through the data bus buffer 18 (step 202). The operation is performed by the command written in the first or second common RAM 24 or 25 (the first common RAM 24 in this case). The operation result is written in the corresponding common RAM (the common RAM which has received the command; the first common RAM 24 in this case) (step 203). The setting state of the first or second latch 26 or 27 which corresponds to this common RAM is cancelled (step 204). The MPU 11 signals that the setting of the first or second common RAM 24 or 25 is cancelled. The MPU 11 repeatedly performs operations in steps 201 to 204. In this manner, when the MPU 11 in the auxiliary memory device 10 accesses the first or second common RAM 24 or 25, the first or second latch 26 or 27 corresponding to the first or second common RAM 24 or 25 is set when it occupies the corresponding common RAM. Therefore, the MPU 1 in the main device can use the common RAM which is not occupied. Unlike in the conventional system, waiting time is decreased, and the MPU 11 in the auxiliary memory device 10 can be operated at high speed. The priority order control circuits 21 and 22 determine access priority order when the MPUs 1 and 11 simultaneously access the first or second common RAM 24 or 25. In this embodiment, the MPU 11 in the auxiliary memory device 10 has a priority over the MPU 1 since the auxiliary memory device 10 is operated at high speed. In the above embodiment, two common RAMs are provided. However, three or more common RAMs can be arranged.

Claims: An auxiliary memory device (10) responsive to commands from an external microprocessor (1), the auxiliary memory device comprising a processing unit (11) having access to a common memory means shared with the external microprocessor (1), the auxiliary memory device (10) operable to process commands from the external microprocessor (1); characterised in that the auxiliary memory device further comprises: said common memory means, in the form of a plurality of common random access memories (24,25) each operable to receive and store commands from the external microprocessor (1) and results of processing by the processing unit (11); a plurality of registers (26,27) corresponding respectively to the common random access memories (24,25) and accessible in common by the processing unit (11) and the external microprocessor (1), for indicating the availability of the common random access memories (24,25); and a plurality of priority order control circuits (21,22) accessible in common by, and operable to determine a priority between, the processing unit (11) and the external microprocessor (1) in the event that both attempt simultaneously to access the same one of the common random access memories (24,25), said determination being made in favour of whichever of the processing unit (11) and external microprocessor (1) has the higher operation speed; wherein, in use: when the external microprocessor (1) sends a command to the auxiliary memory device (10), the external microprocessor searches the registers (26,27) to find an available one of the common random access memories and accesses that memory to store the command therein; when the processing unit (11) detects said access by the external microprocessor (1), it sets the respective one of the registers (26,27) to indicate non-availability of that common random access memory; and when the processing unit (11) completes processing of said command stored in that common random access memory, it resets said respective register to indicate that the memory is again available. An auxiliary memory device as claimed in claim 1, further comprising respective sets of data bus transceivers (13,14;15,16) provided for each common random access memory (24,25), each set of transceivers including a first transceiver (13;15) connected between the respective memory and a data bus for access by the external microprocessor (1), and a second transceiver (14;16) connected between the memory and the processing unit (11). An auxiliary memory device as claimed in claim 2, wherein the data bus transceivers of each set are connected to a respective one of the priority order control circuits (21,22), whereby access to the common random access memories can be controlled by the priority order control circuits (21,22). An auxiliary memory device as claimed in claim 3, wherein, in use, the processing unit (11) uses the data bus transceivers (14;16) to which it is connected to detect access by the external microprocessor (1) to one of the common random access memories. An auxiliary memory device as claimed in claim 1, 2, 3 or 4, further comprising respective sets of data bus buffers (17,18;19,20) provided for each of said plurality of registers (26,27), each set of buffers including a first buffer (17;19) connected between the respective register and a data bus for access by the external microprocessor (1), and a second buffer (18,20) connected between the register and the processing unit (11). An auxiliary memory device as claimed in any preceding claim, wherein, in use, after processing a command but prior to resetting one of said registers (26,27) to indicate availability of the common random access memory (24,25) in which the command was stored, the processing unit (11) writes a processing result into that common random access memory. An auxiliary memory device as claimed in any preceding claim, further comprising a magnetic disk unit (12) connected to the processing unit (11).

Inventors: HATTORI, SEIICHI, KANDA, KUNIO
Applicants: FANUC LTD.
Application year: 1985
Main classification: G06F15
IPC codes: G06F13, G06F12, G06F15