Abstract:
A circuit for enhancing the performance of a random-access-memory-based memory expansion system is disclosed. Memory capacity and a control register are added to the traditional memory mapping circuit. The increased memory is utilized to store several maps simultaneously and the circuit output is then switched from one stored map to another according to data present at the control register outputs. Thus, by pre-loading the circuit with all the memory maps required by a particular program, delay caused by map changes is reduced to the time required to move data to the control register outputs.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to memory expansion systems for microprocessors and more particularly to a high-speed memory mapping system. 
     At one time or another one may desire to expand the storage capability of a particular microcomputer. However, there are two basic limits to storage or memory space: logical and physical. Logically a microcomputer is limited to a certain amount of addressable memory by its instruction set. Any linked set of code is usually confined to a certain logical space, depending upon the address size supported by the instruction set. The maximum number of bits allowed in a typical microcomputer is 16 which yields a total of 64K (K=1024) addresses. The physical limits of memory space are determined by the number of wires carrying an address to the memory. 
     If memory expansion beyond the logical address space is desired, some transformation or translation must be applied to the logical address to convert it to a physical address. This translation consists of combining the logical address, or a portion of it, with a base address which is obtained in a particular manner. The method of selecting the base address and combining it with the logical address has been used to classify memory expansion techniques. The three basic methods of translating a logical address into a physical address are: memory mapping, bank switching, and the use of base registers. 
     Memory mapping involves dividing the logical address into essentially two parts--a descriptor, which is a set of the most significant bits, and a displacement, which is the remaining bits of the address. A function is applied to the descriptor, and the result of this function is a physical address which may be called a page address. The displacement is added to the page to give a physical address. In most cases, the page address is concatenated with the displacement. 
     The transformation or function applied to the descriptor has been normally provided by a binary-to-N line decoder or more recently a read-only-memory (ROM). The ROM is utilized to translate a logical address into a physical address by decoding the address bus. The ROM can infer information about which address is being selected by processing a portion of the address bus through its memory. Such a ROM-based memory mapping system is described in &#34;ROM Decoder for Memory Mapped μP Systems&#34; by S. Bennett, Electronic Engineering. Vol. 51, No. 622, May 1979. However, if one desires to change the memory map in this system the ROM has to be reprogrammed or physically replaced. Therefore considerable time is wasted in changing memory maps. 
     SUMMARY OF THE INVENTION 
     According to the present invention, a random-access memory (RAM)-based memory mapping circuit is provided for expanding the memory addressing capability of a computer. The invention accomplishes this by adding memory capacity and a control register to a conventional mapping circuit. The increased storage capacity is used to store several memory maps simultaneously. The circuit output is switched from one stored map to another by changing the data present at the outputs of the control register. By pre-loading the mapping circuit with the maps required by a particular program, the delay for each map change during program execution is reduced to the time required to load data into the control register. 
     It is, therefore, a primary object of the present invention to provide a RAM-based memory mapping circuit. 
     It is another object of the present invention to provide a means of decreasing the time required to change or replace memory maps. 
     The foregoing and numerous other objects, advantages and inherent functions of the present invention will become apparent as the same is more fully understood from the following description. It should be understood, however, that the several embodiments described are not intended to be exhaustive nor limiting of the invention and are presented as examples only. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the drawings: 
     FIG. 1 is a block diagram of a first memory mapping system embodying the present invention; 
     FIG. 2 is a block diagram of an embodiment of the present invention which utilizes a single RAM; 
     FIG. 3 is a block diagram of an embodiment of the present invention which utilizes multiple RAM&#39;s; and 
     FIG. 4 is a block diagram of an embodiment of the present invention which utilizes multiple RAM&#39;s and a multiplexer. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 shows a RAM 150 which contains a memory map. Main memory 50 may be any combination of ROM&#39;s or RAM&#39;s. Address bus A has its n more significant lines connected to the address lines of RAM 150 and the x remaining address lines connected to main memory 50 as part of address bus B. The output of RAM 150 is also fed to main memory 50 as the N more significant bits of address bus B. In operation, a specific code on the n address lines corresponds to a unique address location within RAM 150. The N-bit data word at this location is placed on the N output lines when this word is addressed. Thus, a code on the upper n address lines of bus A is transformed to a new code on the upper N address lines of bus B. As mentioned above, the lower x lines of address bus A are directly connected to the corresponding x lines of address bus B. 
     The result of the transformation by RAM 150 is that a device (memory, input/output, etc.) at a particular address on address bus B appears (to devices on address bus A) to be located at the address on bus A which was transformed. Since the number of address lines connecting address bus A to RAM 150 is n, 2 n  different binary words may be placed on these lines resulting in 2 n  potentially different words being placed by RAM 150 on the upper N bits of address bus B. Thus, 2 n  blocks of address bus B addresses (each comprising 2 x  contiguous address, where x is the number of less significant bits of the A and B address buses) may be &#34;mapped&#34; into address bus A address space. To change the block of addresses mapped into a particular address space of address bus A, the binary word stored at that particular address space must be replaced. Extensive map changes result in considerable time spent loading RAM 150 with new data. 
     The embodiment of the present invention shown in FIG. 2 overcomes the above-described limitation of the FIG. 1 system. By comparing FIG. 2 to FIG. 1, it can be seen that RAM 150 has been replaced by RAM 200. RAM 200 has increased storage and consequently additional address lines. RAM 200 has (m+n) address lines. The additional m address lines are connected to the outputs of map control register 10. 
     Map control register 10 comprises a data register which is by definition any device capable of maintaining known data on its output lines for a desired length of time. A data register is also capable of being loaded with new data for presentation at its outputs when desired. Examples of specific devices which satisfy the above definition are: RAM&#39;s, shift registers, addressable latches and first-in, first-out (FIFO) registers. 
     For each unique binary code on the m input lines of the (m+n) address lines of RAM 200 an independent set, or map, of 2 n  address blocks may be available in RAM 200. Therefore, changing from one memory map to another may be accomplished by changing the output of map control register 10. Map control register 10 is essentially a storage latch for the map selection and its output may be changed by loading new data via LOAD DATA bus 15. In the embodiment of FIG. 2, 2 n  possible maps may be selected. 
     FIG. 3 depicts an alternative embodiment of the present invention wherein a plurality of RAM&#39;s are utilized each one containing a different memory map. Address bus A comprises (n+x) lines, n lines of which address each one of the RAM&#39;s. The remaining x lines of address bus A form part of address bus B. The other part of address bus B is the N data outputs of each RAM. Thus, address bus B comprises (x+N) lines. N is typically greater than n. Map control register 10 has m data output lines each one of which is connected to the output enable input of one of the RAM&#39;s. Data loaded into map control register 10 via data bus 15 selects one RAM enable input and, therefore, the map contained in that RAM is available to address bus B. 
     FIG. 4 is illustrative of another embodiment of the present invention. In this embodiment, the output enable lines of the RAM&#39;s are not utilized and the outputs of the RAM&#39;s are selected by a multiplexer. Address bus A comprises (n+x) lines, n lines of which address each one of the RAM&#39;s over an n-line address bus. The x lines of address bus A form part of address bus B. The other part of address bus B comprises the multiplexed N data outputs of the RAM&#39;s. 
     The N output lines of each RAM are connected to an input channel of data multiplexer 100. Channel selection is made by the output of map control register 10. Thus, the map stored in the RAM connected to the selected channel is made available to address bus B via the output of multiplexer 100. Multiplexer 100 may be any commercially available data multiplexer. 
     From the foregoing it will be seen that the applicant has provided a new and novel memory mapping circuit. It also will be seen that the foregoing specification has not been burdened by the inclusion of large amounts of detail and specific information relative to such matters as circuitry, timing, and the like. This information is felt to be within the skill of the art. Publications which relate to the above matters and which are herein incorporated by reference, are: Microcomputer Design, C. A. Ogdin, copyright 1978, by Prentice-Hall, Inc., and Introduction to Microcomputer System Design, H. Garland, copyright 1979 by McGraw-Hill, Inc. 
     It should be noted that the various embodiments of the invention which are shown and described herein are intended to be illustrative and not restrictive of the invention. Therefore, the appended claims are intended to cover all modifications which fall within the scope of the foregoing specification.