The present invention relates to computer memory and, more particularly, to an address detection and translation scheme for memory systems employing discontinuous memory address mapping.
Background of the Invention
Early personal computers, such as the IBM PC and PC/XT, had a maximum system physical address space of one megabyte corresponding to a twenty-bit wide address bus. In other words, the twenty-bit wide address bus limited the computer to an addressing capability of one megabyte, or 2.sup.20 bytes. The architecture of these early personal computers required that primary system memory, or RAM (random access memory), be contiguous and was located in the lower portion, i.e. the first 640 kilobytes, of the system address space. The address space beginning at 640 kilobytes was reserved for memory-mapped input/output devices such as video frame buffers, peripheral board ROMs (read only memory) and ROM BIOS (read only memory basic input/output system). The system memory map, which illustrates the functional divisions of the system address space, is shown in FIG. 1.
Although later generation personal computers, such as those incorporating Intel Corporation 80286 and 80386 microprocessors, can address more than one megabyte of memory, the memory map of FIG. 1 has been carried forward to permit compatibility with the prior computer architectures and existing computer applications and operating systems. For these later generation personal computers, memory mapping for RAM in addition to 640 KB begins at one megabyte.
The density and capacity of the primary memory devices employed within personal computers and other electronic devices have increased substantially in recent years and continue to increase. This increase in memory capacity has been accompanied by the development of equipment and applications requiring greater memory capacities. However, as memory density increases it becomes increasingly difficult to arrange physical memory chips into arrays that leave the gaps in the system memory map that are necessary without wasting portions of the memory that are physically present but not allowed to be accessed. For example, with new technology four-megabit DRAMs memory boards can be constructed utilizing one DRAM per data bus to provide a memory array of sixteen megabytes.
Difficulties in addressing the sixteen-megabyte board and utilizing the full amount of memory residing on the board are presented when this board is installed as the primary memory within a personal computer employing the memory map of FIG. 1, Normally a memory board designed to be plugged into a computer includes either a set of switches or a programmable register for identifying the address range to which the memory board will respond. Addressing the sixteen-megabyte board described above is complicated because a single address range to which the board responds can not be specified. The board must respond to system addresses from zero up to 640 KB and from one MB to sixteen MB. Also, a straight translation of system address space to memory board array addresses would result in the non-utilization of 384 KB of physical memory because of the gap between 640 KB and one MB (1024 KB) in the system memory map.
Objects of the Invention
It is therefore an object of the present invention to provide a new and useful range detection scheme for a memory array.
It is another object of the present invention to provide a new and useful translation scheme for a memory array.
It is yet another object of the present invention to provide a multiple-range detection scheme for a memory board such that the board is responsive to system addresses included within two or more preselected address ranges.
It is still a further object of the present invention to provide such a multiple-range detection scheme including a translation scheme for mapping non-contiguous system addresses to contiguous addresses within the memory board.
It is an additional object of the present invention to provide a new and useful range detection and address translation circuit for a computer primary memory providing address detection for two non-contiguous system address ranges and translation of non-contiguous system addresses to contiguous addresses within the memory.
Summary of the Invention
There is provided, in accordance with the present invention, a split-range address detector and translator for interfacing a system processor with a memory array. The split-range detector includes a first range detector for receiving an input address from the system processor and generating a first range detection signal when the received address is within a first, lower, range of addresses, and a second range detector which also receives the input address and generates a second range detection signal when the input address is within a second, upper, range of addresses. The two output signals are combined together to produce a select signal for the memory array. The address translator is connected to receive the second range detection signal and the input address. The translator generates a translated address by subtracting a predetermined value from the input address. The state of the second range detection signal determines whether the unaltered input address or the translated address is provided as an output to the memory array. The translated address is provided to the memory array when the input address is contained within the upper range of addresses.
In the described embodiment, the first range detector consists of a first comparator having a first input for receiving the input address and a second input for receiving a first range limit value. The comparator provides a HIGH state output signal, i.e. the first range detection signal, when the input address is less than the first range limit value.
The second range detector includes a second comparator having a first input for receiving the input address and a second input for receiving a second range limit value which provides a HIGH state output signal when the input address is greater than or equal to the second range limit value. A third comparator having a first input for receiving the input address and a second input for receiving a third range limit value provides a HIGH state output signal when the input address is less than the third range limit value. An AND gate combines the outputs of the second and third comparator to produce the second range detection signal. The two range detection signals are combined through an OR gate to generate the select signal for the memory array.
The address translator includes a first subtractor having a first input for receiving the second range limit value and a second input for receiving the first range limit value which generates an address offset value equivalent to the difference between the first and second range limit values. A second subtractor having a first input for receiving the input address and a second input for receiving the address offset value generates the translated address. A bus multiplexer having a first input for receiving the first address, a second input connected to receive the translated address, and a select input connected to receive the second range detection signal provides address information to the memory array.
The above and other objects, features, and advantages of the present invention will become apparent from the following description and the attached drawings.
Brief Description of the Drawings
FIG. 1 is a system memory map illustrating the memory usage in personal computers.
FIG. 2 is a block diagram illustration of a range detection and address translation circuit in accordance with the present invention.
Detailed Description of the Preferred Embodiment
A dual or split range detector and address translator circuit that allows a memory board to respond to a first, zero to x, address range; ignore a defined range of addresses between x and y; and respond to a second, y to z, address range is shown in FIG. 2. The circuit includes two major sections, a split range detector 10 and an address translator 30.
Range detector 10 includes three bus comparators, identified by reference numerals 12, 14 and 16. Each comparator is connected to receive address information, referred to as ADRSIN, from the system processor (not shown) via address bus 23. Comparator 12 is also connected to receive a user specified address value ENDR0 which defines the ending address for the first, or lower, address range. The single-bit output of comparator 12 is set to a logic 1 state when ADRSIN is less than ENDR0 and set to a logic 0 state otherwise. Comparator 14 receives a user set address value STARTR1 which specifies the starting address for the second, or upper, address range. The output of comparator 14 is set to a logic 1 state when ADRSIN is greater than or equal to STARTR1 and set to a logic 0 state otherwise. Comparator 16 is connected to receive address value ENDR1, specifying the ending address for the second address range. The output of comparator 16 is set to a logic 1 when ADRSIN is less than ENDR1 and set to a logic 0 state otherwise.
The outputs of comparators 14 and 16 are provided to a two-input AND gate 18. The output of gate 18 is provided to one input terminal of a two-input OR gate 20 and also to address translator 30. The remaining input terminal of gate 20 is connected to the output terminal of comparator 12. The output terminal of OR gate 20 provides the output of split range detector 10, identified as signal SELECT.
Address translator 30 includes a subtractor 32 which is connected to receive address values STARTR1 and ENDR0 and generate an output equal to the difference STARTR1 minus ENDR0. This difference and incoming address signal ADRSIN are provided to the input terminals of a second subtractor 34. Subtractor 34 generates an output value equal to ADRSIN-(START1-ENDR0). Address signal ADRSIN and the output of subtractor 34 are provided to corresponding inputs of a 2:1 bus multiplexer 36. The address provided at the output of multiplexer 36 is selected in response to the output of AND gate 18, referred to as MUXSEL.
Address values ENDR0, STARTR1 and ENDR1, which define the end of the lower address range and the start and end of the upper address range, respectively, are contained within programmable registers, not shown.
In operation, the programmable registers are loaded by the system user with the address values defining the lower and upper address ranges to which the memory board is to respond. For example, an eight-megabyte memory board within a system having a system memory map as shown in FIG. 1 would require the following values for ENDR0, STARTR1 and ENDR1:
ENDR0=640 KB,
STARTR1=1024 KB, and
ENDR1=8576 KB.
The value of 8576 KB for ENDR1 was determined by adding 384 KB, the amount of system address above 640 KB which is reserved for addressing video frame buffers, ROM and ROM BIOS, to eight MB (8192 KB). Thus two address ranges are defined, the lower range including the first 640 KB of the system memory map and the upper range comprising 7552 KB (eight MB less 640 KB) beginning at system address 1024 KB.
Addresses received from the system processor via bus 23 are thereafter compared to address values ENDR0, STARTR1 and ENDR1 to determine if an address on the memory board is being addressed. Board select signal SELECT is set to a logic 1 when the incoming address, ADRSIN, is less than 640 KB, or from 1024 KB up to, but not including, 8576 KB. Multiplexer select signal MUXSEL is set to a logic 1, activating the address translation feature of the present invention, when ADRSIN is from 1024 KB up to 8576 KB.
Within address translator 30, subtractor 32 determines the address offset required to adjust system addresses within the upper range to memory board addresses. Continuing with the present example, the output of subtractor 32 is 384 KB. Subtractor 34 reduces the system address received from bus 23 by the amount of the address offset, e.g. 384 KB.
Multiplexer 36 provides the system address, ADRSIN, to the memory board DRAMs when signal MUXSEL is at a logic 0 state. The translated address, ADRSIN less 384 KB, is provided to the memory board DRAMS when MUXSEL is at a logic 1 state, i.e. when ADRSIN is identified by the range detection circuitry as being within the upper address range.
The operation of the range detector and translator circuits described above is summarized in the table which follows.
The address translation circuitry is constructed to provide quick translation of address information, adjusting the incoming address for the upper range at the same time the address detection circuit is determining the range of the incoming address. This is accomplished by calculating the address offset from the static values ENDR0 and STARTR1 prior to address detection. Subtractor 34 adjusts incoming addresses as they are received from the system processor contemporaneously with range detection. Upon completion of range detection, multiplexer 36 provides either the incoming address or the result of subtractor 34 as the address to be supplied the board memory array.
It can thus be seen that there has been provided by the present invention a simple multiple-range detection and address translation circuit for detection of non-contiguous system address ranges and mapping of non-contiguous system addresses to contiguous addresses within the memory board.
Although the presently preferred embodiment of the invention has been described, it will be understood that various changes may be made within the scope of the appended claims. For example, the address ranges described above are provided for illustration only. Address ranges other than zero to 640 KB and one MB to eight MB may be specified by the system administrator. In addition, an address decoder/translator responsive to more than two address ranges and providing different translations for each range may easily be constructed from the above teaching.