MEMORY DEVICE WITH DATA ACCESS CONTROL

Abstract: A memory device in accordance with the present inven­ tion comprises a memory (32) which is constructed by a plur­ ality of small memories, to which address signals are supplied commonly. And in addition, each memory is equipped inde­ pendently with a data input and output line and a write and read control signal line, and the data with a plurality of bits that make up a word are memorized dispersedly at each of these small memories. The memory device further includes a multiplexer (36) for receiving the address signals and the bit width indication signal to output selectively address signals corresponding to the desired bit number from the two kinds of bit numbers, a register (40) for outputting, when making access to the bits with the first bit number of the two kinds of bit number, a write and read control signal to indicate the bits of the first bit number, to the write and read control signal line in the memory, a decoder (38) for receiving, when making access to the bits with the second bit number alone, the address signals that are not outputted from the selection means (36) as a position selection signal, and outputs, accord­ ing to its address content, a write and read control signal to indicate the bits with the second bit number to the write and read control signal line in the memory, and a CPU (34) for supplying through an IO register (46) the bit width indication signal, in accordance with an R/W signal, to the input and output circuit (42) which controls the input and output of the data to the memory means (32) and also to the selection means (36), and for supplying as well the R/W signal to the input and output circuit (42).

Description: The present invention relates to a memory device for writing and reading data, comprising: memory means constructed so as to dispersedly memorize data with a plurality of bits; and control means for driving said memory means so as to gain access at one time to data with a desired number of bits in order to write and read data with one bit width among data having at least two differing bit widths in said memory means, in which said control means comprises, an indication means for outputting to the memory means an indication signal which designates the desired bit width. Such a device is applicable to a memory device for use with a picture or image display device or the like, and is known from US-A 4 394 753. A memory device which controls data output depending on desired bit width is shown in US-A-4 354 256. A device with byte addressable memory for data of variable length is shown in DE-A-3 236 524 including means for routing address signals to appropriate sectors of memory depending on the word length. When making an access (writing or reading) to a memory for the dot data which constitute a figure or a letter to represent a variety of figures and letters in a picture display, the number of the dots that are accessed at one time varies depending upon the kind of figure. For example, in displaying a letter, a picture image, or the like, it will be desired to be able to access to all the dots that make up the letter or the picture image at one time. On the other hand, in displaying a geometrical figure such as straight line, a circle, or the like, it will be easier for human observer to view it as being described gradually one dot at a time. Now, although there is available a prior art memory device which is capable of giving access to a word made up of a plurality of bits corresponding to one address, the number of accessible bits is arranged to be fixed. Because of this, when an access is desired to a width which is smaller than the fixed bit width, it has been necessary to read out the entire bits within the word once, rewrite only the portion of the desired width, and write in again the whole thing without touching the other portions. In short, this method has a disadvantage of requiring a complicated procedure for rewriting and a longer time for processing. On the other hand, it is possible to construct a memory so as to allow access one bit at a time. However, such an arrangement also has the disadvantage of requiring a long time since the access is possible only one bit at a time. As a device which eliminates such disadvantages , there has been known one as is disclosed in Japanese Patent Publication No. 57-179982. This memory device is adapted for rewriting all of the bits or a part of the bits in a word by dividing the word into groups of n bits, and comprises a memory circuit with write or read unit of n bits (n=1,2,3,...), a data input terminal with N bits ( N=ℓxn , ℓ =2,3,4,...), a data selection circuit which selects n bits from the N-bit data that are inputted through the input terminal, an input terminal for a control signal which indicates together with the write indication signal whether all of the N bits or n bits of the N bits are to be rewritten, an input terminal for an address information for the memory circuit, an internal address generating circuit which outputs ℓ kinds of data selection signals to the data selection circuits based on the control signal input through the input terminal and outputs the write indication signal and ℓ kinds of internal address (the addresses for the n bits in the word) to the memory circuit for ℓ times as well and an output terminal. In the above memory circuit, the N bits in the word with address i are divided into groups of n bits which are memorized at the ℓ addresses at i + 0, i + 1, ....., i + (ℓ-1). First, when all of the N bits in the word with address i are to be rewritten, the internal address generating circuit outputs sequentially ℓ kinds of internal addresses and ℓ kinds of data selection signals to the memory circuit and the data selection circuit based on the control signal at the input terminal respectively, and outputs the write indication signal to the memory circuit for ℓ times as well, which accomplishes the rewriting of all of the N bits with address i in the memory circuit. However, even in this case where all of the N bits are desired to be rewritten, it takes a longer time and hence is inefficient since the rewriting has to be done sequentially in a group of n bits. When only n bits of the N bits in the word with address i are to be rewritten, the internal address generating circuit outputs, based on the control signal at the input terminals, ℓ kinds of data selection signals and the specified internal addresses in address i that are generated sequentially for ℓ times to the data selection circuit and the memory circuit, respectively, and outputs as well the write indication signal to the memory circuit for ℓ times. In this case, it is very inefficient since the data for the n bits outputted from the data selection circuit are written for ℓ times to the specified n bits in address i of the memory circuit, and only the data for the n bits which were written for the last, that is, the ℓ -th, time are memorized. Moreover, in the example cited in the above, internal addresses, signals, data selection signals, and write indication signals, in addition to the address information, have to be inputted so that the control for their synchronization has also been complicated. SUMMARY OF THE INVENTION An object of the invention is to provide a memory device which is adapted for giving a fast access to the desired bits in a word. Another object of the present invention is to provide a memory device which is adapted for shortening the time for processing an access. Another object of the present invention is to provide a memory device which is adapted for giving access to the desired bits in a word simultaneously. The memory device according to the invention is defined by the features of Claim 1. BRIEF DESCRIPTION OF THE DRAWINGS These and other objects, features and advantages of the present invention will be more apparent from the following description of a preferred embodiment, taken in conjunction with the accompanying drawing, in which: Fig. 1a is a simplified construction diagram of a prior art memory device; Fig. 1b is a construction diagram illustrating the internal structure of the memory of the memory device shown in Fig. 1a; Fig. 2 is a construction diagram of a memory device embodying the present invention; Fig. 3 is a construction diagram illustrating the internal structure of the memory device shown in Fig. 2; Figs. 4a and 4b are illustrations showing the positional relationship of address, bit, and word in the memory shown in Fig. 3; and Fig. 5 is an internal construction diagram for the decoder in the case of access with 2-bit width. DESCRIPTION OF THE PREFERRED EMBODIMENTS To facilitate the understanding of the present invention, a brief reference will be made to a prior art memory device illustrated in Figs. 1a and 1b. As shown in Fig. 1a, the prior art memory device comprises a memory circuit 10 with write and read unit of n bits (n=1,2,3,...), a data input terminal 12 with N bits ( N=ℓxn , ℓ =2,3,4,...), a data selection circuit 14 which selects n bits from the N-bit data that are inputted through the input terminal 12, an input terminal 16 for a control signal which indicates together with the write indication signal whether all the N bits or n bits of the N bits are to be rewritten, an input terminal 18 for an address information for the memory circuit 10, an internal address generating circuit 20 which outputs, ℓ kinds of data selection signals to the data selection circuit 14 based on the control signal input through the input terminal 16, and outputs the write indication signal and ℓ kinds of internal address (the address for the n bits in the word) to the memory circuit for ℓ times as well, and an output terminal 22. In the memory circuit 10, the N bits in the word with address i are divided into groups of n bits which are memorized at the ℓ addresses at i+0, i+1, ..., i+(ℓ-1) as shown in Fig. 1b. Now, when all of the N bits of the word with address i are to be rewritten, the internal address generating circuit 20 outputs sequentially, based on the control signal at the input terminal 16, ℓ kinds of internal addresses and ℓ kinds of data selection signals to the memory circuit 10 and the data selection circuit 14, respectively, and outputs the write indication signal to the memory circuit 10 for ℓ times as well, which completes the rewriting of all of the N bits with address i in the memory circuit 10. However, even in this case where rewriting of all of the N bits are desired, it takes a longer time and hence is inefficient since the rewriting has to be done sequentially in a group of n bits. Next, when only n bits in the N bits of the word with address i are to be rewritten, the internal address generating circuit 20 outputs, based on the control signal at the input terminal 16, ℓ kinds of data selection signals and the specific internal addresses in address i that are generated sequentially for ℓ times to the data selection circuit 14 and the memory circuit 10, respectively, and outputs as well the write indication signal to the memory circuit for ℓ times. In this case, the data for the n bits which are outputted from the data selection circuit 14 are written for times to the specified n bits in address i of the memory circuit 10 and only the 1-th data that are written in for the last time are memorized, so that the efficiency is very low. Moreover, in the example cited, the internal address signals, the data selection signals, and the write indication signals, in addition to the address information, have to be inputted, which makes the control for their synchronization a complicated task. The present invention which is aimed for resolving problems like those mentioned in the above will be described by referring to Figs. 2 to 5. Referring to Fig. 2, a memory device embodying the present invention is shown with reference numeral 30, which is built in a picture generating device which is connected to a display. The memory device 30 includes a memory 32 for storing the dot data to be presented in the display, and the memory 32 is capable of writing and reading 16 dots at one time as a word, and is capable as well of writing in the unit of one bit (corresponding to one dot data) that makes up a word. In the present embodiment, the memory 32 is constructed by 4k words X 16 bits. The memory device 30 includes further a multiplexer 36 which selectively switched and outputs the 16-bit addresses (A₀ - A₁₅) that are sent from the CPU 34 in accordance with the bit number (bit width) to be accessed. The multiplexer 36 outputs to the memory 32, A₀ to A₁₁ when the bit width to be accessed is bits (a word unit), and A₄ to A₁₅ when the width is one bit. That is, word addresses are sent from the CPU 34 using A₀ to A₁₁ in the case of an access with 16-bit width, and using A₄ to A₁₅ in the case of an access with 1-bit width. Furthermore, in the 1-bit width case, the lower addresses A₀ to A₃ are utilized for selecting the bit positions to be accessed in the word addresses designated by A₄ to A₁₅. A decoder 38 receives, in the case of an access with 1-bit width, address A₀ to A₃ from the multiplexer 36, and outputs a write control signal for designating one bit to be accessed in the 16 bits (one word) designated by A₄ to A₁₅. A register 40 is used for obtaining a write control signal which is required in the case of access with 16-bits width. An input and output circuit 42 is adapted for sending to the memory 32 the data sent through the data bus or for reading the data in the memory 32, according to the indication from an R/W signal line 56. When a write indication signal is supplied, all the data for 16 bits are sent to the bits (D₀ to D₁₅) of the memory 32 in the case of 16-bit width, and the identical data for 16 bits sent from the data bus are sent to all the bits (D₀ to D₁₅) of the memory 32 in the case of 1-bit width. An IO register 46 supplies, in accordance with the indication from the CPU 34, a bit width indication signal in response to the control signal from a decoder 48. The memory device 30 further includes a program memory 52 and an inverter 54 which inverts the bit width indn signal of the bit width indication signal line 50 to be supplied to the decoder 38. Fig. 3 is an internal construction diagram of the memory 32 which is constructed by small memories #0 to #15 to which respectively the write enable signal lines WE₀ to WE₁₅ and the data lines D₀ and D₁₅ are connected. Bach of these small memories is constructed 4k bits to which are assigned 4k addresses, and an identical address is supplied to all of them. That is, each bit of each word is stored housed respectively in an independent small memory. Next, the writing operation of the embodiment will be described. Suppose that addresses A₀ to A₁₅ are sent from the CPU 34. When a signal which indicates 16-bit width (call this signal "1") is inputted to the multiplexer 36 from the IO register 46 in accordance with the indication from the CPU 34, the multiplexer 36 outputs only addresses A₀ to A₁₁ to the memory 32. Here, the addresses A₁₂ to A₁₅ are not utilized. Then, the words in the memory 32 that corresponds to the addresses A₀ to A₁₁ are chosen. The signal "1" that is inputted to the bit width indication signal line 50 is sent also to the register 40. When the signal "1" is inputted to the register 40, it turns on all of the write enable signal lines 54 that are connected to each of the small memories #0 to #15 in the memory 32. The CPU 34 sends out to the data bus the data for 16 bits which are then supplied to the input and output circuit 42. Upon receipt of a write indication signal from the CPU 34 through the R/W signal line 56, the inut and output circuit 42 inputs the data for 16 bits to the 16 bits (D₀ to D₁₅) of the memory 32. The data signal for the 16 bits (D₀ to D₁₅) are sent to the small memories #0 to #15 where the data are written in since there is inputted the write enable signal to each of these small memories. Next, a description will be given of the case when a signal which indicates 1-bit width (this will be called signal "0") is inputted to the multiplexer 36 through the bit width indication signal line 50 from the IO register 46 in accordance with an indication from the CPU 34. In this case, the multiplexer 36 outputs only the word addresses A₄ to A₁₅ to the memory 32, while the lower addresses which represent the bit addresses A₀ to A₃ are sent to the decoder 38. The signal "0" that is inputted through the bit width indication signal line 50 is inverted by the inverter 54 to signal "1", and is sent to the decoder 38. Therefore, the decoder 38 interprets the input addresses A₀ to A₃ and turns on the corresponding write enable signal (one among WE₀ to WE₁₅). On the other hand, the data to be written into the corresponding one bit is sent through the data bus simultaneously, as an identical data for the 16 bits. The input and output circuit 42 inputs the identical data for 16 bits to the 16 bits (D₀ to D₁₅) of the memory 32 in accordance with the write indication signal from the R/W signal line 56. Although an identical data is inputted to the small memories #0 to #15 from D₀ to D₁₅ , respectively, there is only one of these memories #0 to #15 there is only one of these memories #0 to #15 to which the write enable signal is supplied. In that one small memory, the data is written into the bit corresponding to the word addresses A₄ to A₁₅. Referring to Fig. 4 there is shown an example of addresses that may be utilized in the present embodiment. Figure 4a is a construction diagram for the address data used for the case of an access with 1-bit width. The content of the upper portion A₄ to A₁₅ represents the word address of the memory 32, and in this example the word at address 13 is the one to be accessed. The content of the lower portion A₀ to A₃ indicates the one bit in the word to be accessed. In concrete terms, it is for indicating which one of the small memories (that is, it indicates which one of the write enable signals WE₀ to WE₁₅ is to be turned on), and in the case of the figure, WE₄ which is connected to the small memory #4 will be turned on. When this is translated into the positions for the word and bit, the data will be written into the fourth bit. Although descriptions have been given in the foregoing for the cases of bit widths of 16 and one bits, the present embodiment should not be limited of course only to these values, and is also applicable to the cases of 2-bit width, 4-bit width, and so forth. In Fig. 4b, there is shown a diagram illustrating an example of construction of addresses to be used in the case of access with 2-bit width in a word. In that case, the word addresses are shown by the content of the addresses A₃ to A₁₄, and the bit addresses, that is, the two write enable signals 54 to be turned on, are shown by A₀ to A₂ (here, A₁₅ is not needed). In the example, the bit for address 13 in the small memories is shown, and the content of A₀ to A₂ shows that the write enable signal lines WE₇ and WE₈ are to be turned on. When this is translated into the positions of word and bit, it shows that it corresponds to the fourth 2-bit from the left end of address 13 (precisely the seventh and eighth bits). In this case of access with 2-bit width, the data for the 2-bit groups are sent to the data bus (in this case, they may be sent as identical eight sets of 2-bit data or as a single set), and the input and output circuit 42 shown in Fig. 2 inputs the 2-bit data to each of (D₀D₁), (D₂D₃), ..., and (D₁₄D₁₅) of the memory 32. In Fig. 5 there is shown an internal construction of the decoder 38 which may be used for both cases of access with 2-bit width and with 1-bit width by switching between them. In the case of signal "1" which is inputted from the signal line 60, it indiates the 2-bit width, while in the case of signal "0" it indicates the 1-bit width. When the signal "0" is inputted to a selector 62 which is grounded, the signal "0" is sent to the decoder 38. When the signal "1" is inputted to the selector 62, the address A₃ is sent to the decoder 38. If "000" is inputted for the address A₂A₁A₀, for example, WE₀ alone is turned on by the decoder, but both of WE₀ and WE₁ are connected to the memory by the gate. For the case when an access with a plurality of bits is desired a device may be constructed in a similar manner. The present invention is not limited to the embodiment described in the foregoing, and can also be applied to the case of reading data that are memorized in the memory. In the operation for that case, the R/W signal line 56 in Fig. 2 supplies a read indication signal to the input and output circuit 42. Supplied also to the input and output circuit 42 are the addresses A₃-A₀ that are outputted to the decoder 38 (in the case of 1-bit width). Although the corresponding address bits in the small memories #0 to #15 are selected by the address output line 51 similarly to the case of writing, the input and output circuit 42 sends only the 1-bit data represented by the addresses A₃-A₀ to the read data bus through one of the lines D₀ to D₁₅. Though the situation in which the addresses A₃-A₀ are output to the input and output circuit 42 is not illustrated in Fig. 2, it will also suffice by simply outputting through D₀ to D₁₅ the 16-bit data for the small memories #0 to #15 that are selected by the address output line 51. Furthermore, although it is arranged in this embodiment to have the decoder control the write enable signals for writing, it may be replaced by one in which it controls the chip select signals instead.

Claims: A memory device (30) for writing and reading data, comprising: memory means (32) constructed so as to dispersedly memorize data with a plurality of bits; and control means (34,36,42,51,38,40) for driving said memory means so as to gain access at one time to data with a desired number of bits in order to write and read data with a first or a second bit width among data having at least first and second differing bit widths in said memory means (32), in which said control means comprises: an indication means (38,40) for outputting to the memory means (32) an indication signal which designates the desired bit width, characterized in that: said control means comprises; a selection means (36) for selectively shifting the significance of the address signals received by the memory device in accordance with the desired bit width, and for supplying at least the more significant of said shifted address signals to the memory means (32) for designating a word of said first bit width in the memory means; and means (36,38) for utilizing a number of the less significant of said address signals received by the memory device to select which bit positions, in the word designated by said more significant shifted address signals, are to be accessed. A memory device as claimed in claim 1, characterized in that: the control means further comprises an input and output circuit (42) for controlling the input and output of data to and from the memory means (32) in accordance with an R/W signal, and a CPU (34) for supplying a bit width indication signal to the selection means (36) through an IO register (460 and for supplying as well an R/W signal (56) to the input and output circuit (42). A memory device as claimed in claim 1 or 2. characterized in that: the memory means comprises a memory (32) which is constructed by a plurality of small memories to which the address signals are supplied in common, each memory being equipped independently with a data input and output line and a write and read control signal line, and the data with a plurality of bits that make up a word being memorized dispersedly at each of these small memories. A memory device as claimed in any preceding claim, in which the selection means comprises a multiplexer (36) which receives the address signals and the bit width indication signal, and outputs selectively the address signal that corresponds to the desired bit width. A memory device as claimed in any of the preceding claims 1 to 4, characterized in that the selection means (36) outputs to the memory means (32) all of the address signals designating data with the first bit width when access is made to the data with the first bit width of the two differing bit widths, and outputs to the memory means (32) a portion of the address signals designating data with the second bit width when access is made to only the data with the second bit width, and the indication means (38,40) receives as a selection signal for the desired bit positions the address signals that are not outputted from the selection means to the memory means (32),. A memory device as claimed in any of the preceding claims 1 to 5, characterized in that the indication means comprises a decoder (38) which receives as a position selection signal the address signals that are not output from the selection means (36) to the memory means (32) when making access to the data with the second bit width alone, and receives as well the bit width indication signal and outputs according to its address content, a write and read control signal to indicate the data with the second bit width to the write and read control signal line in the memory, and a register (40) which, making access to the data with the first bit width receives the bit width indication signal and outputs a write and read control signal to indicate the data with the first bit width to the write and read control signal line in the memory (32). A memory device as claimed in any of the preceding claims 1 to 6, characterized in that the first bit width is the entire bit width of a word, and the second bit width is a portion of the bit width of a word. A memory device as claimed in any of the preceding claims 1 to 7, characterized in that, the indication means further comprises a means which, when making access to a portion of bits in a word, supplies control signals for preventing the memory means from outputting signals to the input and output circuit (42) in order to let the input and output circuit (42) output only the data corresponding to the portion of the bits through the data input and output line. A memory device as claimed in any of the preceding claims, characterized by: selection means (36,46,48) for supplying selectively in said memory means address signals which designate a word consisting of a plurality of bits, to said memory means (32) corresponding to the desired bit width among at least two differing bit widths; and a CPU (34) for supplying a bit width indication signal to said selection means through an IO register (46), and for supplying as well an R/W signal to said input and output circuit (42). A memory device as claimed in claim 9, characterized in that the selection means comprises a multiplexer (36) for receiving the address signals and the bit width indication signal, and for outputting selectively address signals corresponding to the desired bit width. A memory device as claimed in claim 9 or 10, characterized in that the selection means (36) outputs to the memory means (32) all of the address signals designating data with the first bit width when access is desired to the data with the first bit width of the two differing bit widths, and outputs, when access is made to only the data with the second bit width, a portion of the address signals designating data with the second bit width, and the indication means (38,40) receives as a selection signal for the desired bit positions the address signals that are not outputted to the memory means (32) from the selection means (36). A memory device as claimed in claim 11, characterized in that the indication means comprises a decoder (38) which, when making access to the data with the second bit width alone, receives the address signals that are not outputted from the selection means (36) to the memory means (32), as a position selection signal, and receives as well the bit width indication signal and outputs, according to its address content, a write and read control signal to indicate the data with the second bit width to the write and read control signal line in the memory, and a register (40) which, when making access to the data with the first bit width, receives the bit width indication signal and outputs a write and read control signal to the write and read control signal line in the memory to indicate the data with the first bit width. A memory device as claimed in claim 12, characterized in that the first bit width is the entire bit width of a word, and the second bit width is a portion of the bit width of a word. A memory device as claimed in claim 13, characterized in that the indication means further comprises a means which, when making access to a portion of bits in a word, supplies control signals for preventing the memory means (36) from outputting signal to the input and output circuit (42) in order to let the input and output circuit (42) output only the data corresponding to the portion of the bits through the data input and output line. An image display system characterized by a memory device according to any one of claim 1 to 14.

Inventors: AIKAWA, TAKESHI, MORI, AKIO, SAITO, MITSUO
Applicants: KABUSHIKI KAISHA TOSHIBA
Application year: 1985
Main classification: G11C7
IPC codes: G09G5, G11C7, G06F12, G11C8, G06F3