Patent Publication Number: US-6667930-B1

Title: System and method for optimizing performance in a four-bank SDRAM

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
     This application claims the benefit of U.S. Provisional Patent Application Serial No. 60/346,563, titled SYSTEM AND METHOD FOR OPTIMIZING PERFORMANCE IN A FOUR-BANK SDRAM, filed on Jan. 8, 2002, the entirety of which is hereby incorporated herein by reference. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention generally relates to computer systems. More specifically, the present invention relates to optimization of access in a synchronous dynamic random-access memory (SDRAM). 
     2. Description of the Related Art 
     Graphics-intensive applications for computers such as personal computers (PC&#39;s) are becoming increasingly more popular. Such applications include high-end computer-aided drafting (CAD) applications, games, real-time video applications, as well as other applications. As these applications become more complex, they require the computers on which they are executed to render graphics at an ever increasing rate. Furthermore, as the typical resolution of computer screens has increased from 640×480 pixels (horizontal times vertical) to 800×600, 1024 ×768 and beyond, and increased color information per pixel from two bits to 24 bits to 32 bits and beyond, the processing demand placed on the computers for fast graphics execution has also grown. The typical computer relies on a graphics card (also known as a video card, graphic accelerator card, or a display adapter, among other terms) for assistance in the display of graphics on a display device. A graphics card generally includes one or more specialized processors that are manufactured specifically for graphics rendering and processing graphics-related. The graphics card also typically includes memory, ranging from one, two, four, eight, sixteen megabytes and up, so that a complete screen of graphics information, known as a frame, can be stored by the graphics card. Thus, this memory is generally known as a frame buffer of the graphics card. Graphics “cards” may also be integrated within a single chip on a motherboard of a computer. A graphics card, potentially along with other components, makes up the graphics subsystem of a computer. 
     Initially, the memory of a graphics card was of the common type of dynamic random-access memory (DRAM) which is used by computer processors to hold data during processing. However, the access of data, i.e. the reading and writing of data to memory addresses, tends to be a slow process relative to the other processor components. Thus, as improvements in memory accessing speed have occurred in general memory hardware, such as the introduction of synchronous dynamic random-access memory (SDRAM), such improvements have also been included into graphics cards and graphics processing subsystems. 
     Specifically, a 2-bank SDRAM has been implemented in a graphics card to improve the memory access. With dual bank SDRAM, two different pages in memory may be open at the same time, one in each bank. FIG. 1 shows a prior art checkerboard arrangement  100  for a memory access using a 2-Bank SDRAMS. In this checkerboard arrangement  100 , two adjacent locations are stored in two different memory banks. When drawing a figure, both banks  0  and I contribute one row of data, thus reducing latency in data accessing. The 2-bank SDRAM still does not possess adequate data throughput for modern graphics applications. 
     Accordingly, it would be advantageous to provide a system to further speed memory access in a graphics-intensive processor. It is thus to such a system that the present invention is directed. 
     SUMMARY OF THE INVENTION 
     The present invention discloses an enhanced checkerboard arrangement for 4-bank SDRAM. This enhanced checkerboard arrangement takes advantage of 4-bank SDRAM and improves performance in a computer system by reducing latency in memory access. The enhanced checkerboard arrangement groups memory banks in such way that four SDRAM memory banks form a basic block with four squares, where each square represents one memory bank. This arrangement particularly facilitates the drawing of small objects. 
     There are two basic SDRAM memory blocks, each formed by four memory banks. These two basic blocks are further arranged to form an enhanced checkerboard pattern composed of 16 squares, where four distinguished memory banks are aligned vertically. This arrangement facilitates the drawing of large objects. 
    
    
     Other objects, features, and advantages of the present invention will become apparent after review of the hereinafter set forth Brief Description of the Drawings, Detailed Description of the Invention, and Claims appended herewith. 
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a checkerboard pattern for a 2-bank SDRAM (PRIOR ART). 
     FIG. 2 is an enhanced checkerboard pattern for a 4-bank SDRAM according to the present invention. 
     FIG. 3 is an enhanced checkerboard covering strips and circles. 
     FIG. 4 is a block diagram of a logic circuit for accessing memory using an enhanced checkerboard according to the present invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Referring now in more detail to the drawings in which like numerals refer to like elements throughout the several figures, FIG. 2 is an enhanced checkerboard  200  according to the present invention. The enhanced checkerboard represents a display area and is divided into 16 squares. Each square represents a display area where the content of that area is stored in a single memory bank. Four adjacent squares form a basic block, and each square is stored in a different memory bank. The content of four squares can be stored in a 4-bank SDRAM, each square stored in a specific bank. The fact that 4 banks of SDRAM can be accessed simultaneously makes drawing the computer screen faster. 
     In the enhanced checkerboard shown in FIG. 2, there are two types of basic blocks, basic block  202  and basic block  204 . Each basic block is a mirror image of other and each formed by four memory banks,  0 ,  1 ,  2 , and  3 . For the first type of basic block, each square is associated with a memory bank in a counter clockwise fashion, and for the second type of basic block, each square is associated with a memory bank sequentially in a clockwise fashion. 
     Each square in FIG. 2 represents a memory bank, and each square also represents an area of display screen. According to one embodiment of the present invention, each square represents an area covered by 32×8 pixels in a single processor system. The width of the area may be expanded in a multiple processor system. For example, for a two processor system, the area covered would be (32×2)×8 pixels. 
     When the basic blocks  202  and  203  are arranged in the pattern shown in the enhanced checkerboard  200 , certain properties can be observed. When drawing vertical strips, all four banks of SDRAM can be accessed at the same time, thus minimizing latency in data access. For example, drawing a vertical line  302  in FIG. 3, all four banks,  0 - 3 , are accessed at the same time with each memory bank outputting pixels from the same column. When drawing a localized figure that covers four squares, again all four banks of SDRAM can be accessed simultaneously. For example, a circle  304  in FIG. 3 covered by four squares is drawn by accessing four memory banks simultaneously. When drawing horizontal lines, only two memory banks are accessed simultaneously. For example, when drawing a horizontal line  306  in the area covered by four squares, two memory banks  308  are first accessed together to retrieve pixels from the same row, for example, row  0 . Then the memory banks  310  are accessed to retrieve pixels from row  1 . 
     Another characteristic of the enhanced checkerboard pattern is that any adjacent four squares, which form a larger square, are associated with four different memory banks. This ensures that any small objects covered by these four squares can be drawn with minimum latency by accessing all four memory banks simultaneously. 
     The present invention is useful in computer applications that employ intensive computer graphics. The computer screen is mapped with the enhanced checkerboard  200 , and graphics information is distributed among 4 banks of SDRAM. 
     FIG. 4 is a block diagram of a logic circuit  400  according to the present invention. The logic circuit  400  is preferably implemented on a graphics accelerator board. The rendering engine  402  interfaces with the central processing unit (CPU) and receives instructions and information from the CPU through a system bus. The rendering engine accesses the memory to store graphics information and to retrieve graphics information for display. The memory access is through a checkerboard optimization circuit  404 . The checkerboard optimization circuit  404  decides which memory banks  406  to access based upon the specific objects to be drawn. 
     While the invention has been particularly shown and described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that various other changes in form and detail may be made without departing from the spirit and scope of the invention.