DIRECT MEMORY ACCESS CONTROLLER

Abstract: In a data processing system having a plurality of peripheral devices (16) and a main memory (12), a direct memory access controller controls the transfer of data between the main memory (12) and the peripheral devices (16). The controller includes a local memory (38) connected to the peripheral devices (16) for storing data writtren to and read from the peripheral devices (16), a sequencer (30) for controlling the transfer of data between the main memory (12) and the local memory (38), a local address register (34) connected to the sequencer (30) for providing the local memory address for memory operations of the local memory (38), a system address register (32) connected to the sequencer (30) for providing the main memory address for memory operations of the main memory (12) and a data register (56, 58) for holding data transferred between the main memory (12) and the local memory (38). The sequencer (30) includes means for generating control signals for the main memory (12), the local memory (38) and the data register (56, 58) in control cycles such that, in a single control cycle, a first word is read out of the register (56, 58) and a second word is written into the register (56, 58), whereby n words can be transferred in n+1 control cycles.

Description: DIRECT MEMORY ACCESS CONTROLLER Technical Field This invention relates to a direct memory access controller for a data processing system, of the kind including a plurality of peripheral devices and a main memory, said controller including a local memory adapted to store data transferred between said peripheral devices and said main memory, sequencer means adapted to control the transfer of data between said main memory and said local memory and data register means adapted to hold data transferred between said main memory and said local memory. Background Art A direct memory access controller of the kind specified is known from U.S. Patent No. 4,371,932. The known I/O controller includes a microprocessor, a control unit and a dual port storage unit, one port of which is coupled to the host processor I/O channel bus and the other port of which is coupled to the microprocessor bus. An interleaving mechanism enables concurrent performance of two different modes of data transfer between the processor and the I/O controller. Disclosure of the Invention It is an object of the present invention to provide a direct memory access controller of the kind specified, having an improved efficiency for data transfer. According to the present invention, there is provided a direct memory access controller of the kind specified, characterized by local address register means coupled to said sequencer means and adapted to provide local memory addresses for memory operations of said local memory, system address register means coupled to said sequencer means and adapted to provide main memory addresses for memory operations of said main memory, and in that said sequencer means includes control means adapted to generate control signals for said main memory, said local memory and said data register means in successive control cycles, whereby, in a single control cycle, a first word is read out of said register means and a second word is written into said register means. It will be appreciated that in a direct memory access controller according to the invention, highly efficient data transfer is achieved since n words may be transferred in as few as n+1 cycles. Brief Description of the Drawings One embodiment of the invention will now be described by way of example, with reference to the accompanying drawings in which: Fig. 1 is a block diagram of a data processing system including a DMA controller of the present invention; Fig. 2 is a map showing the relationship of Figs. 2A-2C, which, when taken together, presents a block diagram of a processing element of the system of Fig. 1; Fig. 3 is a block diagram of a clock circuit of the DMA controller of Fig. 1; Fig. 4 is a block diagram of an incoming mail box and an outgoing mail box of the DMA controller of Fig. 1; Fig. 5 is a block diagram of a control circuit for the mail boxes of Fig. 4; Fig. 6 is a block diagram of an input/output decoder of the DMA decoder of Fig. 1; Fig. 7 is a map showing the relationship of Figs. 7A-7C, which, when taken together, present a •block diagram of a system address register of the DMA decoder of Fig. 1; Fig. 8 is a map showing the relationship of Figs. 8A-8B, which, when taken together, present a block diagram of a local address register of the DMA converter of Fig. 1; Fig. 9 is a block diagram of a DMA word count register of the DMA controller of Fig. 1; Fig. 10 is a block diagram of a DMA sequence buffer circuit of the DMA controller of Fig. 1; Fig. 11 is a block diagram of a PROM address counter circuit of the DMA controller of Fig. 1; Fig. 12 is a block diagram of a bus requester circuit of the DMA controller of Fig. 1; Fig. 13 is a map showing the relationship of Figs. 13A-13B, which, when taken together, present a block diagram of timing generator circuit of the DMA controller of Fig. 1; and Fig. 14 is a timing diagram showing the relationship of memory control signals during a data transfer operation of the DMA controller of Fig. 1. Best Mode for Carrying Out the Invention Fig. 1 is a block diagram of a system which is usable with the present invention, and includes a central processing unit (CPU) 10, a main memory 12, a system bus 14, a plurality of peripheral devices 16 designated PEl through PE32, and a controller board 18 for controlling the exchange of data between the peripheral devices 16 and the main system bus 14 as will be discussed. An address line 20 is provided between the system bus 14 and the main memory 12 for passing addresses to the main memory 12 at which a memory operation is to take place. A bidirectional data bus 22 is provided to exchange data between the main memory 12 and the system bus 14. A control signal bus 24 is likewise provided between the system bus 14 and the main memory 12 for providing control signals to the main memory 12 for the memory operation which is to take place. As will be discussed, memory operations in the main memory 12 may be ordered by appropriate control signals over control signal bus 24 which issue either from the CPU 10 or the controller board 18. The controller board 18 includes a microprocessor 26, and a read only memory (ROM) 28 which contains programming for the operation of the microprocessor 26. The controller board 18 also includes a direct memory access (DMA) sequencer 30, a system address register 32, a local address register 34, a DMA word count register 36, and a local memory 38. Communication between the microprocessor 26 and the elements of the controller board 18 is provided by a local bus 40. As will be explained, the microprocessor 26 loads a beginning system address in the system address register 32, a beginning local address in the local address register 34, and a word count of the words to be transferred between the local memory 38 and the main memory 12 in the DMA word count register 36. The microprocessor 26 then instructs the DMA sequencer 30 to begin operation and indicates in which direction the data is to be transferred. The DMA sequencer 30 then issues control instructions over bus 42 to the system bus 14 for instructing the memory operations of the main memory 12, and instructions over bus 44 to the local bus 40 for controlling the local memory 38. If, for instance, the data transfer is to be for a specified number of words from the local memory 38 to the main memory 12, the instructions over bus 42 would include a primary memory request signal (PMRQ*), and a primary memory read/write signal (PR/W*) for indicating that a write operation is to take place. A primary data strobe signal (PDS*) would be issued at the proper time to strobe the main memory 12 to complete the operation. Also, a board memory request signal (BMRQ*) , a board memory read/write signal (BR/W*) for indicating that a read is to take place from the local memory, and a board memory data strobe signal (BDS*), would all be sent over bus 44 to the local bus 40, in the proper sequence, to read the desired data from the local memory 38. As will be explained, a word of data is read from the local memory 38 at the address supplied by the local address register 34, and passed to the main memory 12 to be written at the address contained in the system address register 32. The DMA sequencer 30 then issues a signal (INRC) over conductor 46 to the DMA word count register 38 to decrement the word count therein, a signal (INCRl) over conductor 48 to the local address register 34 to increase the local address contained therein, and a signal (INCR2) over conductor 50 to the system address register 32 to increase the address contained therein. If the word count in the DMA word count register 36 has been reduced to zero, a DMAEND* signal is sent over conductor 52 from the word count register 36 to the DMA sequencer 30 to indicate that the data transfer is complete. Otherwise, another word is transferred from the local memory 38 at the address now contained in local address register 34 to the main memory 12 at the address now located in system address register 32. A buffer 54 is provided for buffering data coming into or going out of the controller board 18 for transfer over the system bus 14. An incoming data register 56 for data coming into the controller board 18 from the system bus 14 is provided, and an outgoing data register 58 is provided for data going out of the controller board 18 to the system bus 14. An incoming mailbox 60 is provided for messages coming from the CPU 10 to the microprocessor 26, and an outgoing mailbox 62 is provided for messages coming from the microprocessor 26 to the CPU 10. Also, an incoming interrupt register 64 is provided for supplying various interrupt signals to elements of the controller board 18, and an outgoing interrupt register 66 is provided for sending various interrupt messages from the controller board 18 to the CPU 10. A peripheral bus buffer 67 is included in the controller board 18 and is connected between a peripheral bus 68 connected to all of the peripheral devices, PE1-PE32 in the present embodiment, and the local bus 40. A controller board clock 69 is included for controlling the operation of the various elements of the controller board 18. Fig. 2A-2C, when joined as shown in the map of Fig. 2, is a block diagram of the microprocessor 26 of Fig. 1, and includes a microprocessor chip 70, a microprocessor bus 72, and a plurality of tri-state devices 74-78 connected between the microprocessor bus 72 and the local bus 40 of Fig. 1. Tri-state devices 74, 75 and 76, which are 74F373 devices available from Fairchild, control address bits BA0-BA22 transmitted between the microprocessor bus 72 and the address portion of the local bus 40. Tri-state devices 77 and 78, which are 74ALS245 devices available from Texas Instruments, control the transmission of board address bits BD0-BD15 between the microprocessor bus 72 and the data portion of the local bus 40. A microprocessor clock signal (PCLK) is inputted into a push-pull amplifier 80 formed of transistors 81 and 83, whose output is connected to the clock input, pin 35, of the microprocessor chip 70. The microprocessor chip of the disclosed embodiment is a Z8001B available from Zilog. The frequency of the clock pulses of clock signal PCLK is 8 megahertz. As will be explained, requests for the microprocessor bus are inputted to pin 27 of the microprocessor chip 70 by a MBUSRQ* signal. When the microprocessor chip 70 completes its current task after the receipt of a MBUSRQ* signal on its pin 27, the microprocessor chip 70 outputs a microprocessor bus acknowledge (MBUSAK*) signal on its output pin 29. The MBUSAK* signal is inverted by inverter 82, whose output is inputted into the tri-state devices 74-78 such that the microprocessor chip 70 provides data bits on local bus 40 when the MBUSAK* signal is high. The inverted MBUSAK* signal is also inputted into the control terminal* pin 19 of a buffer 84. Buffer 84 is an 74S244 device available from Texas Instrument. Thus it will be understood, that when the MBUSAK* signal is high, it will be inverted by inverter 82 and inputted at pin 19 to buffer 84 to transmit the microprocessor data strobe signal (MDS*) as the board data strobe signal (BDS*). Also when the MBUSAK* signal is high, the microprocessor read/write (MR/W*) signal will be transmitted as BR/W*, the microprocessor memory request (MMRQ*) will be transmitted as the BMRQ* signal, and the microprocessor bus write (MB/W*) signal will be transmitted as the board bus write (BB/W*) signal. The BDS* signal is inverted by inverter 86 to give the BDS signal. The BR/W* signal is a buffered Read/Write control signal wherein read is "1" and write is "0". The BB/W* signal is a buffered byte/word signal wherein byte is "1" and word is "0". The microprocessor address strobe (MAS*) signal is inverted by an inverter 88 to give the board address strobe signal (BAS) . The BAS signal is inputted to tri-state devices 74-76 to control address signals outputted by the microprocessor chip on microprocessor bus 72 to the address portion of the local bus 40. The BDS signal is inputted to one input of a NAND gate 90, and the BR/W*signal is inverted by inverter 92 and inputted into the other input of NAND gate 90. The output of NAND gate 90 is connected to the tri-state devices 77 and 78 for controlling the output from the microprocessor bus 72 to the data portion of the local bus 40. Even though the ROM 28 of Fig. 1 is shown connected directly to the microprocessor 26, it will be understood that the ROM 28 is in fact connected to the local bus 40. Addresses to the ROM 28 are controlled, as previously explained, by the tri-state devices 74-76 of Fig. 2B to address the ROM 28, and the instruction at that address is passed from the ROM 28 back to the microprocessor 26 through the tri-state devices 77 and 78. In a manner well understood by those skilled in the art, instructions are thus passed from the ROM 28 to the microprocessor 26 for execution in accordance with a program stored in the ROM 28. The other inputs and the outputs of the microprocessor chip 70, as labeled in Fig. 2A, are well understood in the art and will not be further explained herein. Fig. 3 is a block diagram of the clock circuit 69 of Fig. 1. A 16 megahertz oscillator 94 is connected to the dynamic clock input of a D type flip- flop 96 which acts as a divide-by-two circuit, giving a 8 megahertz output. Flip-flop 96 is an 74S74 device available from Texas Instruments. The one output Q of the flip-flop 96 is connected to an inverter 98 for supplying the processor clock (PCLK) signal, while the zero output Q/ of flip-flop 96 is connected to an inverter 100 for supplying the board clock (BCLK) signal. It will be understood that the BCLK signal from inverter 100 will be the complement of the PCLK signal from inverter 98. Fig. 4 is a block diagram of the data registers 56 and 58 of Fig. 1. Incoming data register 56 includes two tri-state devices 102 and 104 which pass primary data bits (PD0-PD15) from the system bus 14 of Fig. 1 to the board data bits (BD0-BD15) of the local bus 40 on the controller board 18. The primary data bits PD0-PD15 are loaded into the tri-state devices 102 and 104 by the signal STBM*, and the board data bits BD0-BD15 are placed on the local bus 40 by the signal ENC*. Outgoing data register 58 includes tri-state devices 106 and 108 which receive board data bits BD0-BD15 from the local bus 40, and places them as primary data bits PD0-PD15 on system bus 14. The board data bits BD0-BD15 are placed in the tri-state devices 106 and 108 by the signal STBC*, and the data bits are placed from the tri-state devices 106 and 108 on the system bus 14 by the signal ENM*. Tri-state devices 102, 104, 106 and 108 are 74ALS374 devices available from Texas Instruments. Fig. 5 is a schematic diagram of a timing circuit for the data registers 56 and 58 of Fig. 4. A timing signal 1ZZ is inputted into an inverter 110, whose output in outputted into one input of a NAND gate 112. The enable signal ENC* is inputted into the other input of NAND gate 112, whose output is the STBC* signal discussed in connection with tri-state devices 106 and 108 of Fig. 4. The timing signal 1ZZ and the enable signal ENC* come from the DMA sequencer 30 of Fig. 1, as will be discussed. A timing signal 2ZZ is inputted into an inverter 114, whose output is connected to one input of a NAND gate 116. The other input of NAND gate 116 receives the enable signal ENM*, and its output provides the STBM* signal discussed in connection with tri-state devices 102 and 104 of Fig. 4. The timing signal 2ZZ and the enable signal ENM* also come from the DMA sequencer 30. Messages between the microprocessor 26 and the CPU 10 are transmitted through the mailbox 60 and 62. The mailboxes 60 and 62 are used in a well-known manner to transmit messages, such as the starting system address and the number of words to be transmitted by the microprocessor from the local memory 38 to the main memory 12, or for identifying one of the peripheral devices 16 which is to transmit data to or from the main memory 12. The microprocessor 26 regularly interrogates its mailbox 60 to see if any messages for it have been received. After an exchange of messages through the mailboxes 60 and 62, the microprocessor 26 is ready to initiate the transfer of data between the local memory 38 and the main memory 12. Fig. 6 is a block diagram of an input/output (I/O) decoding circuit for decoding instructions from the microprocessor chip 70 of Fig. 2 which address various elements of the processor board 18. The address bits BA0-BA22 of the address portion of the local bus 40 (see Fig. 2) are decoded by an appropriate decoder (not shown) to determine if the microprocessor chip 70 has issued an I/O instruction. When an I/O instruction is detected, the ONBD* signal of Fig. 6 is activated to enable a one-of-eight decoder 114, which is an 74LS138 device available from Texas Instruments. The one-of-eight decoder 114 decodes the address bits BA1-BA3 to address one of the elements of the controller board 18. If the address is "0", the lower portion of the system address register 32 of Fig. 1 is selected by the MARL* signal. If the address is "2(H) π the higher portion of the system address register 32 is selected by the MARH* signal. An address of "4(H) " selects the lower portion of the local address register 34 of Fig. 1 by the CARL* signal. An address of "6(H) n selects the higher portion of the local address register 34 by the CARH* signal. An address of "8(H) " selects the DMA word count register 36 of Fig. 1 with the DMACNT* signal. An address of "A(H) n addresses the DMA sequencer 30 by the STDMA* signal. Figs. 7A-7C, joined together as shown in the map of Fig. 7, is a block diagram of the system address register 32 of Fig. 1, and includes a plurality of counter chips 116 connected to form a 22 bit counter circuit. The inputs of each of the counter chips 116 are connected to four bits respectively of the data portion of the local bus 40 of Fig. 1. The outputs of each of the counter chips 116 are connected to four bits respectively of the address portion of the system bus 14 of Fig. 1. An I/ODM signal from the DMA sequencer decoder, to be discussed, is connected to one of the counter chips 116 for perform I/O transfers with peripheral devices on the system bus 14, not a part of the present invention. The signal MARL* is inputted into the PE input, pin 11, of the lower four counter chips 116. The MARH* signal is inputted to the PE input, pin 11, of the upper two counter chips 116. The MARL* and BDS* signals are inputted into a negative AND gate 120 whose output is connected to one input of a negative OR gate 122. Also inputted into the negative OR gate 122, is the INCR2 signal. The output of the negative OR gate 122 is connected to the dynamic input, pin 2, of the lower four counter chips 116. The MARH* and BDS* signals are inputted into a negative AND gate 124, whose output is inputted to a negative OR gate 126 with the INCR2 signal. The output of the negative OR gate 126 is inputted to the dynamic input, pin 2, of the upper two counter chips 116. A bus acknowledge (BAK) signal is inverted by inverter 128 whose output (BAK*) is inputted into the OE inputs, pin 17, of all of the counter chips 116 of the system address register 32. It will be understood that when the BAK* signal is active, the outputs of counter chips 116 of the system address register 32 will be enabled. When the MARL* and BDS* signals are active, the lower bits of the system address will be loaded from the local bus into the lower four counter chips 116, and that when MARH* and BDS* signals are active, the upper address bits will be loaded from the local bus 40 into the upper two counter chips 116 of the system address register 32. When the MARL* signal is active, the address and the system address register 32 will be loaded from the lower portion of the address counter chips 116 onto the system bus 14. Also, when the MARH* signal is active, the upper bits of the address in the system address register 32 will be loaded from the upper counter chips 116 onto the system bus 14. As previously explained in connection with Fig. 1, each time the INCR2 signal is made active, the count in the system address register 32 will be increased such that the next higher address will appear in the system address register 32. A resistor R30 has one end connected to a +5 volt source, and the other end connected to pins 8 and 9 of the counter chips 116 along with a pull up network PU1 to maintain a voltage on pins 8 and 9. Figs. 8A and 8B, joined together as shown-in the map of Fig. 8, is a block diagram of the local address register 34 of Fig. 1, and includes a plurality of counter chips 130. The CARL* signal is inputted into the PE inputs, pin 11, of the lower four counter chips 130 and the CARH* signal is inputted into the PE inputs, pin 11, of the upper two counter chips 130 of the local address register 34. The CARL* and BDS* signals are inputted into a negative AND gate 132, whose output is inputted, along with the INCR1 signal, into a negative OR gate 134. The output of the negative OR gate 134 is inputted into the dynamic clock terminal, pin 2, of the lower four counter chips 130 of the local address register 34. The CARH* and BDS* signals are inputted into a negative AND gate 136 whose output is inputted, along with the INCR1 signal, into a negative OR gate 138. The output of the negative OR gate 138 is inputted into the dynamic clock terminal, pin 2, of the upper two counter chips 130, it will thus be understood that when the BAK* signal is active, all of the counter chips 130 of the local address register 34 will be enabled. When the CARL* and BDS* signals are active, the lower bits of the local address will be loaded from the data portion of the local bus 40 into the lower four counter chips 130. Similarly, when the CARH* and BDS* signals are active, the upper bits of the local address will be loaded into the upper two counter chips 130 from the data portion of the local bus 40. When the CARL* signal and the CARH* signal are active, the lower bits and the upper bits respectively will be loaded from the counter chips 130 of the local address register 34 onto the address portion of the local bus 40. Each time the INCR1 signal is made active, the address stored in the counter chips 130 of the local address register 34 will be incremented such that the next address will appear in the local address register 34. Counter chips 116 of Figs. 7A-7C and counter chips 130 of Figs. 8A and 8B are 74ALS569 devices available from Texas Instruments. A resistor R31 has one end connected to a +5 volt source, and its other end is connected to pins 1, 8 and 9 of the counter chips 130, along with a pull up network PU2 to maintain a voltage on pins 1, 8 and 9. Fig. 9 is a block diagram of the DMA word count register 36 of Fig. 1, and includes a plurality of counter chips 140, which are 74ALS169 devices available from Texas Instruments. The DMACNT* signal is connected to the PE input, pin 9, of each of the counter chips 140. The data bits BD0-BD15 of the local bus 40 are inputted into their respective data terminals, pins 3, 4, 5 and 6, of the counter chips 140. The DMACNT* and BDS* signals are inputted into a negative AND gate 142, whose output is inputted, along with the INRC signal, into the negative OR gate 144. The output of the negative OR gate is inputted to the dynamic clock terminal, pin 2, of each of the counter chips 140. The output of the negative AND gate 142 is also inputted into the set terminal, pin 10, of a D type 74LS74 flip-flop 146 available from Texas Instruments. The D input, pin 12, of the flip-flop 146 is connected to the terminal count output, pin 15, of the highest counter chip 140. The BCLK and BAK signals are inputted into an AND gate 148, whose output is inputted into the dynamic clock terminal of the flip-flop 146. The one output, pin 9, of the flip-flop 146 supplies the DMAEND* signal, and the zero output, pin 8, of the flip-flop 146 supplies a DMAOVER* signal. It will be understood that the DMAOVER* signal is the complement of the DMAEND* signal. It will also be understood that.when the DMACNT* and BDS* signals are active, the counter chips 140 will accept the count on the data portion of the local bus 40, and will set the flip-flop 146. Each receipt of an active INRC pulse by negative OR gate 144 will cause the counter chips 140 to decrement the count in the DMA word count circuit 36 by 1. When the count in the DMA word count register 36 reaches zero, the state of the terminal count output on pin 15 of the upper most counter chip 140 will change, causing the DMAEND* and the DMAOVER* signals from flip-flop 146 to change upon the simultaneous arrival of the BCLK and BAK* signals at AND gate 148. Fig. 10 is a block diagram of a DMA sequencer buffer circuit which is part of the DMA sequencer * circuit 30 of Fig. 1, and includes a latch circuit 150 whose inputs are connected to the BD0-BD5 bits of the data portion of the local bus 40. Latch circuit 150 is an 74LS174 device available from Texas Instruments. The dynamic clock terminal, pin 9, of the latch 150 is connected to the output of the negative AND gate 152 whose inputs are the STDMA* and BDS* signals. Thus, when both STDMA* and BDS* signals are active, the BD0- BD5 bits will be latched into latch circuit 150. BDO supplies a DIR signal, BD2 supplies the I/O DM signal, and BD5 supplies a DMAENI signal. The BD1 signal is not used in the present embodiment. The DMAENI signal is inverted by an inverter 154, whose output is wire ORed with the one output of the flip-flop 146 of Fig. 9 which provides the DMAEND* signal. The outputs of the devices which are connected to the DMAEND* signal are all open collector type devices, such that when the output of either the inverter 154 or the one output of the flip-flop 146 goes to ground, all of the connected devices are pulled to ground. A reset signal (IRESET*) is inputted into one input of a negative OR gate 156, whose other input receives the DMAEND* signal. The output of negative OR gate 156 is connected to the clear terminal, pin 1, of the latch circuit 150. The IRESET* signal comes from the reset output, pin 16, of the microprocessor 70 of Fig. 2. Fig. 11 is a block diagram of a PROM address counter of the DMA sequencer 30 of- Fig. 1, and includes a pair of counter chips 160, which are 74F161 devices available from Fairchild. The output of the counter chips 160 provide address bits A0-A5 which are inputted into the address terminals of a programmable read only memory (PROM) for accessing a timing program stored therein, to be discussed. When the DMA sequencer 30 requests the local bus, a bus acknowledge (BAKC*) signal is returned to indicate that the local bus 40 has been surrendered. Similarly, when the DMA sequencer 30 requests the system bus, a bus acknowledge (BAKM*) signal is returned to indicate that the system bus 14 has been surrendered. The BAKC* and BAKM* signals are inputted into a NAND gate 162 and a NOR gate 164. The output of the NOR gate 164 is the BAK signal previously discussed. The output of the NAND gate 162 is connected the MR terminal, pin 1, of each of the counter chips 160. The BAK signal from NOR gate 164 is inputted to the CEP terminal, pin 7, and the CET terminal, pin 10, of the lower chip 160. The board clock BCLK signal is inputted into the dynamic clock terminals, pin 2, of the counter chips 160. It will be understood that when the BAKC* and BAKM* signals indicate that the local and system buses have been turned over to the DMA sequencer 30, the output of NAND gate 162 will reset the counter chip 160 back to zero. The output of NOR gate 164 will enable the counter chips 160 to start counting each of the board clock BCLK signals, thus incrementing from zero, the count on address bits A0-A5. The address bits A0-A5 steps through the program stored in a programmable read only memory (PROM) , to be discussed, for timing the DMA sequencer 30. Fig. 12 is a block diagram for a bus requester circuit in the DMA sequencer 30 of Fig. 1. The bus requester circuit of Fig. 12 interrogates the various request signals, and based on the decoding of the signals, issues the microprocessor request (MBUSRQ*) signal discussed in connection with Fig. 2, and a CPU request (BUSRQ*) signal which is transmitted to the CPU 10 of Fig. 1. The bus requester circuit includes a programmable array logic chip 166 which is a 16L8A chip available from Monolithic Memories of Santa Clara, California. Signals input into the programmable array logic chip 166 are a DMA request (DMAR*) signal generated by the DMA timing generator to be discussed, a peripheral bus request (EBUSRQ*) signal generated by peripheral devices on the peripheral bus 68, the mentioned microprocessor request (MBUSRQ*) signal, the discussed CPU request (BUSRQ*) signal, the microprocessor acknowledge (MBUSAK*) signal which acknowledges relinquishment of the local bus by the microprocessor 70 as discussed in connection with Fig. 2, a CPU acknowledge (BUSAKI*) signal from the CPU 10 of Fig. 1 which acknowledges relinquishment of the system bus by the CPU 10, and Ql and Q2 signals which are fed back from elements of the bus requester circuit, as will be discussed. The programmable array logic chip 166 is programmed in accordance with instructions found in the "PAL Programmable Array Logic Handbook, third edition" available from Monolithic Memories, 2175 Mission College Boulevard, Santa Clara, California 95050. The programmable array logic chip 166 is programmed in accordance with the following equations: SIGNAL (pinl9) = /DMAR* . MBUSRQ* . MBUSAK* . EBUSRQ* + Ql . /DMAR* (Equation 1) SIGNAL (Pinl8) = /DMAR* . BUSRQ* . BUSAKI* + Q2 . /DMAR* (Equation 2) /BAKC* = /DMAR* . /MBUSAK* (Equation 3) /BAKM* = /DMAR* . /BUSAKI* (Equation 4) /BRAKO* = /DMAR* . /MBUSAK* (Equation 5) /BUSAKO* = /DMAR* . /BUSAKI* (Equation 6) Wherein: / denotes complement of signal; denotes AND function; and + denotes OR function. Equation 1 is for a request signal when no other device is requesting the local bus. Equation 2 is for a request signal when no other device is requesting the system bus. Equation 3 is for an acknowledge signal for the DMA controller from the local microprocessor. Equation 4 is for an acknowledge signal for the DMA controller from the system processor. Equation 5 is for an acknowledge signal from a local microprocessor which is lower in the priority chain. Equation 6 is for an acknowledge signal from other devices of the system processor which are lower in the priority chain. The output of pin 19 of the programmable array logic chip 166 is inputted to the data input of a D type flip-flop 168. The zero output of the flip- flop 168 is inputted to the data input of a D type flip-flop 170. The one output of the flip-flop 170 provides the Ql signal previously mentioned which is inputted to the programmable array logic chip 166. The one output of the flip-flop 170 is also inverted by an invertor 172 for providing the MBUSRQ* signal. The dynamic clock inputs of flip-flop 168 and 170 receive the board clock (BCLK) signal such that the MBUSRQ* signal is in synchronization with the board clock signal. The output on pin 18 of the programmable array logic chip 166 is inputted into the data input of a D type flip-flop 174. The one output of the flip-flop 174 provides the Q2 signal inputted into the programmable array logic chip 166 as previously discussed. The zero output of the flip- flop 174 is inverted by inverter 176 to provide the BUSRQ* signal. A signal clock (SCLK) signal from a system clock, not shown, is received by the dynamic control input of the flip-flop 174 such that the BUSRQ* signal is in synchronization with the system clock, and thus is compatible with the timing of the CPU 10 of Fig. 1. Pin 17 of the programmable array logic chip 166 provides the BAKC* signal which provides an acknowledgement that the microprocessor chip 70 of Fig. 2 has relinquished the local bus 40. Pin 16 of the programmable array logic chip 166 provides the BAKM* signal, which provides an acknowledgement that the CPU 10 of Fig. 1 has relinquished the system bus 14. The BAKC* and BAKM* signals from pins 17 and 16, respectively, of the programmable array logic chip 166 are inputted into the NAND gate 162 and NOR gate 164 of Fig. 11 as previously discussed. The IRESET* signal into the preset terminals of the flip-flop 168, 170 and 174 is provided by the reset terminal, pin 16, of the microprocessor chip 70 of Fig. 2. Flip-flops 168, 170 and 174 are 74LS74 devices available from Texas Instruments. Figs. 13 and 13B, when joined as shown in the map of Fig. 13, is a block diagram of a timing generator circuit for the DMA sequencer 30 of Fig. 1. The timing generator circuit includes a programmable read only memory (PROM) 178, which is a TBP28S42 512 by 8 bit PROM device available from Texas Instruments. Address bits A0-A5 connected to inputs of the PROM 178 are provided by the outputs of the counter chips 160 of the PROM address counter circuit of Fig. 11. The I/ODM and DIR signals which make up the rest of the PROM address are provided by the buffer 150 of the latch circuit of Fig. 10. It will be understood that when an address is placed on the 8 bit address inputs of the PROM 178, the 8 bits stored in the PROM starting at that address will appear on the PROM outputs. The bits outputted by the PROM 178 are inputted into a tri-state buffer device 180 which is a 74S374 chip available from Texas Instruments. The output control, pin 1, of the tri-state buffer device 180 receives the DMAEND* signal previously described, and the clock input, pin 11, of the tri-state buffer device 180 receives the BCLK signal also described. Pin 6 of the tri-state buffer device 180 provides the INCR1 signal, pin 15 provides the 1ZZ signal, pin 16 provides the 2ZZ signal, pin 9 provides the LCNT* signal, pin 12 provides the INCR2 signal, and the output of pin 2 is connected to one input of a negative AND gate 182. The other input of the negative AND gate 182 receives the DMAOVER* signal previously described. The output of the negative AND gate 182 is a DMA request (DMAR*) signal, which is provided to the programmable array logic chip 166 previously described in connection with Fig. 12. As previously described, when the DMAR* signal becomes active, through the logic of the programmable array logic chip 166, the MBUSRQ* signal is issued to the microprocessor 70 and the BUSRQ* signal is issued to the CPU. The INCR1 signal is also inputted into a negative AND gate 184 with the DIR signal. The output of the negative AND gate 184 is the ENC* signal. The DIR signal is inverted by inverter 186, whose output is inputted with the INCR2 signal to a negative AND gate 188, whose output is the ENM* signal. A buffer 190 is provided which is an 74S244 chip available from Texas Instruments. The output control pins 1 and 19 of the buffer 190 receive the BAK* signal from inverter 128 of Fig. 7, previously described. . The output of pin 6 of the tri-state buffer 180 is connected to the input pin 6 of the buffer 190, output pin 15 of buffer 180 is connected to input pin 15 of buffer 190, the output of negative AND gate 184 is connected to the input pin 11 of buffer 190, the output pin 12 of buffer 180 is connected to the input pin 13 of buffer 190, the output pin 16 of buffer 180 is connected to the input pin 17 of buffer 190, the output of negative AND gate 188 is connected to the input pin 8 of buffer 190, output pin 5 of buffer 180 is connected to the input pin 4 of buffer 190, and the output pin 19 of buffer 180 is connected to the input pin 2 of buffer 190. Buffer 190 provides the BMRQ* signal on output pin 14, the BDS* signal on output pin 15, the BR/W* signal on output pin 9, the PMRQ* signal on output pin 7, the PDS* signal on output pin 3, the PR/W* signal on output pin 12, and the INRC signal on output pin 18, all of which have been previously described. The operation of the DMA transfer will now be described. In the to be described example, the CPU 10 of Fig. 1 wishes to send data from the main memory 12 to the local memory 38. The data is to be taken from a specified starting address in main memory 12, and stored at a specified starting address in the local memory 38. After the starting addresses and number of words to be transferred are supplied to the microprocessor 26, the transfer operation is ready to begin. Referring now to Figs. 2 and 6, the microprocessor chip 70 places the lower 16 bits of the main memory address on the data portion of the local bus 40, and addresses the I/O decode circuit of Fig. 6 such that the MARL* signal on pin 15 of the one-of- eight counter 114 goes active low. This causes the 16 bits to be loaded into the lower portion counter chips 116 of the system address register 32 of Figs. 7A-7C. The high order data bits are then loaded by the microprocessor chip 70 on the data portion of the local bus 40, and the I/O decode circuit of Fig. 6 is addressed such that the MARH* signal goes active low, loading the high order data bits in the high order counter chips 116 of the system address register 32. In a similar manner, the low order data bits of the local address are loaded into the low order counter chips 130 of the local address register of Figs. 8A and 8B by the CARL* signal, and the high order data bits of the local address are loaded into the high order counter chips 130 of the local address register of Figs. 8A and 8B by the CARH/signal. The value of the total words to be transferred are then placed, by the microprocessor chip 70, on the data portion of the local bus 40, and the I/O decoder circuit of Fig. 6 is addressed to cause the DMACNT* signal to go active low, to load the word count value into the DMA word count register 36 of Fig. 9. The DIR signal, which indicates the direction of transfer, the I/ODM signal and the DMAENI signal are placed on data bits BD0, BD2 and BD5 (BD1 is not used in the illustrated embodiment) of the local bus 40, and the I/O decode circuit of Fig. 6 is addressed by the processor chip 70 to cause the STDMA* signal to go active low, thereby starting the DMA operation. The STDMA* signal, through the negative OR gate 152, will strobe the clock of the latch 150 of Fig. 10, latching the data on the data portion of the local bus 40. Since a value other than zero has been loaded into the DMA word count register 36 of Fig. 9, tke zero output of the flip-flop 146 will be low, making the DMAOVER* signal active low. The low DMAOVER* signal will be inputted, along with the low on. the output pin 2 of the tri-state buffer 180 which was made low at the end of the last DMA operation, to the negative AND gate 182 of Fig. 13A, whose output DMAR* will go low. As discussed in connection with Fig. 12, the active low DMAR* signal is inputted into the programmable array logic chip 166, which causes an active low bus request BUSRQ* signal to the CPU 10 of Fig. 1, and a low bus request MBUSRQ* signal to the microprocessor chip 70 of Fig. 2A. When the local bus is relinquished by the microprocessor chip 70, and the main bus is relinquished by the CPU 10, they return active low MBUSAK* and BUSAKI* signals, respectively, to the programmable array logic chip 166, which responsively issues an active low BAKC* signal indicating the local bus 40 is released and an active low BAKM* signal indicating the main bus 14 is released. Upon both of the BAKC* and BAKM* signals going active low, the PROM address counter circuit of Fig. 11 starts to count, and the output bits A0-A5 from the circuit of Fig. 11 are inputted into the PROM 178 of the DMA sequencer timing generator of Fig. 13A. It will be understood that at the receipt of each BCLK* pulse from the clock 69 of Fig. 3 by the PROM address counter circuit of Pig. 11, a new address will be presented to the PROM 178 of Fig. 13A, and a new set of timing signals will be presented to the tri- state devices of 180 and 190 to generate a new set of control signals. The direction signal DIR is presented to the PROM 178, and the gates 184 and 188 of Fig. 13B, which controls the order in which the ENC* and the ENM* signals, and the memory control signals on the output pins of the tri-state device 190 are generated. For instance, if the data transfer is from the local memory 38 to the main memory 12 of Fig. 1, in the first cycle of the DMA transfer operation, the first word of data is read from the local memory 38 and placed in the outgoing data register 58 of Fig. 1. In the second cycle of the DMA transfer operation, the first word of data is then passed from the outgoing data register 58 of Fig. 1, and written into the main memory 12 of Fig. 1. If, as in the illustrated example, the data transfer is from the main memory 12 to the local memory 38 of Fig. 1, in the first cycle of the DMA transfer operation, the first word of data is read from the main memory 12 and placed in the incoming data register 56 of Fig. 1. In this case, in the second cycle of the DMA transfer operation, the first word of data is then passed from the incoming data register 56 of Fig. 1, and written into the local memory 38 of Fig. 1. Fig. 14 is a timing diagram for various control signals showing their relationship during the transfer of data from the main.memory 12 to the local memory 38 through the incoming data register 56 of Fig. 1. A train of BCLK pulses 200 are provided from the board clock circuit of Fig. 3. The DMA transfer operation is divided into cycles, with seven BCLK pulses 200 in each cycle. The main memory request PMRQ* signal goes from a high state to an active low state at 202. Upon receipt of the edge 202 of the PMRQ* signal, the main memory starts a memory operation. The main memory data strobe PDS* signal has a negative going edge 204 and a positive going edge 206. The main memory read/write PR/W* signal remains high throughout the illustrated DMA transfer operation, indicating a read operation from the main memory is to occur. Upon the receipt of the edge 204 of the PDS* signal, the first word of data in the main memory 14 at the address contained in the system address memory is read and placed on the system bus 14. At the edge 206, the first word of data on the system bus 14 is latched into the incoming data register 56. The local memory request BMRQ* signal has an edge 210 which starts the local memory operation in cycle 2. The local memory data strobe BDS* has a negative going edge 212 and a positive going edge 214. The local memory read/write BR/W* signal is at its low state at 216 during the local memory operation started at 210 of the BMRQ* signal, indicating that a write operation is to occur to the local memory 38. At the edge 212 of the BDS* signal, the DMA controller will take the first word of data in incoming data register 56, and write it into the local memory 38 at the address in the local address register 34. It will be seen that a first word of data is read from the main memory 12 in cycle 1, and is written into the local memory 38 in cycle 2. In cycle 2, a second word of data is read from the main memory 12 at edge 220 of the PDS* signal. However, this second word of data will not be latched into data register 56 until the edge 222, which occurs after the first word of data has been written out of the data register 56 at the edge 212 of the BDS* signal. It will thus be seen that in cycle 1, the first word of data will be read into incoming data register 56. In cycle 2, the first word of data will be written out of incoming data register 56, and then the second word of data will be read into incoming data register 56. In cycle n (see Fig. 14) , the nth word of data is latched into the incoming data register 56 at 230. In cycle n+1, the nth word of data will be written out of the data register 56 to the local memory at 232. Thus, a complete transfer operation is completed in n+1 cycles, where n is the number of words being transferred in an operation. The disclosed system is presently programmed to perform 16 word transfers in each DMA operation, after which the buses 14 and 40 are relinquished to the CPU 10 and the microprocessor 26, respectively. If the word count in the DMA word count register 36 has not been earlier reduced to zero during the previous transfer operation, then the buses 14 and 40 are again requested as described, and a new transfer operation starts until the word count in the DMA word register 36 is reduced to zero. The programming of the PROM 178 of the DMA sequencer timing generator of Fig. 13 for transferring 16 words is shown in Table I. Addresses 0-7F(H) are for data transfer from the local memory 30 to the main memory 12 (DIR=0) , and addresses 80-FF(H) are for transfer from the main memory 12 to the local memory 38 (DIR=1) . Cycle 1 is shown at addresses 0-7 (H) and 80-87(H), respectively; and cycle 18 is shown at address 78-7F(H) and F8-FF(H) respectively. Cycles 2- 17 are shown at address 8-77(H) and 88-F7(H), respectively, each having seven addresses. Referring to Fig. 14, BCLK pulse 234 corresponds to the instruction at address 80(H) of Table I, and BCLK pulse 236 corresponds to the instruction at address FF(H) . Referring to Figs. 13A and 13B, it will be noted that the INRC signal is the seventh bit output from the PROM 178, which is passed through the tri- state device 180 and buffer 190. It will be understood that when the seventh bit of the output of the PROM 178 goes to zero, an INRC signal will be generated. This occurs at address D(H) of Table I, and then every seventh address thereafter for sixteen cycles, and again at address 7B(H) for the last cycle when the DIR signal is 0 (addresses 0-7 F(H)). The seventh bit is also 0 at address 8D(H) of Table I, and every seventh address thereafter for sixteen cycles, and again at address FB(H)- for the last cycle when the DIR signal is 1 (addresses 80-FF(H)). TABLE I ADDR DATA ADDR DATA 0 FE 80 FE 1 7E 81 EE 2 3E 82 E6 3 3E 83 E6 4 3E 84 E6 5 7E 85 EE 6 FE 86 FE 7 FE 87 FE 8 6A 88 4E 9 2A 89 46 A 22 8A 06 B 22 8B 06 C 6A 8C 4E D FC 8D FC E FE 8E FE • F 6A 8F 4E 10 2A 90 46 11 22 91 06 12 22 92 06 13 6A 93 4E 14 FC 94 FC 15 FE 95 FE 16 6A 96 4E 17 2A 97 46 18 22 98 06 19 22 99 06 1A 6A 9A 4E IB FC 9B FC 1C FE 9C FE ID 6A 9D 4E IE 2A 9E 46 IF 22 9F 06 20 22 AO 06 21 6A Al 4E 22 FC A2 FC 3 FE A3 FE 4 6A A4 4E 5 2A A5 46 6 22 A6 06 7 22 A7 06 8 6A A8 4E 9 FC A9 FC A FE AA FE B 6A AB 4E C 2A AC 46 D 22 AD 06 E 22 AE 06 F 6A AF 4Ξ 0 FC BO FC 1 FE Bl FE 2 6A B2 4E 3 2A B3 46 4 22 B4 06 5 22 B5 06 6 6A B6 4E 7 FC B7 FC 8 FE B8 FE 9 6A B9 4E A 2A BA 46 B 22 BB 06 C 22 BC 06 D 6A BC 4E E FC BE FC F FE BF FE 0 6A CO 4E 1 2A Cl 46 2 22 C2 06 3 22 C3 06 4 6A C4 4Ξ 5 FC C5 FC 6 FE C6 FE 7 6A C7 4E 8 2A C8 46 9 22 C9 06 A 22 CA 06 B 6A CB 4E C FC CC FC D FE CD FE E 6A CE 4E F 2A CF 46 0 22 DO 06 1 22 DI 06 2 6A D2 4E 3 FC D3 PC 4 FE D4 FE 5 6A D5 4E 6 2A D6 46 7 22 D7 06 8 22 D8 06 9 6A D9 4E A FC DA FC B FE DB FE C 6A DC 4E D 2A DD 46 E 22 DE 06 F 22 DF 06 0 6A EO 4E 1 FC El FC 2 FE E2 FE 3 6A E3 4E 4 2A E4 46 5 22 E5 06 6 22 E6 06 7 6A E7 4E 8 FC E8 PC 9 FE E9 FE A 6A EA 4E B 2A EB 46 C 22 EC 06 D 22 ED 06 E 6A EE 4E F FC EF FC 0 PE FO FE 1 6A PI 4E 2 2A P2 46 3 22 F3 06 4 22 F4 06 5 6A F5 4E 6 FC F6 FC 7 FE P7 FE 8 EA F8 5E 9 E2 F9 5E A EO FA IE B EA FB 1C C FE FC 5E D FF FD FE E FF FE FP F PF FF FF

Claims: CLAIMS 1. A direct memory access controller for a data processing system including a plurality of peripheral devices (16) and a main memory (12), said controller including a local memory (38) adapted to store data transferred between said peripheral devices (16) and said main memory (12) , sequencer means (30) adapted to control the transfer of data between said main memory (12) and said local memory (38), and data register means (56, 58) adapted to hold data transferred between said main memory (12) and said local memory (38) , characterized by local address register means (34) coupled to said sequencer means (30) and adapted to provide local memory addresses for memory operations of said local memory (38) , system address register means (32) coupled to said sequencer means (30) and adapted to provide main memory addresses for memory operations of said main memory (12) , and in that said sequencer means (30) includes control means (166, 178) adapted to generate control signals for said main memory (12) , said local memory (38) and said data register means (56, 58) in successive control cycles whereby, in a single control cycle, a first word is read out of said register means (56, 58) and a second word is written into said register means (56, 58). 2. A direct memory access controller according to Claim 1, characterized by word count register means (36) coupled to said sequencer means (30) and adapted to store the number of words to be transferred, in that said control means (166, 178) is coupled to said word count register means (36) , said local address register means (34) and said system address means (32) and is adapted to generate in each control cycle, a first timing signal adapted to decrement the count in said word count register means (36) , a second timing signal adapted to increment the local memory address in said local address register means (34) and a third timing signal adapted to increment the system memory address in said system address register means (32) . 3. A direct memory access controller according to Claim 2, characterized in that word count register means (36) includes indicating means (146) adapted to indicate when the number of control cycles equals the number of words to be transferred plus one. 4. A direct memory access controller according to Claim 2, characterized by a system bus (14) connected to said main memory (12) said system address register means (30) , said data register means (56, 58) and said control means (166, 178) and adapted to transmit data between main memory (12) and said data register means (56, 58) and to transmit control signals from said control means (166, 178) to said main memory (12); by a local bus (40) connected to said local memory (38) , said local address register means (34), said data register means (56, 58) and said control means (166, 178) and adapted to transmit data between said local memory (38) and said data register means (56, 58) and to transmit control signals from said control means (166, 178) to said local memory (38); and in that said control means (166, 178) is responsive to said indicating means (146) to request access to said system bus (14) and said local bus (40) when the number of control cycles is not equal to the number of words to be transferred plus one. 5. A direct memory access controller according to Claim 4, characterized in that said data register means (56, 58) includes an incoming data register (56) connected between said system bus (14) and said local bus (40) and adapted to receive data from said system bus (14) for transfer to said local bus (40) and an outgoing data register (58) connected between said system bus (14) and said local bus (40) and adapted to receive data from said local bus (40) for transfer to said system bus (14) . 6. A direct memory access controller according to Claim 4, characterized in that said data register means (56, 58) includes an incoming data register (56) connected between said system bus (14) and said local bus (40) and adapted to receive data from said system bus (14) for transfer to said local bus (40) and an outgoing data register (58) connected between said system bus (14) and said local bus (40) and adapted to receive data from said local bus (40) for transfer to said system bus (14) . 7. A direct memory access controller according to Claim 4, characterized in that said control means (166, 178) is adapted to relinquish control of said system bus (14) and said local bus (40) in response to said indicating means (146) indicating that a predetermined number of words has been transferred. 8. A direct memory access controller according to Claim 6, characterized in that said control means (166, 178) includes clock means (69) adapted to generate a train of clock pulses, counting means (160) adapted to count said clock pulses in dependence on bus acknowledge signals representing the granting of requests for said system bus (14) and said local bus (40), a programmable read-only memory (178) having address input terminals connected to said counting means (160) , and data input terminals, and decoding means (180) coupled to the output terminals of said programmable read-only memory (178) and adapted to generate said control signals for said main memory (12) and said local memory (38) . 9. A direct memory access controller according to Claim 7, characterized in that said programmable read-only memory (178) is adapted to generate said timing signals. 10. A direct memory access controller according to Claim 8, characterized by a microprocessor (26) adapted to generate a direction signal indicating the direction of data transfer, and in that said programmable read-only memory (178) is operable in dependence on said direction signal. 11. A direct memory access controller according to Claim 9, characterized by mailbox means (60, 62) coupled between said microprocessor (26) and said system bus (14) and adapted to transmit messages between said system bus (14) and said microprocessor (26) , said messages including first starting address to be stored in said local address register means (34) , a second starting address to be stored in said system address register means (32) , a word count to be stored in said word count register means (36) , and the direction of transfer. 12. A direct memory access controller according to Claim 10, characterized in that a central processing unit (10) is connected to said system bus (14) and in that said mailbox means includes an incoming mailbox register (60) connected between said system bus (14) and said microprocessor (26) and adapted to transfer incoming messages from said central processing unit (10) to said microprocessor (26) , and an outgoing mailbox register (62) connected between said system bus (14) and said microprocessor and adapted to transfer outgoing messages from said microprocessor (26) to said central processing unit (10). 13. A direct memory access controller according to Claim 11, characterized in that said microprocessor (26) is operatively connected to said local address register means (34) , said system address register means (32) and said word count register means (36) by said local bus (40).

Inventors: CHATTOPADHYA SANDIP, CHATTOPADHYA, SANDIP
Applicants: NCR CO, NCR CORPORATION
Application year: 1986
Main classification: G06F13
IPC codes: G06F13