METHOD AND APPARATUS FOR MEMORY SIZE SELECTION

Abstract: A memory controller (17) for defining memory size in an interleaved multiple bank (20A, 20D) dynamic random access memory or DRAM memory system is described. The system ensures that an associated central processing unit or CPU (10) can access a continuous memory array. The offset is selected according to the memory size. A memory controller (17) that is capable of controlling a given size DRAM selects memory below the maximum size by asserting a high or low level on the most significant address pins (Q6-Q11). By reading the input, the controller (17) can determine that memory space is not available on the higher address locations and the offset for the next bank can be determined.

Description: METHOD AND APPARATUS FOR MEMORY SIZE SELECTION BACKGROUND OF THE PRESENT INVENTION 1. FIELD OF THE INVENTION This invention relates to the field of a multiple bank dynamic random access memory (DRAM) systems and in particular to a method and apparatus for selecting bank memory size. 2. BACKGROUND ART A computer system consists of a number of modules or components. Computer systems typically include a central processing unit (CPU) such as a microprocessor. The microprocessor is a program-controlled device that obtains, decodes and executes instructions. A computer system also includes program storage components for storing program instructions, and data storage components for storing data. These storage components may be read only memory (ROM), random access memory (RAM), disc or tape storage, or any other suitable storage means. A computer system also includes input/output (I/O) components for connecting external devices to the microprocessor. Special purpose components, such as memory management units or co-processors may also be part of the computer system. The memory component, also kno n as a "main memory", is a scarce resource that is dynamically allocated to users, programs, or processes. Main memory is typically a silicon based memory such as a random access memory (RAM). In many prior art applications, dynamic random access memory (DRAM) is used as the main memory. A disadvantage of the use of DRAM as main memory for a CPU or other processor are limitations on the memory access time. As microprocessor technology has improved, the clock rate of operation of the microprocessor has increased. This increases the memory access time requirements of the main memory associated with the microprocessor. The access time of DRAM has not kept pace with the requirements of present microprocessor technology. For example, 16 and 32 bit microprocessors may -> require memory access rates of 20 to 40 nanoseconds. Present day DRAM has access times of 60 to 80 nanoseconds. To satisfy the access requirements of present-day microprocessors, memory caching schemes or page access schemes are utilized. Memory caching schemes have the disadvantage of higher cost due to the use of static RAM (SRAM) components. In addition, caching schemes suffer from performance penalties in task switching environments and from physical to virtual address conversion time penalties. One memory scheme used to achieve, high performance without the cost, task switching or conversion penalties of caching schemes is known as "bank switching". This scheme utilizes a number of banks of DRAM and interleaves access to the DRAMs to "hide" the precharge time of individual banks. One such scheme is described in U. S. patent application number 604,785 entitled "METHOD AND APPARATUS FOR PAGE PREDICTION OF MULTIPLE PAGE DRAM", filed on October 26, 1990 and assigned to the assignee of the present invention. It is often desired to configure the memory banks to provide various sizes for differ .nt applications. In the prior art, this is accomplished by providing additional I/O ports and selecting memory configuration using software. This aαds expense and requires complex controller circuitry. Therefore, it is an object of the present invention to provide a method and apparatus for selecting different memory sizes in a multiple bank DRAM environment. It is another object of the present invention to provide a method and apparatus for selecting different memory sizes using a single memory controller. SUMMARY OF THE PRESENT INVENTION A memory controller for defining memory size in an interleaved multiple bank DRAM memory system is described. The system ensures that an associated CPU can access a contiguous memory array. The offset is selected according to the memory size. A memory controller that is capable of controlling a given size DRAM selects memory below a maximum size by asserting a high or low level on the most significant address pins. By reading the input, the controller can determine that memory space is not available on the higher address locations and the offset for the next bank can be determined. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a block diagram of the present invention. Figure 2 is a block diagram of a memory array configuration of the present invention. Figure 3 is a detailed block diagram of the controller of Figure 1. Figure 4 is a block diagram of a memory bank of this invention. Figure 5 is a flow diagram of the operation of this invention. DETAILED DESCRIPTION OF THE INVENTION A method and apparatus for memory size selection for a multiple page DRAM is described. In the following description, numerous specific details such as number of bits, number of memory banks, etc. are set forth in detail in order to provide a more thorough description of the invention. It will be apparent, however, to one skilled in the art, that the present invention may be practiced without these specific details. In other instances, well-known features have not been described in detail so as not to unnecessarily obscure the present invention. A microprocessor or central processing unit (CPU) is a device for obtaining, decoding and executing instructions. A microprocessor requires an associated memory to hold information. This memory is referred to as "main memory" and is used to hold instruction sequences (programs) and to store data. Two characteristics that affect the performance of a microprocessor memory system are capacity and speed. The speed of a memory depends on the "access time", "write time", and "memory cycle time". The "access time" of a memory corresponds to the time required to provide a read control signal to the memory and apply the address bits to memory, until the output of the memory is valid. "Write time" is the time between the sending of a write signal to memory and new data has been written to the memory. "Memory cycle time" is the time period required to complete a specific memory function, such as a read/write operation, a read/read operation, a write/write operation, or a write/read operation. Main memory in a computer system has a logical organization and a physical organization. The physical organization of the main memory of a computer system typically consists of a memory array coupled to a computer system bus for communication with a microprocessor and other computer system components. Each address location in the main memory is accessed by a "physical address". The physical main memory location in which informational items may be stored is called the physical address space or the physical memory space. An address used by or generated by a program to specify a particular informational item is called a "logical address." The set of logical addresses used by a program to identity informational items is called the "logical iddress space." The logical organization of a memory must include a mapping means for converting a logical address space to a physical address space. (It should be noted that the logical address space need not be equal to the physical address space.) In many applications, it is desired to provide a greater logical address space than the physical address space of main memory. This is accomplished through a technique known as "virtual memory." In a virtual memory scheme, the logical address space is represented in the physical main memory and in secondary mass storage such as hard disk drives or floppy disk drives. A virtual memory scheme requires a mechanism to determine whether an addressed element resides in physical memory or in secondary mass storage. When an addressed item does not reside in physical memory, it must be transferred from secondary storage in a process known as "swapping". A memory paging scheme permits main memory to be allocated in small blocks of equal size called "page frames". A "page" (set of contiguous logical addresses) fits within a page frame. Paging permits the implementation of a logical address space larger than the installed physical memory. If a reference page is missing from a physical memory, it is swapped in from secondary storage as a single unit; that is, the entire page is swapped into physical memory. Many computer applications, particularly those in the personal computer environment, require the use of different sizes of physical memory (DRAM) for efficient operation. The maximum memory size that is addressable by a memory controller depends on the number of pins available. If a memory size less than the maximum is used, certain of the pins (the most significant address bits) are not used. Separate and additional I/O pins are provided for software control of memory selection, adding to device complexity and expense. PRESENT INVENTION The present invention is a method and apparatus for providing a memory controller for controlling various memory sizes in a multiple bank DRAM environment without the need for additional I/O pins. This invention interleaves multiple banks of DRAM's to reduce the effective cycle time of the DRAM. An interleaving scheme can provide improved operation if the memory accesses are sequential. The interleave scheme is used to "hide" the precharge time of the DRAM's (which affect access time) for sequential addressing. A block diagram of the present invention is illustrated in Figure 1. A microprocessor or CPU 10 includes an address bus 14, control bus 15 and data bus 16. The address bus 14 is coupled to a DRAM controller 17. The memory controller 17 permits the definition of various size memory arrays without the need for additional I/O lines. The DRAM controller communicates on buses 19A-19D to DRAM memory banks 20A -20B, respectively. The control bus 15 and data bus 16 are coupled to a decoder 12 which provides output on bus 22. The DRAM memory banks communicate with an auxiliary memory on bus 21. The four memory banks are driven by four independent channels 19A-19D. The memory array is between 1 and 256 megabytes in the present invention but can be any suitable size. Each DRAM can be 250 k bit, 1 megabit, 4 megabit or 16 megabit. While one of the memory banks is accessed, the three remaining banks are loaded in advance in order to avoid wait states when the program advances from the current bank or page. The memory banks are interleaved so that the physical addresses on any given page of memory are stacked above each other. An example of the memory organization of the DRAM memory banks is as follows. In this example, a 256k x 4 DRAM having a 9 bit wide row address equivalent to 512 pages is utilized: Bank Page 0 0 0 0 1 0 1 0 2 0 2 0 3 0 3 0 0 1 0 1 1 3 511 3 511 A high hit rate is accomplished by mapping the address space in contiguous banks so that a linearly progressing program will access distinguished pages. Therefore, a page change will not result in a wait state for precharging the memory. A memory configuration used in the present invention is illustrated in Figure 2. In this example, the memories are divided into four separate arrays of 9 memories each, identified as bank A through D. Bank A contains memories 30A-38A; Bank B contains memories 30B-38B; Bank C includes memories 30C-38C, and Bank D includes memories 30D-38D. Each memory can be 64 kilobits by 4, 256 kilobits by 4 or one megabyte x 4. Memories 38A- 38D receive parity bits for data validation. Row address select signals RASA-RASD are provided to memory banks A-D respectively, to select a row in the memory array. Column select signals then select the appropriate column so the desired memory element may be read. Referring to bank A, column select signals CASA 0-CASA 3 are provided. CASA 0 is coupled to memory banks 36A and 37A. Signal CASA 1 is coupled to banks 34A and 35A. Signal CASA 2 is coupled to banks 32A and 33A. Signal CASA 3 is coupled to banks 30A and 31A. Similarly, column select signals CAS BO - B3 are provided to the memories of bank B; signal CAS C0-C3 are provided to bank C, and signal CAS D0-D3 are provided to bank D. MEMORY CONTROLLER A detailed view of the DRAM controller 17 of Figure 1 is illustrated in Figure 3. The DRAM controller 17 is coupled to the processor control bus 15. The processor control bus 15 provides control signals to control block 43. The signals include W/R, D/C. M/O, Reset, ADS, Clock, RS16, and A20 gate signals. The processor address bus 14 provides address information to address latch 44. The control block 43 provides output signal 46 to delay line block 68 and signal 47 to the RAS/CAS generator block 69. The delay line block 68 provides output signal 70 to the RAS/CAS generator block 69. A byte enable signal 40 provided by a microprocessor is also coupled to the control block 17 and is provided as signal 48 to the RAS/CAS generator block 69. The address latch 44 provides output 45 to a page replacement block 53, logic block 55 and program flow detector block 59. Mode select signals 41 are provided to mode control block 49. Mode control block 49 provides an output 50 to RAS/CAS generator block 69. A disable refresh signal 42 is provided to refresh block 51. Refresh block 51 includes a counter so that appropriate rows and columns can be refreshed as desired. The refresh block 51 provides an output signal 52 to the RAS/CAS generator block 69. The RAS/CAS generator block 69 is also coupled on line 54 to replacement block 53. The page replacement block 53 includes an up/down counter and provides outputs 56, 57, and 58 to logic block 55. The program flow detector block 59 provides an output signal 72 to flag block 60. Flag block 60 provides an increment/ decrement signal 61 to page replacement block 53. Blank block 55 provides output signal 71 to the up /down counter of page replacement block 53. The RAS/CAS generator block 69 provides output 62 to output block 64A, 64B, 64C and 64D. The page replacement block 53 provides output on bus 63 to output block 64A-64D, respectively. The output blocks 64A-64D provide address information on Q busses 19A-19D respectively, to memory banks A through D. The output blocks 64A-64D also provide the row address signals, column address signals CAS 0-CAS 3 for each of the memory blanks and a write enable signed. Each Q bus, for example, is 12 bits wide and can address a maximum of 16 megabits in a memory bank. If a memory bank is resized to a smaller size than the maximum, then certain of the Q lines are not used. The present invention provides a method for using these unused address lines to convey memory sizing information to the controller. The memory depth in this invention is selectable for each individual bank from 16K to 16 megabits. The memory of banks 2, 3 and 4 is mapped to contiguous boundaries to achieve a linear address space for improved operation. Size selection is accomplished by connecting unused Q outputs to VCC or VSS. After power up or reset, the controller asserts a current on the five highest order Q outputs (Q7-Q11). By reading the input, the controller can determine the memory size and the offset for each bank The offset is a function of the memory depth and is equal to memory size multiplied by memory width. This is a cost effective way to provide various memory sizes and to allow upgrades without having to replace existing memory devices. If a memory bank is not populated at all, Q6 is tied to VSS. In such a case, Q7-Q11 can be left open. The banks populate in sequential order and may not have a gap in between. The memory organization can be by eight, by four and by one. Referring now to Figure 1, consider where bank A, B, C and D are each 1 megabit DRAM's. A user wishes to upgrade bank B to 4 megabits. This invention provides a method to identify the mapping of the memories to the DRAM controller. Referring to Figure 4, banks 64A-64D each have 12 bit Q lines 19A- 19D, respectively. For bank A, the 16 megabit bank, all 12 address lines are used. For bank B, only 10 bits are used because only 1 megabit of memory is addressed. The unused address bits are used to provide information about the memory mapping. Lines Q10-Q11 of bank B are tied to VSS. Only the address lines Q0-Q9 of bank B are utilized. Bank D is not populated at all. Therefore, address line Q6 is tied to VSS. This invention utilizes this convention to indicate that the bank is not populated. Any single one of the the Q lines can be set to VSS to indicate this state, or any combination of Q lines can be utilized without departing from the scope of this invention. Alternatively, each line QO-Qll can be coupled to VSS to indicate that the bank is unpopulated. In operation, the memory controller executes an algorithm on power- up to determine the memory size of the DRAM banks. This algorithm is illustrated in the flow diagram of Figure 5. At step 80, the DRAM and DRAM controller are powered up. At step 81, the DRAM controller reads line Q6 of the first memory bank, bank A. At decision block 82, the argument "Is Q6 at VSS?" is made. If the argument at decision block is true, the system proceeds to step 83 and the memory controller identifies block A as not populated. If the argument at decision block 82 is false, the system proceeds to step 84. At step 84, the address lines Q7-Q11 are polled. At decision block 85, the argument "Is at least one line of lines Q7-Q11 at VSS?" is made. If the argument at decision block 85 is false, (i.e. none of the lines Q7-Q11 are at VSS), the system proceeds to step 86 and the bank is identified as being of maximum size. If the argument at decision block 85 is true, the system proceeds to step 87 and the memory of the memory block is determined by identifying which Q lines are at VSS and referring to a table to locate memory size. At step 88, the offset for the memory is determined based on the memory size. Steps 83, 86 and 88 all proceed to step 89. At step 89, the process is repeated for each memory bank. The memory size and offset for each memory bank is determined by referring to Table 1 below: Offset 4 Meg x Memory Widt 1 Meg x Memory Widt 256K x Memory Width 64K x Memory Width 16K x Memory Width Thus, a method and apparatus for sizing of a multiple bank DRAM has been described.

Claims: CLAIMS OF THE INVENTION 1. A method of identifying the size of a memory bank having a plurality of address lines for accessing data storage locations in said memory bank, said method comprising the steps of: coupling certain of said address lines to a first voltage level; determining, with a processing means, the voltage level on each of said address lines to identify said certain lines; generating a table address dependent on said certain lines; and reading an entry stored in a table at said table address to identify a size of said memory bank. 2. The method of claim 1 wherein said memory size is dependent on the number of most significant bits coupled to said first voltage level. 3. The method of claim 2 wherein a memory size when three most significant bits are coupled to said first voltage level is smaller than a memory size when two most significant bits are coupled to said first voltage level. 4. In a computer system having a plurality of memory banks, each of said memory banks having a plurality of address lines, and a processing means coupled to said memory banks, a method of identifying the size of each memory bank comprising the steps of: coupling certain of said address lines of each of said memory banks to a first voltage level; determining, with a processing means, the voltage level on each of said address lines of said memory banks to identify said certain lines; generating a table address for each memory bank dependent on said certain lines; and for each memory bank, reading an entry stored in a table at said table address to identify a size of said memory bank. 5. The method of claim 4 wherein said memory size is dependent on the number of most significant bits coupled to said first voltage level. 6. The method of claim 5 wherein a memory size when three most significant bits are coupled to said first voltage level is smaller than a memory size when two most significant bits are coupled to said first voltage level. 7. A method of identifying the size of a memory bank having a plurality of address lines for accessing data storage locations in said memory bank, said method comprising the steps of: defining N most significant lines of said address lines; selectively coupling M most significant address lines of said N most significant address lines to a first voltage level where M < N; generating a table address dependent on the number of address lines M coupled to said first voltage level; and reading an entry stored in a table at said table address to identify a size of said memory bank. 8. The method of claim 7 further including the step of coupling a single one of said lines to said first voltage level when said memory bank has a memory size of zero. 9. The method of claim 8 wherein said single one of said lines is a line other than the most significant of said lines. 10. A method of identifying the size of a plurality of memory banks each having a plurality of address lines for accessing data storage locations in said memory banks, said method comprising the steps of: for each memory bank, defining N most significant lines of said address lines; selectively coupling M most significant address lines of said N most significant address lines to a first voltage level where M < N; generating a table address dependent on the number of address lines M coupled to said first voltage level; and reading an entry stored in a table at said table address to identify a size of said memory bank. 11. The method of claim 10 further including the step of coupling a single one of said lines to said first voltage level when said one of said memory banks has a memory size of zero. 12. The method of claim 11 wherein said single one of said lines is a line other than the most significant of said lines.

Inventors: SPONRING OTTO, SPONRING, OTTO
Applicants: SAMSUNG SEMICONDUCTOR INC, SAMSUNG SEMICONDUCTOR, INC.
Application year: 1991
Main classification: G06F12
IPC codes: G06F12