Patent Publication Number: US-7898883-B2

Title: Method for controlling access of a memory

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
     This application claims the priority benefit of Taiwan application serial no. 97100191, filed on Jan. 3, 2008. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of specification. 
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention generally relates to a method for controlling access of a memory, in particular, to a controlling method capable of determining whether to execute cyclic redundancy check (CRC) for the memory. 
     2. Description of Related Art 
     In communication systems or computer systems, the CRC can be used to improve the error check capability. After data transmission or data storage, the CRC can be used to check whether an error occurs during the data transmission. During the data transmission, both the receiver and the transmitter must perform the CRC operation, and then one of them compares CRC operation results from both the two parties, so as to know whether an error occurs on received data. 
     As the data transmission speed of the computer systems becomes increasingly high, the data transmission accuracy cannot be guaranteed by the existed memory structure. Therefore, in the next generation of the memory structure, the CRC function can be applied to the memory access operation, so as to ensure the data transmission accuracy. However, the conventional memory structure is incompatible with the next generation memory structure because of the conventional memory structure without supporting the CRC function. 
     That is, if the next generation memory structure and the conventional memory structure are used together in a computer system, the CRC function of the next generation memory structure need to be disabled, otherwise a problem may occur on the system operation. 
     On the other hand, if all memories in the computer system support the CRC function, it is better to enable the CRC function, so as to enhance the system performance. 
     SUMMARY OF THE INVENTION 
     Accordingly, the present invention is directed to a method for controlling access of a memory, for solving incompatibility between the memory supporting the CRC function and conventional memory that does not support the CRC function. 
     According to an aspect of the present invention, a memory control method is provided, which includes: decoding a read-write command to generate a mode register set (MRS) signal; decoding a bank-select signal, when the MRS signal is enabled, so as to generate a register-select signal; selecting at least one register from a plurality of registers according to the register-select signal for writing an address signal to the selected register; and determining whether to enable an error check function or not according to a value of the selected register. 
     To sum up, in the present invention, if any conventional memory transmission structure that does not support the CRC function is used in computer systems, the CRC function may be turned off, such that the memory compatibility is good enough. Alternatively, if all memories used in a computer system support the CRC function, the CRC function can be turned on, so as to improve the system performance. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention. 
         FIG. 1  is a simplified schematic view of a memory  100 . 
         FIG. 2  is a block diagram of a control for a memory  100  according to an embodiment of the present invention. 
         FIG. 3  is a schematic timing chart of a command decoder  200 . 
     
    
    
     DESCRIPTION OF THE EMBODIMENTS 
     Reference will now be made in detail to the present embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts. 
     According to an embodiment of the present invention, a memory control method and a memory structure are provided, which are capable of determining whether the CRC function is enabled/disabled according to the actual situation. It is better that when all the memory modules in the system can support the CRC function, the CRC function is enabled so as to enhance the system performance. That is, if any memory module in the system cannot support the CRC function, it is better not to enable the CRC function, otherwise an error may occur. 
     Referring to  FIG. 1 , it is a simplified schematic view of a memory  100 . Definitely, the memory  100  has other I/O pins, but in order to simplify the description, other I/O pins are not shown in the figure. 
     As shown in  FIG. 1 , the I/O pins of the memory  100  at least include: an address pin, for receiving address signals on an address bus ADD_BUS; a command pin, for receiving command signals (including the column strobe signal  CAS , the row strobe signal  RAS , the write enable signal  WE , and the chip select signal CS) on a command bus CMD_BUS; power pins, for respectively receiving power sources VDD and VSS; a clock pin, for receiving a clock signal CLK; and a data pin, for receiving data signals on a data bus DATA_BUS. 
     The memory  100  determines whether to enable the CRC function according to the received address signals and the received command signals. Under the situation that the CRC function is not enabled, an error check operation result CRC_V is not outputted to the data bus DATA_BUS; and under the situation that the CRC function is enabled, the error check operation result CRC_V is outputted to the data bus DATA_BUS. 
       FIG. 2  is a block diagram for controlling a memory  100  according to an embodiment of the present invention, in which it is determined whether to enable the CRC function. Here, the address signal ADD&lt; 0 : 12 &gt; is, for example, 13 bits, and the bank-select signal BS&lt; 0 : 1 &gt; is, for example, 2 bits. Definitely, this embodiment is not limited here. 
     A receiving unit  210  receives the clock signal CLK, the address signals on the address bus ADD_BUS, and the command signals on the command bus CMD_BUS. Particularly, the receiving unit  210  decodes signals on the address bus ADD_BUS into the address signal ADD&lt; 0 : 12 &gt; and the bank-select signal BS&lt; 0 : 1 &gt;. In addition, the receiving unit  210  decodes the signals on the command bus CMD_BUS to the row address strobe signal  RAS , the column address strobe signal  CAS , the write enable signal  WE , and the chip select signal CS. 
     The command decoder  220  decodes the row address strobe signal  RAS , The column address strobe signal  CAS , the write enable signal  WE , and the chip select signal CS, and generates one signal which is called mode register set (MRS). The signal MRS is used to enable the latch  230 . Referring to  FIG. 3 , it is a timing chart of the row address strobe signal  RAS , the column Address strobe signal  CAS , the write enable signal  WE , and the signal MRS. As shown in  FIG. 3 , when the row address strobe signal  RAS , the column address strobe Signal  CAS , and the write enable signal  WE  are all logic low, and the chip elect signal CS is logic high, the signal MRS is enabled. Definitely, this embodiment is not limited here. 
     The latch  230  may further receive the address signal ADD&lt; 0 : 12 &gt; and the bank-select signal BS&lt; 0 : 1 &gt;. For example, when the signal MRS is enabled, the latch  230  outputs the latched address signal ADD&lt; 0 : 12 &gt; and the latched bank-select signal BS&lt; 0 : 1 &gt;. 
     The decoder  240  decodes the bank-select signal BS&lt; 0 : 1 &gt; into a register-select signal SEL&lt; 0 : 3 &gt;. 
     The decoder  250  decodes the register-select signal SEL&lt; 0 : 3 &gt; into register-select signals SELp 0 , SELp 1  . . . The register-select signals SELp 0 , SELp 1  . . . may be used to enable the register groups  260 - 0 ,  260 - 1 , and so on respectively. 
     Here, the register group includes, for example, 13 registers. The address signal ADD&lt; 0 : 12 &gt; is written to the enabled register group. For example, when the register group  260 - 1  is enabled, the address signal ADD&lt; 0 : 12 &gt; may be written into 13 registers in the register group  260 - 1 . 
     In this embodiment, an output value of a certain register may be taken as a CRC function enable signal CRC_EN, so as to control whether to enable the CRC function. The certain register is, for example, a mode register setting (MRS) register  260 - 1   a  in the register group  260 - 1 . 
     A CRC unit  270  may receive a data DQ from the data bus DATA_BUS and perform a CRC operation to the data DQ, so as to generate an error check operation result CRC_V. When the CRC function enable signal CRC_EN is enabled, the CRC unit  270  may be enabled, such that the CRC unit  270  generates the error check operation result CRC_V. On the contrary, when the CRC function enable signal CRC_EN is disabled, the CRC unit  270  may be disabled, such that the CRC unit  270  does not generate the error check operation result CRC_V. Definitely, the CRC function enable signal CRC_EN can also control other I/O circuits in the memory  100 , so as to ensure that no error occurs to the data output of the memory  100 . 
     The embodiment of the present invention can be applied to a memory for high speed/bulk data (for example, DDR4), such that it is compatible with the conventional memory structure. 
     It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.