Specification
1. Field of the Invention
The present invention relates to memory storage in computer systems, and more specifically to a method and apparatus for enabling standard binary memory cells to use a ternary representation of stored data, thus increasing memory storage density.
2. Description of the Related Art
Computer systems are being called upon to store increasingly larger amounts of data and thus have increased memory requirements. A typical computer system includes between 2 and 6 Mbytes of RAM (random access memory) which is generally comprised of DRAM or dynamic RAM. A computer's RAM essentially acts as a scratchpad for use by the computer's microprocessor. RAM is used to store code or application programs that are being executed by the microprocessor as well as the data generated by the microprocessor as a result of code execution. A computer system also typically includes a hard drive having up to 100 or more Mbytes of storage. A hard drive is a magnetic media that usually acts as the principal mass storage system. For example, a computer's hard drive typically stores all of the computer's application programs, and the application program that is in use is loaded in the computer's RAM for execution.
The amount of RAM available in a computer system affects the type of application programs that can be executed as well as the speed with which an application program can be executed. For example, certain application programs require a minimum amount of computer memory before they can be run. Also, a computer system running a large application program with insufficient RAM is generally required to swap data in and out of the hard disk during code execution. This significantly reduces computer performance.
New software applications are being developed for computer systems which require larger memory requirements. For example, the move toward graphical user interfaces (GUIs), as well as multi-media applications, requires much larger amounts of memory to store the required graphical data. Another factor involved with memory storage in computer systems is cost. A computer system's main memory or DRAM is typically among the greatest cost factors in a computer system. This cost factor typically requires users to sacrifice the power and performance of a computer system by limiting the amount of computer RAM. Therefore, a method and apparatus is desired which increases the storage density of current computer memory such as DRAMs, thus providing increased memory storage at a similar cost.
Current data storage devices or memory systems use a binary representation of stored data. In other words, data is stored in memory as either a series of on/offs or 1's and 0's. For example, in a magnetic media such as a disk drive, data is stored by either the presence or absence of magnetic charges on the media. In dynamic random access memory (DRAM), data is stored by either the presence or absence of a charge on a capacitor. For example, current DRAMs use lack of charge or 0 volts to represent a 0 value and a charge of +5 volts to represent a one value. However, the capacitor in a DRAM cell is capable of storing a plurality of charge levels. Therefore, a method and apparatus is desired which increases the storage density of DRAMs while maintaining compatibility with current binary computer systems.
Summary of the Invention
The invention comprises a memory apparatus using conventional DRAMs which uses a ternary representation of stored data. Each DRAM memory cell can thus store three states. In the preferred embodiment, the external representation of data used by the computer system can be partitioned into four binary bit blocks of data, which can represent 16 different states. These four binary bits are stored in memory using three DRAM cells having three states which thus can represent 27 different states. This results in a 33% storage density increase using standard DRAM cells.
The ternary storage memory apparatus includes a binary to ternary converter which receives a first number of binary bits of data during a write operation and generates a second lesser number of data values using a ternary representation. The binary to ternary converter includes a binary to ternary encoder which produces a second number of two bit values which are then transformed by bit line drivers into a second number of values each having one of three voltages referred to as VSS, +VDD, and -VDD. A second number of memory storage elements are coupled to the binary to ternary converter and store the respective voltages using the above ternary representation. During reads, a ternary to binary converter comprising sense amplifiers and a ternary to binary decoder reads the voltages stored in the respective memory elements and recreates the original binary data. The sense amplifiers coupled to the respective memory storage elements read the voltages stored in the respective memory elements and convert these voltages into a second number of two bit values. The ternary to binary decoder converts these second number of two bit values into the original first number of binary bits that were originally written into the memory storage elements.
Therefore, a method for using standard DRAM cells to store data values using a ternary representation of data is disclosed. This allows the use of existing DRAM while considerably increasing the DRAM's memory storage density.
Brief Description of the Drawings
A better understanding of the present invention can be obtained when the following detailed description of the preferred embodiment is considered in conjunction with the following drawings, in which:
FIG. 1 is a block diagram illustrating a computer system according to one embodiment of the invention;
FIG. 2 is a block diagram illustrating a portion of the ternary DRAM of the present invention;
FIG. 3 illustrates the bit line driver in the ternary DRAM of FIG. 2;
FIG. 4 illustrates a sense amplifier in the ternary DRAM of FIG. 2; and
FIG. 5 illustrates the binary to ternary encoding scheme of the preferred embodiment.
Detailed Description of the Preferred Embodiment
Referring now to FIG. 1, a computer system incorporating logic according to the present invention is shown. The elements of a computer system not necessary to understand the operation of the present invention have been omitted for simplicity. The computer system includes a central processing unit or CPU 122 which is coupled to a memory or host bus 124. A CPU cache system 130 is preferably coupled between the CPU 122 and the host bus 124. The cache system 130 comprises cache memory and a cache controller.
The host bus 124 includes address, data, and control portions. Main memory 128 is coupled to the host bus 124 by means of memory controller 126. The host bus 124 is coupled to an expansion or input/output (I/O) bus 140 by means of a bus controller 142. The expansion bus 140 includes slots for various other devices, including video 144, a floppy drive 146 and hard drive 148, as desired.
The main memory 128 is comprised of dynamic random access memory (DRAM) cells and includes logic according to the present invention which enables a ternary representation of stored data using standard binary DRAM cells. This results in a significant storage density increase. In the following description, main memory 128 is also referred to as the ternary DRAM or ternary memory. It is also noted that a representation of data using a greater number of states, such as a quaternary representation of stored data, is also contemplated.
Referring now to FIG. 2, a portion of the ternary DRAM according to the preferred embodiment of the invention is shown. FIG. 2 illustrates the DRAM cells and logic associated with three bit lines and three word lines of the DRAM for illustrative purposes. However, it is noted that the remainder of the DRAM array can be constructed by replicating these three bit lines and three word lines and their corresponding logic to achieve the row and column widths desired.
The portion of memory shown in FIG. 2 includes four bit lines, BI.sub.3, BI.sub.2, BI.sub.1 and BI.sub.0 which provide binary data to the ternary DRAM. Each of these bit lines provide their respective bit values to a binary to ternary converter which comprises a binary to ternary encoder 220 and bit line drivers 230, 231, and 232. As shown in FIG. 5, the binary to ternary encoder 220, in conjunction with bit line drivers 230, 231, and 232, operates to encode the four binary values BI.sub.0 to BI.sub.3 into a ternary representation using three values. It is noted that there are various, binary to ternary encodings possible.
Referring again to FIG. 2, the binary to ternary encoder 220 encodes the four binary values BI.sub.0 to BI.sub.3 into three two bit buses referred to as T.sub.0, T.sub.1, and T.sub.2. The two bit bus T.sub.0 comprises two lines referred to as T.sub.00 and T.sub.01, the two bit bus T.sub.1 comprises two lines referred as T.sub.10 and T.sub.11, and the two bit bus T.sub.2 comprises two lines referred as T.sub.20 and T.sub.21. What follows is a VHDL description of the operation of the binary to ternary encoder 220 in encoding the signals BI.sub.3, BI.sub.2, BI.sub.1 and BI.sub.0 into the two bit buses T.sub.0, T.sub.1 and T.sub.2 :
The code used above was chosen to minimize the number of zeros in the code because, in general, they are sensed less reliably by sense amplifiers 250, 251, and 252, which are described below. However, it is noted that various types of encodings may be used.
The two bits from each of the buses T.sub.0, T.sub.1 and T.sub.2 are provided to inputs of respective bit line drivers 230, 231 and 232, as shown. Bit line drivers 230, 231 and 232 receive the two bit values from the buses T.sub.0, T.sub.1, and T.sub.2 and generate one of three different voltages, VSS, +VDD, or -VDD on respective bit lines BL.sub.1, BL.sub.2 and BL.sub.3. The following table illustrates the bit encodings for the bit bus T.sub.0, and the bit encodings for the buses T.sub.1 and T.sub.2 are identical to the one shown below.
The three voltages VSS, +VDD and -VDD comprise three possible states for a ternary representation of stored data. In the preferred embodiment, the value VSS is preferably approximately a logical ground midway between +VDD and -VDD. In the preferred embodiment +VDD and -VDD are +5 and -5 volts, respectively. The voltage generated on the respective bit line BL.sub.1 -BL.sub.3 is used to charge a capacitor comprised in a respective DRAM cell 240-248. The bit line BL.sub.1 connects to DRAM cells 240, 243, and 246; the bit line BL.sub.2 connects to DRAM cells 241, 244, and 247; and the bit line BL.sub.3 connects to DRAM cells 242, 245, and 248. Ternary DRAM cells 240-248 are identical to standard DRAM cells in the preferred embodiment. However, it is noted that any type of memory storage element capable of storing three states may be used, as desired.
The DRAM cells 240-248 essentially comprise a capacitor (not shown) with a pass transistor (also not shown) coupling the capacitor to the restrictive bit line BL.sub.1, BL.sub.2 or BL.sub.3 to allow a charge to be stored onto or read from the capacitor. Since the operation of DRAM cells is well known to those skilled in the art, further details of their operation are omitted for simplicity. The pass transistor's gate in each DRAM cell is coupled to a respective word line WL.sub.1 -WL.sub.3 which provides the row addressing for the DRAM. The word line signal WL.sub.1 is coupled to each of the DRAM cells 240-242, the word line signal WL.sub.2 is connected to the DRAM cells 243-245, and the word line signal WL.sub.3 is connected to the DRAM cells 246-248.
A word line decoder 290 generates the three word line signals WL.sub.1, WL.sub.2, and WL.sub.3, and these lines connect each of the respective bit lines BL.sub.1, BL.sub.2, and BL.sub.3 to form an array. The word line decoder 290 provides the row addressing for the DRAM cells 240-248 and selects which of the DRAM cells is to be charged and is preferably identical to that in a standard DRAM as is well known in the art.
The BL.sub.1, BL.sub.2, and BL.sub.3 signals are connected to a ternary to binary converter which includes respective sense amplifiers 250, 251, and 252 as well as a ternary to binary decoder. As discussed further below, each of the respective sense amplifiers 250-252 comprises two voltage comparators which determine whether the respective bit line is less than or greater than Vthreshold. Note: Vthreshold is chosen to enable the two voltage comparators to differentiate between the three possible voltages present on the bit line. Each of the sense amplifiers 250-252 provides an output bus comprising two bits. The sense amplifier 250 outputs a two bit bus S.sub.0 comprising bits referred to as S.sub.00 and S.sub.01, the sense amplifier 251 outputs a two bit bus S.sub.1 comprising bits referred to as S.sub.10 and S.sub.11, and the sense amplifier 252 outputs a two bit bus S.sub.2 comprising bits referred to as S.sub.20 and S.sub.21. The following table illustrates the bit encodings for the sense amplifier 250 and the signal lines S.sub.01 and S.sub.00. The bit encodings for the sense amplifiers 251 and 252 are identical to that shown below for the sense amplifier 250.
It is noted that VSS encodes into two different values 00 and 11 on each of the buses S.sub.0, S.sub.1, and S.sub.2. Since it is only necessary for the sense amplifiers 250-252 to read three states, and the values S.sub.01 and S.sub.00 can represent four different possibilities, VSS was chosen to correspond to two different values on the S.sub.0, S.sub.1, and S.sub.2 buses. Of course, alternative encodings may also be used.
The ternary to binary decoder 270 receives each of these three two bit buses, S.sub.0, S.sub.1, and S.sub.2, from the sense amplifiers 250-252 and converts these signals into a four bit wide bus BO comprising lines BO.sub.0, BO.sub.1, BO.sub.2, and BO.sub.3. The four bit wide bus BO is the binary reconstruction of the binary data input from the binary bus BI.sub.3 -BI.sub.0 and stored in a respective row of the ternary DRAM memory cells. The following is a VHDL description of the conversion of the three two bit buses S.sub.0, S.sub.1 and S.sub.2 into a binary reconstruction of the original data performed by the ternary to binary decoder 270.
Referring now to FIG. 3, bit line driver 230 is shown. The bit line driver 230 is discussed here for convenience with the following description applying equally to the bit line drivers 231 and 232. The T.sub.00 signal is connected to an input of a two input NAND gate 303 and an input of a two input NOR gate 305. The T.sub.00 signal is also connected to the input of an invertor 306 whose output is connected to an input of a two input AND gate 304. The T.sub.01 signal is connected to the other inputs of the AND gate 304 and the NOR gate 305. The T.sub.01 signal is also connected through an invertor 307 to the other input of the NAND gate 303.
The output of the NAND gate 303 is connected to the gate of a PMOS (p-channel metal oxide semiconductor) transistor. A voltage supply of +VDD is connected to the source of the PMOS transistor 300, and the drain of the transistor 300 is connected to the source of a NMOS (n-channel metal oxide semiconductor) transistor 301. The AND gate 304 is connected to the gate of the transistor 301. The voltage -VDD is connected to the drain of the transistor 301. The output of the NOR gate 305 is connected to the gate of NMOS transistor 302 whose source is connected to the drain of transistor 301 and whose drain is connected to ground. (Ground is also referred to as VSS. The circuit operates to transform the values T.sub.00 and T.sub.01 into corresponding values VSS, +VDD, -VDD or open, as shown.
The PMOS transistor 300 operates whereby a 0 value output from the NAND gate 303 operates to turn on the transistor 300 such that, if the transistors 301 and 302 are not turned on, the voltage +VDD is provided on the bit line BL.sub.1. If the output of the NAND gate 303 is a logic 1 value, then the transistor 300 is turned off. If the output of the AND gate 304 is a logic 1 value, then the transistor 301 is turned on. If the transistors 300 and 302 are both turned off and the transistor 301 is turned on, then the voltage -VDD is present on the bit line BL.sub.1. If the output of the NOR gate 305 is a logic 1 value, then the transistor 302 is turned on. If the remaining two transistors 300 and 301 are both turned off and the transistor 302 is turned on, then ground or VSS is output on the bit line BL.sub.1.
As shown in FIG. 3, if the values T.sub.00 and T.sub.01 are both 0, then the voltage VSS is provided on bit BL.sub.1. If the values for T.sub.00 and T.sub.01 are 1 and 0 respectively, then the voltage +VDD is output on the bit line BL.sub.1. If the values T.sub.00 and T.sub.01 are 0 and 1 respectively, then the voltage -VDD is output on the bit line BL.sub.1. If both values T.sub.00 and T.sub.01 have a 1 value, then all of the transistors are turned off and the bit line BL.sub.1 is left floating or open.
Referring now to FIG. 4, the sense amplifier 250 is shown. The sense amplifier 250 is illustrated in FIG. 4 and discussed below, and the following description applies equally well to the sense amplifiers 251 and 252. The bit line BL.sub.1 is connected to the negative input of a voltage comparator 402 and the positive input of a voltage comparator 403. The positive input of voltage comparator 402 is connected to a negative reference voltage -Vthreshold, and the negative input of voltage comparator 403 is connected to a positive voltage reference Vthreshold. The output of the voltage comparator 402 is connected to the D-input of a D-type flip-flop 404 whose Q output generates the signal S.sub.01. The output of voltage comparator 403 is connected to the D-input of a D-type flip-flop 405 whose Q output is the signal line S.sub.00. A sense clock signal referred to as SENSE.sub.-- CLK is connected to the clock input of each of the D-type flip-flops 404 and 405.
The voltage comparators 402 and 403 determine whether the respective bit line BL.sub.1 is less than or greater than Vthreshold respectively. When the output of the respective comparators 402 and 403 are accurate, a read timing generator (not shown) generates the SENSE.sub.-- CLK signal which causes the flip-flops 404 and 405 to latch in the outputs of the respective voltage comparators 402 and 403 and provide these outputs as the S.sub.01 and S.sub.00 signals, respectively.
Therefore, a method and apparatus for using a ternary representation of data in standard DRAM cells is shown. In a preferred embodiment, a four bit binary number can be stored using only three ternary DRAM cells, resulting in a 33% storage density increase. This allows the use of existing DRAM while considerably increasing the DRAM's memory storage density. The ternary storage memory apparatus includes a binary to ternary converter which receives a first number of binary bits of data during a write operation and generates a second lesser number of data values or voltages using a ternary representation. A plurality of rows comprising a second number of memory storage elements 240-248 are coupled to the binary to ternary converter and store the respective voltages using the above ternary representation. During reads, a ternary to binary converter converts these voltages into the original binary representation.
Although the method and apparatus of the present invention has been described in connection with the preferred embodiment, it is not intended to be limited to the specific form set forth herein, but on the contrary, it is intended to cover such alternatives, modifications, and equivalents, as can be reasonably included within the spirit and scope of the invention as defined by the appended claims.