Patent 5226140
Contents
Patent for Store Immediate Instructions
Note: all mentions of dot have been replaced with pixel
Full Patent
United States Patent Number: 5226140APPARATUS FOR CONTROLLING THE TRANSFER OF DATA
Abstract
An apparatus for controlling the transfer of data comprises registers for setting an address of a memory and data to be stored in the memory at the address, and a control unit for controlling the registers to set the address and data. In a case where an immediate data transfer command is produced, a physical address is defined by including the immediate data transfer command partly therein. The physical address thus defined is automatically set in the register for setting an address of a memory without receiving an address setting command so that the data stored in the register for setting data are written into the memory at the physical address. |
Drawings
The invention will be described in more detail in conjunction with appended drawings wherein, |
|
[Figure 1] is a block diagram showing an apparatus for displaying a color image in which an apparatus for controlling the transfer of data is included, |
|
[Figure 2] is a block diagram showing an apparatus for controlling the transfer of data in an embodiment according to the invention, |
|
[Figure 3] is a block diagram showing a mapping register circuit in an apparatus for controlling the transfer of data in the embodiment, |
|
[Figure 4] is an explanatory diagram showing a mapping register selection code when a physical address is produced in an apparatus for controlling the transfer of data in the embodiment, |
|
[Figure 5] is an explanatory diagram showing a mapping register selection code when data are read from a mapping register and written thereinto in an apparatus for controlling the transfer of data in the embodiment, |
|
[Figure 6] is an explanatory diagram showing an immediate transfer code for a video display controller in the apparatus for displaying a color image, |
|
[Figure 7] is a block diagram showing the video display controller in the apparatus for displaying a color image, |
|
[Figure 8] is an explanatory diagram showing a relation between logical and physical address regions in an apparatus for controlling the transfer of data in the embodiment, and |
|
[Figure 9] is an explanatory diagram showing an allocation of a chip enable signal to a physical address region in an apparatus for controlling the transfer of data in the embodiment. |
Field of the Invention
The invention relates to an apparatus for controlling the transfer of data, and more particularly to an apparatus for controlling the transfer of data in which data are transferred in accordance with a single data transfer command. |
Background of the Invention
A conventional apparatus for controlling the transfer of data comprises a first register in which a write-address of a memory is set, and a second register in which write-data are set. In operation, when respective commands for the first and second registers are supplied from a CPU thereto, a write-address is set in the first register, and write-data are set in the second register so that the write-data are stored in a memory. In the conventional apparatus for controlling the transfer of data, however, the transfer of data can not be smoothly performed when a large amount of data are transferred because a write address and write-data are set in the respective registers in accordance with the respective commands. |
Summary of the Invention
Accordingly, it is an object of the invention to provide an apparatus for controlling the transfer of data in which the transfer of data can be smoothly performed even in a case where a large amount of data are transferred. It is a further object of the invention to provide an apparatus for controlling the transfer of data in which a write-address is not required to be set in an address register in accordance with an address setting command. According to the invention, an apparatus for controlling the transfer of data comprises a set of registers and a control unit. The set of registers includes a memory address write register for setting a write-address and a VRAM data write register for setting write-data. When an immediate transfer command is produced, the write-data are transferred to an address of a memory determined in accordance with the command under the control of the control circuit. |
Description of Preferred Embodiments
In [Figure 1], there is shown an apparatus for displaying a color image to which an apparatus for controlling the transfer of data according to the invention is applied. In the apparatus for controlling the transfer of data, a CPU (1) performs a predetermined control in accordance with a program stored in ROM (5) so that data, arithmetical results etc. are stored into a RAM (6) temporarily. A Video Display Controller (2) is provided therein to supply a Video Color Encoder (3) with video data of a story, for instance, for a so-called television game read from a video RAM (VRAM) 7 in accordance with a control of the CPU (1) which deciphers a program for the television game stored in the ROM (5). The Video Color Encoder (3) to which the video data are supplied produces RGB analog signals obtained in accordance with color data stored therein, or produces video color signal including a luminance signal and color difference signals obtained in accordance with the color data. Further, a programmable sound generator 4 is provided therein to produce analog sound signals as left and right stereo sounds in accordance with a content of the ROM (5) which is supplied through the CPU (1) thereto. The video color signal produced in the Video Color Encoder (3) is supplied through an interface 8 to a receiving circuit of a video display (9) as a composite signal, and the RGB analog signal is supplied through an interface 10 directly to a video display (9) which functions as an exclusive use monitor means. On the other hand, the left and right analog sound signals are supplied through amplifiers 11a and 11b to speakers 12a and 12b to produce sounds. |
|
[Figure 2] shows the CPU (1) and the programmable sound generator 4 as encircled by a dotted line in [Figure 1]. The CPU (1) in which an apparatus for controlling a transfer of data in the embodiment is included and comprises an instruction register (20), an instruction decoder (21), a bus interface register (22), an Arithmetic Logic Unit (ALU) (23), a set of registers (24), a Mapping Register (25), a chip enable decoder (26), a timing and control unit (27), an input and output port (28), a Timer (29), an interrupt request register (30), an interrupt disable register (31), and so on. These units will be explained as follows.
|
|
In [Figure 3], there is shown the aforementioned Mapping Register (25) comprising 8 registers MPR0 to MPR7 each being of 8 bits, and connected through the B-bus (32) to an input output controller (50) and through an output selector (51) to the output terminals A13 to A20. The output selector (51) selects one register from the 8 registers MPR0 to MPR7 of the Mapping Register (25) in accordance with upper 3 bits H5 to H7 of upper data of a logical address on the H-bus (35). |
|
[Figure 4] shows a relation between the upper 3 bits H5 to H7 and one register selected from the 8 registers MPR0 to MPR7. If it is assumed that the upper 3 bits H5 to H7 are 010, the register MPR2 is selected from the 8 registers MPR0 to MPR7. Data are read from the Mapping Register (25) by a command TMAi where i is an integer selected from 0 to 7. For instance, data are read from the register MPR2 to be transferred through the B-bus (32) to the Accumulator (38) in accordance with a command "TMA2 ". On the other hand, data are written into the Mapping Register (25) by a command TAMi where i is an integer selected from 0 to 7. For instance, data are transferred to be written into the register MPR0 from the Accumulator (38) by a command TAM0. The commands TMAi and TAMi are composed of two byte respectively, and lower byte thereof includes a bit of 1 corresponding in a bit number to a register number which is selected from the 8 registers MPR0 to MPR7 and remaining 7 bits of 0. When one of the 8 registers MPR0 to MPR7 is selected in accordance with upper 3 bits of the H-bus (35), a content of the selected register is supplied through the output terminals A13 to A20 to a following stage so that a physical address of 21 bit is obtained together with a content of the logical address low register (48) to be supplied through the output terminals A0 to A7 thereto, and lower 5 bits of the logical address high register (49) to be supplied through the output terminals A8 to A12 thereto. When the most significant bit A20 of a physical address A0 to A20 is 1, a command by which data designated in accordance with the physical address A0 to A20 are immediate-transferred to the Video Display Controller (2) is conducted. The command includes ST0, ST1 and ST2 by which codes are produced on A0 and A1 of the address bus at a write cycle as shown in [Figure 6]. The command is set in the instruction register (20). In operation, lower data of a logical address are set in the logical address low register (48), and lower 5 bits of upper data of the logical address are set in the logical address high register (49). Here, it is assumed that address data are set in the 8 registers MPR0 to MPR7 of the Mapping Register (25) respectively. When upper 3 bits of upper data of the logical address, that is to say, upper 3 bits H5 to H7 of the H-bus (35) are 001, the register MPR1 is selected so that a content F8 of the register MPR1 is supplied through the output terminals A13 to A20 to the following stage. These output signals are combined with output signals of the output terminals A8 to A12 and A0 to A7 to produce a physical address A0 to A20. Then, the chip enable decoder (26) decodes upper 11 bits A10 to A20 of the physical address A0 to A20 to produce a chip enable signal CER of 0 by which a data memory is enabled. When the immediate data transfer command is produced, the signal CE7 is 0, the MSB A20 is 1, and the bits A0 and A1 are of a content as shown in [Figure 6] so that data are transferred from the CPU (1) to the Video Display Controller (2) as shown in detail in [Figure 7]. |
|
[Figure 7] shows the Video Display Controller (2) which comprises a control unit (70), an address unit (71), a CPU read/write buffer (72), a Sprite Attribute Table buffer (73), a sprite attribute shift register 74, a background shift register (75), a data bus buffer (76), a synchronous circuit (77), and a priority circuit (78). The control unit (70) is provided with a BUSY terminal through which 0 is supplied to the CPU (1) in a case where the Video Display Controller (2) is not in time for the writing / reading of data from the CPU (1) to the VRAM (7) so that the CPU (1) is held under the state, a IRQ terminal through which an interrupt request signal is supplied to an external circuit, a CK terminal through which a clock signals having a frequency for one pixel (one picture element) is received, a RESET terminal through which a reset signal for initialization is received, and a EX8/16 terminal through which a data bus change-over signal for changing over a data bus width is received. The address unit (71) is connected to address terminals MA0 to MA15 through which an address signal of the VRAM is supplied thereto. An address region of the VRAM (7) is of a capacity, for instance, 65,536 words, provided that one word is of 16 bits. The address unit (71), the CPU read/write buffer 72, the Sprite Attribute Table (73), the sprite shift register (74) and the background shift register (75) are connected through data bus to data terminals MD0 to MD15 through which data of the VRAM (7) are transferred for the writing thereinto or the reading therefrom. The Sprite Attribute Table buffer (73) is a memory for storing a display position (X, Y), color, pattern number and so on of a sprite (16 bits). The sprite shift register (74) is supplied with a pattern number, sprite color etc. read from the Sprite Attribute Table buffer (73) to access the VRAM (7), and stores data for a pattern, color etc. of a sprite read from a sprite generator in the VRAM (7). The background shift register (75) stores a pattern and CG color of a background. The pattern is read from a character generator in accordance with an address of the character generator in the VRAM (7) obtained from a character code which is read from an attribute table in the VRAM (7) together with the CG color. The data bus buffer (76) is connected to terminals D0 to D15 through which data are supplied to and received from an external circuit. The Video Display Controller (2) can select one of 8 bit interface and 16 bit interface in compliance with a data width of a system including the CPU (1). When the 8 bit interface is selected, the terminals D0 to D7 are used among the terminals D0 to D15. The synchronous circuit (77) is connected to a DISP terminal through which a signal for indicating a display period is supplied to an external circuit, a VSYNC terminal through which a signal for a vertical synchronization of a CRT is supplied to the video display (9) and an external vertical synchronous signal is received, and a HSYNC terminal through which a signal for a horizontal synchronization of the CRT is supplied to the video display (9) and an external horizontal synchronous signal is received. The priority circuit (78) is connected to terminals VD0 to VD7 through which video data are supplied to an external circuit, and a SP/BG (VD8) terminal through which a signal 1 is supplied to an external circuit when the video data are for a sprite and a signal 0 is supplied thereto when the video data are for a background. The aforementioned control unit (70) is further provided with a CS terminal through which a signal 0 is received so that registers therein are accessed for the writing and reading of data from the CPU (1), RD and WR terminals through which read write-timing signals are received, and terminals A0 and A1 connected to the address bus of the CPU (1) as shown in [Figure 2]. The Video Display Controller (2) is further provided with a MRD terminal and a MWR terminal. When the MRD terminal is under a state of 0, data are read from the VRAM (7) to the CPU (1). On the other hand, when the MWR terminal is under a state of 0, data are written into the VRAM (7) from the CPU (1). The control unit (70) includes a memory address write register and a VRAM data write register together with other registers. In operation, when an immediate data transfer command (ST0, ST1 or ST2) is produced, data transferred from the CPU (1) are stored in the VRAM data write register. The aforementioned physical address A0 to A20 is automatically set in the memory address write register without receiving an address setting command. As a result, the data are written into the VRAM (7) in synchronization with a write signal of 0 applied to the WR terminal in accordance with a single transfer command which is called "an immediate data transfer command". That is to say, a chip including the aforementioned memory address write register and VRAM data write register is enabled in accordance with a chip enable signal CE7 which becomes 0 in the conduct of the immediate data transfer command of ST0, ST1 or ST2. As a result, bits A0 and A1 of a physical address A0 to A20 of 21 bits becomes a bit state dependent on the command (ST0, ST1 or ST2). Accordingly, the data transferred from the CPU (1) are automatically stored in the VRAM (7) without the necessity that an address is set in the memory address write register by a command. |
|
[Figure 8] shows a relation between a logical address of the CPU (1) and a physical address of the RAM (6) wherein a block F8 of a physical address region having 2M bytes is allocated in accordance with a content F8 of the selected register MPR1 in a case where a logical address of 16 bits on the L and H-buses 34 and 35 corresponds to one address selected from addresses 0x2000 to 0x3FFF of a logical address region having 64K bytes as indicated by hatching lines therein. Thus, a memory of 2M bytes in which an address signal of 21 bits is required for the access thereof can be accessed by an address signal of 16 bits. At this time, data at a corresponding address of a memory are immediate-transferred to a Video Display Controller (2) in a case where lower 2 bits A0 and A1 of the physical address are of a content as shown in [Figure 6]. |
|
[Figure 9] shows a physical address region of the RAM (6) to which a chip enable signal CER is allocated. The chip enable signal CER is produced in accordance with a content of upper 11 bits A10 to A20 of a physical address A0 to A20 which is decoded in the chip enable decoder (26). For instance, the chip enable signal CER is allocated to a region of physical addresses 0x1F0000 to 0x1F7FFF in which zero page and stack regions exist in a case where a content of the selected register MPR1 is F8. The zero page and stack regions are of a region to which contents of the Accumulator (38), the X register (39), and the Y register (40) are evacuated temporarily. Although the invention has been described with respect to specific embodiment for complete and clear disclosure, the appended claims are not to thus limited but are to be construed as embodying all modification and alternative constructions that may occur to one skilled in the art which fairly fall within the basic teaching herein set forth. |
Claims
What is claimed is:
|