Abstract:
Timing is set for DRAM memory access in a computer by polling the DRAM memory banks, calculating capacitive load by accessing a prestored table of capacitive load versus DRAM size, and assigning wait states according to calculated capacitive load by accessing a prestored formula. In one embodiment, wait states are assigned in increasing increments for increasing total capacitive load. In an alternative embodiment, timing is assigned bank by bank. Control routines are preferably a part of a system BIOS.

Description:
FIELD OF THE INVENTION 
     This invention is in the area of computer memory systems and pertains in particular to dynamic random access memory (DRAM). 
     BACKGROUND OF THE INVENTION 
     The present invention is in the area of DRAM memory systems. DRAM is a very widely used form of memory in computer systems today, and a useful reference for understanding DRAM and potential problems with its use is Microprocessor Based Design, by Michael Slater, Copyright 1989 by Prentice-Hall, Inc. Chapter 4, Section 4.7, pages 200-215 is incorporated herein by reference. 
     As may be seen in more detail in the pages of the reference incorporated above, each DRAM chip in a memory system is an integrated circuit with multiple transistor and capacitor elements that comprise an array of data cells. In operation of DRAM, to prevent data loss through charge leakage from the capacitor elements of the storage structures, data cells must be refreshed (energized) hundreds of times per second. 
     In a system with DRAM, a microprocessor-based CPU typically manages system operations, initiating read and write cycles to and from ZDRAM, and the CPU of such a system typically operates at a high frequency, the period for which may well be shorter than the cycle time for DRAM operation. The CPU must therefore impose time delays in its read and write operations to allow for delays in reading and writing DRAM. These time delays, called wait states, which are typically set according to programmed information in a system basic input output system (BIOS) at startup, may impose serious limitations on system performance. 
     The capacitive nature of DRAM has to be considered in a number of ways in system design and development. For example, charging and discharging of the capacitors in DRAM slows transitioning of address and control signals which interface directly with DRAM cells. Also, wiring DRAM chips in parallel increases capacitive load on address and control lines. In addition to these potential difficulties, row and column addresses are often multiplexed in high-performance computer systems to reduce the number of pins required for communication and control, and this circumstance increases the amount of time required to supply a complete memory address. 
     Many approaches have been taken by hardware and system designers to improve DRAM timing. For example, enhanced addressing and refresh techniques and signal path packaging are incorporated to minimize propagation delays. But these efforts have not completely solved the inherent problems. 
     In system design, wait states are typically assigned according to worst case expectations. This is a safe approach, since all other situations may be expected to fall within the worst case. In this approach, a system with a relatively light capacitive load may have the same delay restrictions imposed as one with a much larger capacitive load. For example, a 1-megabyte module with 4 chips might be needlessly slowed down by being assigned the same number of wait states as a 16-megabyte module with 36 chips. What is needed is a method to avoid the necessity for worst case assignment, so timing may be set more closely to actual circumstances. 
     SUMMARY OF THE INVENTION 
     In a preferred embodiment of the present invention, a method for setting wait states for dynamic random access memory (DRAM) timing in a computer system is provided comprising the steps of: (a) detecting memory size for each DRAM bank; (b) determining capacitive load for each DRAM bank by accessing a pre-stored table relating memory size detected in step (a) to capacitive load; (c) summing total capacitive load for all DRAM memory in system configuration; and (d) assigning wait states for DRAM timing by accessing prestored information relating wait states to be assigned to total capacitive DRAM load. In an alternative embodiment timing is set individually, bank by bank. 
     In a preferred embodiment, control routines for assigning wait states for DRAM timing are a part of a system BIOS. The ability to detect actual memory size and to relate the memory size to capacitive load, allows timing to be set for individual computers much closer to actual existing conditions, providing optimized computer speed in each case. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a portion of a computer system configured according to a preferred embodiment of the present invention. 
     FIG. 2 is a logic flow diagram depicting a process guided by system BIOS to set timing for the embodiment shown in FIG. 1. 
     FIG. 3 is an example of a data table used by the process of FIG. 2. 
     FIG. 4 is a logic flow diagram of a process to set timing according to an alternative embodiment of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 is a quite generalized block diagram of a portion of a computer system including a CPU 10, a system bus 12, a basic input output system (BIOS) 14 including unique timing determination routines according to the present invention, and a DRAM memory array 11. DRAM array 11 includes associated elements, such as refresh interfacing circuitry. DRAM array 11 is meant to represent any number of chips that may comprise a DRAM array. 
     Memory address (MA) lines 17, a part of system bus 12, run through a buffer 19 that is capable of driving highly capacitive loads to drive the DRAM addresses, and these lines are used to assert both column address and row address at different times, as is well known in the art. Data lines 20 input and output data to and from DRAM array 11. 
     In FIG. 1, row address strobe (RAS) 21 and column address strobe (CAS) 23 control timing during row and column address inputs and determine delay between memory address input and output. The row address must be stable some time before RAS is asserted, known as setup time, and for some time after RAS is asserted, known as hold time. In addition, setup and hold times for the column address must be met. 
     It is known in the art that delays in addressing increase with the amount of capacitive load in a memory system and, at some point, memory will become unstable unless sufficient hold time is allotted in the form of one or more wait states to accommodate the load induced delay. Such wait states are allotted, typically on startup and reset, usually on a worst-case basis. That is, the firmware that assigns the wait states, typically the system BIOS, may be used in a number of different models and variations of computer systems, and, to be safe, the number of wait states assigned must fit the worst expected case, usually that system or variation with the largest DRAM array. FIG. 2 is a logic flow diagram of a step-by-step process, according to an embodiment of the present invention, wherein timing control routines automatically set wait states according to an anticipated capacitive load that is based on actual memory size of each system configuration rather than for a worst-case basis. FIG. 3 is an exemplary table of DRAM module size correlated with expected capacitive load for each module size. 
     Step 49--Access Timing Control Routines. Timing control routines, in a preferred embodiment, reside in system BIOS. The BIOS executes the control routines (as well as other BIOS functions) at each startup and reset to set wait states for DRAM timing. 
     Step 51--Detect Memory Size, Each Bank. 
     BIOS conventionally polls system random-access memory at startup. The timing control routines access this data for timing determination. 
     Step 53--Calculate Estimated Load, Each Bank. Timing control routines extract from a data table, such as Table 59 shown in FIG. 3, a capacitive load value for each bank or SIMM in the DRAM configuration. Data table 59 contains two columns: column A lists different memory sizes, in bytes, that might comprise a memory bank or SIMM, and column B lists corresponding expected capacitive loads, in pico-Farads, that are assigned by a designer to best represent each memory size. 
     Step 55--Calculate Total Load. The timing control routines sum capacitive load, in pico-Farads, for all banks or SIMMS in the DRAM configuration. 
     Step 57--Set Timing Based on Total Load. 
     The timing control routines compare the total capacitive load to one or more predefined load thresholds and, based on the load, set timing as a corresponding pre-defined number of wait states. An example of logic that might be used is given below, where two timing thresholds are used, and variables x and y are low and high threshold limit, respectively: 
     If load&lt;x, set fast timing (e.g., 0 wait states added). 
     If x&lt;load&lt;y, set moderate timing (e.g., 1 wait state added). 
     If load&gt;y, set slow timing (e.g., 2 wait states added). 
     In variations of the above-described embodiment, more test thresholds might be incorporated in the control logic to more finely tune DRAM timing. 
     FIG. 4 is a logic flow diagram of a process according to an alternative embodiment of the present invention where DRAM timing is set separately for each bank in a DRAM configuration. This method is described below. 
     Step 63--Access Timing Control Routines 
     BIOS executes timing control routines on startup and reset along with conventional BIOS functions. 
     Step 65--Detect Memory Size, Each Bank. 
     BIOS conventionally polls system random-access memory at startup. The timing control routines access this data for timing determination. 
     Step 67--Calculate Load, Each Bank. 
     From a data table, such as that in FIG. 3, timing control routines extract capacitive load, in pico-Farads, for each bank in the memory configuration. 
     Step 69--Set Separate Timing, Each Bank. 
     For each bank, timing control routines compare calculated load to predefined load thresholds and set timing wait states, using the same or similar logic to that described for Step 57 in FIG. 2. 
     With timing specified individually for each bank as shown in the embodiment described by FIG. 4, individual banks with relatively low total capacitance are assigned relatively fast timing, and timing for banks with higher total capacitance are assigned more wait states. 
     It will be apparent to one with skill in the art that there are a relatively large number of changes that may be made in the embodiments described above without departing from the spirit and scope of the invention. For instance, load thresholds may vary and bank or SIMM groupings differ. Also, the integration of code in BIOS may vary. Many other alternatives can fall within the scope and spirit of the invention.