The present invention relates to a technique of buffering access data in a memory system for performing access control between an external interface and a nonvolatile memory in response to an access request from the outside and, for example, to a technique effectively applied to a flash memory card.
A flash memory card has a flash memory and a controller. Since the operation speed, particularly, writing or rewriting operation speed of the flash memory is lower than operation speed of a host connected to the flash memory card, the controller has a buffer memory in order to absorb the difference between the operation speeds. In response to a write request from the outside, the controller controls to input write data from the outside to the buffer memory and write the input data into the flash memory. In response to a read request from the outside, the controller temporarily stores data read out from the flash memory into the buffer memory and outputs the stored data to the outside. As a conventional buffer memory, an SRAM (Static Random Access Memory) of a relatively small capacity, a static latch, or the like is often employed.
In the case of employing an SRAM of a small capacity, however, until writing of data input from the outside to the buffer memory into the flash memory is completed, data transfer from the host to the memory card has to be waited. Until read data stored in the buffer memory from the flash memory is output to the outside, a new reading operation of the flash memory has to be waited. Particularly, in the case where writing of data into the flash memory fails, for example, when the data has to be written again to a replacing sector due to a failure in a sector to which the writing operation is performed first, the next write data from the host cannot be received by the buffer memory. Consequently, due to a problem between the flash memory and the controller, data transfer between the host and the controller has to be waited. It increases burden on the host and processing time, and a problem such that the data processing efficiency deteriorates occurs.
In a process of examining the problems, the inventor herein has recognized the existence of patent applications, although not well known, filed by the applicant herein. The patent application Nos. are 2001-174978, 2001-177924, 2001-213639, and 2001-213640. The applications provide a technique using a flash memory as a nonvolatile memory for backing up information stored in an SDRAM as a volatile memory. The SDRAM is not evaluated as a buffer memory.
An object of the present invention is to provide a memory system contributing improvement in efficiency of a data process accompanying a memory access.
Another object of the invention is to provide a memory system for performing an access control between an external interface and a nonvolatile memory in response to an access request from the outside, which can contribute to reduction in waiting time of a host in data transfer to/from the host, reduction in process load, and reduction in process time.
The above and other objects and novel features of the invention will become apparent from the description of the specification and the accompanying drawings.
Representative ones of inventions disclosed in the specification will be briefly described as follows.
[1] A memory system has a rewritable nonvolatile memory, a buffer memory, and a controller. The controller controls, in response to an access request from an external apparatus, first data transfer between the controller and the external apparatus, second data transfer between the controller and the nonvolatile memory, and third data transfer between the controller and the buffer memory, controls transfer from the controller to the buffer memory and transfer from the buffer memory to the controller in the third data transfer in a time sharing manner, and enables the first data transfer or the second data transfer to be performed in parallel with the transfer carried out in the time sharing manner.
With the above configuration, in response to a write access request from the outside, the controller stores write data to the buffer memory and outputs the write data stored in the buffer memory in a time sharing manner, in parallel with the write data storing process, can transfer write data to the nonvolatile memory by the second data transfer and, in parallel with the write data outputting process, input the following write data from the external apparatus by the first data transfer. In response to a read access request from the outside, the controller stores read data to the buffer memory and outputs the read data stored in the buffer memory in a time sharing manner, in parallel with the read data storing process, can transfer the read data to the external apparatus by the first data transfer and, in parallel with the read data outputting process, input the following read data from the nonvolatile memory by the second data transfer.
By the buffering function of the buffer memory, long waiting time is unnecessary for the timing of supplying a plurality of write data pieces by an external apparatus such as a host, and long waiting time is unnecessary for the timing of obtaining a plurality of read data pieces by the host. Therefore, the invention can contribute to reduction in waiting time of the host in the data transfer between the host and a controller, reduction in a process load, and reduction in processing time. Thus, the invention can contribute to improvement in the efficiency of a data process accompanying a memory access.
As a desired mode of the invention, in order to maximally display the buffering function, operation speed of the third data transfer is about twice as high as data transfer speed of the first data transfer. In theory, the waiting time of the host becomes zero.
As a desired mode of the invention, the buffer memory is a single-port clock-synchronous volatile memory and operates in an FIFO manner. Higher speed of the buffer memory and easy access control can be realized. The nonvolatile memory is, for example, a flash memory.
As a mode of realizing buffering between the first transfer and the third transfer and buffering between the second transfer and the third transfer, preferably, the controller has a dual-port data buffer disposed between the external apparatus and the buffer memory and a dual-port data buffer disposed between the buffer memory and the nonvolatile memory. Control for paralleling the first data transfer and the third data transfer and paralleling the second data transfer and the third data transfer is further facilitated.
[2] A memory system according to another aspect of the invention has a rewritable nonvolatile memory, a buffer memory, and a controller. The controller has: a first data transfer control unit connected to an external apparatus; a second data transfer control unit connected to the nonvolatile memory; and a transfer arbitrator which is connected to the buffer memory and controls data transfer to/from the buffer memory in response to a transfer request from the first data transfer control unit and a transfer request from the second data transfer control unit. The first data transfer control unit is connected to the external apparatus and the transfer arbitrator via a dual-port data buffer and outputs a transfer request to the transfer arbitrator. The second data transfer control unit is connected to the nonvolatile memory and the transfer arbitrator via a dual-port data buffer and outputs a transfer request to the transfer arbitrator. The transfer arbitrator controls transfer of write data to the buffer memory and transfer of read data from the buffer memory in a time sharing manner in response to a transfer request from the first data transfer control unit and a transfer request from the second data transfer control unit.
With the above configuration, the data transfer between the external apparatus and the controller is buffered by the data buffer in the first data transfer control unit, the data transfer between the nonvolatile memory and the controller is buffered by the data buffer in the second data transfer control unit, and the data transfer between both of the data buffers and the butter memory can be performed in a time sharing manner. Therefore, in response to a write access request from the outside, the controller stores write data into the buffer memory and outputs the write data stored in the buffer memory in a time sharing manner. In parallel with the write data storing process, transfer of write data from the data buffer in the second transfer control unit to the nonvolatile memory can be performed. In parallel with the write data outputting process, the following write data from the external apparatus can be transferred to the data buffer in the first transfer control unit. In response to a read access request from the external apparatus, the controller stores read data into the buffer memory and outputs the read data stored in the buffer memory in a time sharing manner. In parallel with the read data storing process, transfer of read data from the data buffer in the first transfer control unit to the external apparatus can be performed. In parallel with the read data outputting process, the following read data from the nonvolatile memory can be transferred to the data buffer in the second transfer control unit.
By the buffering function, long waiting time is unnecessary for the timing of supplying a plurality of write data pieces by an external apparatus such as a host, and long waiting time is unnecessary for the timing of obtaining a plurality of read data pieces by the host. Therefore, the invention can contribute to reduction in waiting time of the host in the data transfer between the host and a controller, reduction in a process load, and reduction in processing time. Thus, the invention can contribute to improvement in the efficiency of a data process accompanying a memory access.
As a concrete mode of the invention, in response to a write access request from the outside, the first data transfer control unit outputs a transfer request for writing data to the buffer memory to the transfer arbitrator when a predetermined amount of data is stored in the data buffer from the external apparatus, and the second data transfer control unit outputs a transfer request for reading data from the buffer memory to the data buffer to the transfer arbitrator when data in the data buffer is less than the predetermined amount. In response to a read access request from the outside, the second data transfer control unit outputs a transfer request for writing data to the buffer memory to the transfer arbitrator when a predetermined amount of data is stored in the data buffer from the buffer memory, and the first data transfer control unit outputs a transfer request for reading data from the buffer memory to the transfer arbitrator when data in the data buffer is less than the predetermined amount.
As a desired mode of the invention, in order to maximally display the buffering function, preferably, operation speed of the data transfer to/from the buffer memory by the transfer arbitrator is about twice as high as operation speed of data transfer to/from the outside by the first transfer control unit. In theory, the waiting time of the host becomes zero.
As a desired mode of the invention, the buffer memory is a single-port clock-synchronous volatile memory and operates in an FIFO manner. Higher speed of the buffer memory and easier access control can be realized. The nonvolatile memory is, for example, a flash memory.
The flash memory 2 has, although not particularly shown, a memory cell array in which electrically erasable and writable flash memory cells are arranged in a matrix. The flash memory cell has, although not limited, a floating gate and a control gate isolated from each other via an insulating film on a channel region. For example, by injecting hot electrons into the floating gate, the threshold voltage of the memory cell is increased (this operation is called, for example, writing). By discharging electrons injected in the floating gate by a tunneling current via a gate insulating film, the threshold voltage of the memory cell is lowered (this operation is called erasing). The drain of the flash memory cell is connected to a bit line, the source is connected to a source line, and the control gate is connected to a word line. For example, an address assigned to the word line is the sector address. Selection of a word line by a sector address signal is performed by a word line selecting circuit. A part of a plurality of flash memory cells designated by a sector address is selected on the basis of a column address signal generated by a column address counter by using a column address as a starting point. The flash memory can employ, for example, the configuration disclosed in Japanese Unexamined Patent Application No. 2001-23383.
The flash memory 2 functions as, for example, a file memory. In local memory address mapping, as shown in
The buffer memory 5 takes the form of, for example, a single-port SDRAM (Synchronous Dynamic Random Access Memory) as a clock synchronous volatile memory. The buffer memory 5 will be also simply described as SDRAM 5. The SDRAM 5 has, for example, a memory cell array in which dynamic memory cells are arranged in a matrix, receives a command, an address, and the like synchronously with clocks, and can perform a write access, a read access, or the like designated by a command synchronously with clock signals at high speed. For example, when it is assumed that the speed of a data transfer (first data transfer) via a bus between the host 3 and the controller 4 is 100 MB (megabytes)/sec, the speed of a data transfer (third data transfer) via a bus between the SDRAM 5 and the controller 4 is 266 MB/sec which is more than twice as high as that of the first data transfer. The speed of a data transfer (second data transfer) via a bus between the flash memory 2 and the controller 4 is about 20 MB/sec so as to be matched with access speed of the flash memory 2 itself which is low.
The controller 4 is constructed by a host data transfer control unit (first data transfer control unit) 11, a flash data transfer control unit (second data transfer control unit) 12, a transfer arbitrator 13, a CPU 14, and a control register 15.
The control register 15 has a command register (15C), an address register (15A), and a status register (15S). At the time of accessing the flash memory card 1, the host 3 sets a read or write command in the command register 15C and sets an access address in the address register 15A. States of the host 3 and the flash memory card 1 are mutually recognized via the status register 15S.
The CPU 14 generally controls the flash memory card 1. When a command is set in the command register 15C, the CPU 14 interprets the command, and performs a control on a memory interface with the flash memory 2, a control on a data interface with the host 3, a buffer control on data subjected to the interface control, and the like, thereby completing an access to a sector in the flash memory 2 corresponding to the address set in the address register 15A.
The host data transfer control unit 11 connects the host 3 and the transfer arbitrator 13 via a dual-port data buffer 20. When a transfer request circuit 21 sends a transfer request to the transfer arbitrator 13 by a signal HDRQ, and receives acknowledgment by a signal HDACK, the data buffer 20 inputs/outputs data from/to the transfer arbitrator 13. The inputting or outputting operation is instructed to the transfer arbitrator 13 by the host data transfer control unit 11 by using a signal HDIR. The signal HDIR is set in the host data transfer control unit 11 before the CPU 14 starts a transferring operation. When an amount of the input or output operation to/from the transfer arbitrator 13 of the data buffer 20 started in response to the acknowledge by the signal HDACK reaches a specific amount, the host data transfer control unit 11 asserts a signal HEND_IRQ to the CPU and finishes the transfer operation. The CPU 14 allows the transfer arbitrator 13 to accept a new transfer request. The host data transfer control unit 11 can instruct the host 3 to stop the operation by outputting a wait signal HWAIT to the host 3 and asserting the signal.
Although not shown, whether the transfer operation between the data buffer 20 and the host 3 can be performed or not is determined by exchanging the status via the status register 15S. When seen from the host 3, the data buffer 20 is mapped in its address space.
The flash data transfer control unit 12 connects the flash memory 2 and the transfer arbitrator 13 via a dual-port data buffer 22. The data buffer 22 takes the form of a dual-port FIFO buffer. When a transfer request circuit 23 sends a transfer request to the transfer arbitrator 13 by a signal FDRQ and receives acknowledgment by a signal FDACK, the data buffer 22 inputs/outputs data from/to the transfer arbitrator 13. The inputting/outputting operation is instructed by the flash data transfer control unit 13 to the transfer arbitrator 13 by using a signal FDIR. The signal FDIR is set in the flash data transfer control unit 12 before the CPU 14 starts transferring operation. When an amount of the inputting/outputting operation to the transfer arbitrator 13 of the data buffer 22 started in response to the acknowledgment by the signal FDACK reaches a specific amount, the flash data transfer control unit 12 asserts a signal FEND_IRQ to the CPU and finishes the transfer operation. In response to this, the CPU 14 allows the transfer arbitrator 13 to accept a new transfer request. Although not shown, the flash data transfer control unit 12 determines whether the transfer operation between the data buffer 22 and the flash memory 2 can be performed or not by exchanging the status via the status register of the flash memory 2.
The transfer arbitrator 13 is constructed by a transfer permission circuit 30, an address counter 31 for host data transfer, and an address counter 32 for flash data transfer. The address counter 31 for host data transfer generates an access address of the SDRAM 5 in data transfer between the data buffer 20 and the buffer memory 5. The address counter 32 for flash data transfer generates an access address of the SDRAM 5 in data transfer between the data buffer 22 and the flash memory 2. An address is preset in the address counters 31 and 32 by the CPU 14 in response to an access request from the host 3. The access to the SDRAM 5 is controlled in an FIFO manner as illustrated in
As obviously understood from
When the process responding to the host data transfer request in
When the process performed in response to the host transfer request in
The host 3 outputs an address value to the address register 15A in the controller 4 and a write transfer command to the command register 15C in the controller 4 and reads the status set in the status register 15S of the controller 4. After reading a transfer enable status, the host 3 transfers data to the data register in the data buffer 20. The data transfer is performed on a block unit basis and each block consists of, for example, eight bytes. The controller 4 gives the flash memory 2 a sector address value for writing and a write transfer command. When data of a data block 1 is received, the controller 4 writes the data into the SDRAM 5. A write cycle at this time is indicated by Tdw. The data of the data block 1 written is read from the SDRAM 5 to the controller 4. A read cycle at this Lime is indicated by Tdr. The data of the data block 1 read to the controller 4 is transferred to the flash memory 2. While the SDRAM 5 performs the write cycle Tdw and the read cycle Tdr on the data of the data block 1, the host 3 outputs data of the following data block 2 toward the buffer 20 in the controller 4. When the data of the data block 1 is transferred to the flash memory 2, the write cycle and the read cycles on the data of the data block 2 are performed by the SDRAM 5 in a time sharing manner. A process similar to the above is performed on data up to a data block 4.
According to the example, when the controller 4 reads the data of the data block 3 from the port on the transfer arbitrator 13 side of the data buffer 20, stores it into the SDRAM 5 (Ti to Tj) and, subsequently, stores the data stored in the SDRAM 5 into the data buffer 22 from the port on the transfer arbitrator 13 side (Tj to Tk), the data of the following data block 4 is input to the data buffer 20 from the port on the host 3 side of the data buffer 20 and the data of the data block 2 preceding to the data block 3 is transferred to the flash memory 2 from the port on the flash memory 2 side of the data buffer 22. In short, in response to a write access request from the host 3, the controller 4 stores write data to the SDRAM 5 and outputs the write data stored in the SDRAM 5 in a time sharing manner. In parallel with the process of storing write data into the SDRAM 5, the write data can be transferred to the flash memory 2. In parallel with the process of outputting the write data from the SDRAM 5, the next write data can be input from the host 3.
In the example of
The host 3 outputs an address value to the address register 15A and a read transfer command to the command register 15 in the controller 4. The controller 4 supplies the address value and the flash read transfer command to the flash memory 2. In response to the command, the flash memory 2 sequentially reads out the data in the data blocks 1 to 4 synchronously with the clock signal F_CS. In
According to the example, during the controller 4 reads out the data of the data block 3 from, for example, the port on the transfer arbitrator 13 side of the data buffer 22, stores the read data into the SDRAM 5 (Tp to Tq) and, subsequently, stores the data stored in the SDRAM 5 into the data buffer 20 (Tq to Tr), the data of the next data block 4 is input from the port of the flash memory 2 side of the data buffer 22 to the data buffer 22 and the preceding data of the data block 2 is supplied from the port on the side of the host 3 of the data buffer 20 to the host 3. In short, in response to the read access request from the host 3, the controller 4 stores the read data into the SDRAM 5 and outputs the read data stored in the SDRAM 5 in a time sharing manner. In parallel with the process of storing the read data into the SDRAM 5, the host 3 can fetch the read data from the buffer memory 20. In parallel with the process of outputting the read data from the SDRAM 5, a process of inputting the next read data from the flash memory 2 to the buffer memory 22 can be performed.
By the buffering function using the SDRAM 5 of the controller 4, long waiting time is not required for the timing of supplying a plurality of write data pieces by the host 3, and long waiting time is not required for the timing of obtaining a plurality of read data pieces by the host 3. Therefore, the invention can contribute to reduction in waiting time of the host 3 regarding data transfer between the host 3 and the controller 4, reduction in a processing load, and reduction in process time. It can improve efficiency of the data process accompanying an access to the flash memory card 1.
Although the invention achieved by the inventor herein has been described concretely on the basis of the embodiments, obviously, the invention is not limited to the embodiments but can be variously changed without departing from the gist.
For example, the nonvolatile memory is not limited to a flash memory but may be a rewritable nonvolatile memory employing other storing methods such as a high-dielectric-constant memory. The number of information memory bits per memory cell is not limited to one bit but may be two or more bits. The memory system is not limited to a flash memory card such as a PC card but can be constructed on a processor board on which a data processor is mounted. The data buffer in the host interface part in the controller and the data buffer in the nonvolatile memory interface part are not limited to a dual-port type but may be a memory of a single port, a register, or a latch circuit. In short, any device may be used as long as data can be input/output in the host interface part or flash interface part in parallel with data transfer to a buffer memory in a time sharing manner.
Effects produced by representative ones of the inventions disclosed in the specification will be briefly described as follows.
In response to a write access request from the outside, the controller can store write data to the buffer memory and output the write data stored in the buffer memory in a time sharing manner. By using a data buffer of a dual port type, write data can be transferred to the nonvolatile memory (second data transfer) in parallel with the write data storing process, and the following write data from an external apparatus can be input (first data transfer) in parallel with the write data outputting process.
In response to a read access request from the outside, the controller can store read data to the buffer memory and output the read data stored in the buffer memory in a time sharing manner. By using a data buffer of a dual port type, read data can be transferred to an external apparatus (first data transfer) in parallel with the read data storing process, and the following read data from the nonvolatile memory can be input (second data transfer) in parallel with the read data outputting process.
In such a manner, long waiting time is unnecessary for the timing of supplying a plurality of write data pieces by an external apparatus such as a host, and long waiting time is unnecessary for the timing of obtaining a plurality of read data pieces by the host. Therefore, the invention can contribute to reduction in waiting time of the host in the data transfer between the host and a controller, reduction in a process load, and reduction in processing time. Thus, the efficiency of a data process accompanying a memory access can be improved.
Number | Date | Country | Kind |
---|---|---|---|
2002-030191 | Feb 2002 | JP | national |
Number | Date | Country | |
---|---|---|---|
Parent | 10341367 | Jan 2003 | US |
Child | 10404547 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 13270224 | Oct 2011 | US |
Child | 14243330 | US | |
Parent | 12251444 | Oct 2008 | US |
Child | 13270224 | US | |
Parent | 11785177 | Apr 2007 | US |
Child | 12251444 | US | |
Parent | 11082859 | Mar 2005 | US |
Child | 11785177 | US | |
Parent | 10404547 | Apr 2003 | US |
Child | 11082859 | US |