WO2015172419A1 - 一种计算机系统及数据读写方法 - Google Patents

一种计算机系统及数据读写方法 Download PDF

Info

Publication number
WO2015172419A1
WO2015172419A1 PCT/CN2014/080343 CN2014080343W WO2015172419A1 WO 2015172419 A1 WO2015172419 A1 WO 2015172419A1 CN 2014080343 W CN2014080343 W CN 2014080343W WO 2015172419 A1 WO2015172419 A1 WO 2015172419A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
address
latch
word
unit
Prior art date
Application number
PCT/CN2014/080343
Other languages
English (en)
French (fr)
Inventor
金翊
欧阳山
沈云付
彭俊杰
刘学民
Original Assignee
上海大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海大学 filed Critical 上海大学
Priority to US15/116,882 priority Critical patent/US10042759B2/en
Publication of WO2015172419A1 publication Critical patent/WO2015172419A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C8/00Arrangements for selecting an address in a digital store
    • G11C8/06Address interface arrangements, e.g. address buffers
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C8/00Arrangements for selecting an address in a digital store
    • G11C8/10Decoders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration

Definitions

  • the present invention relates to the field of data calling technologies, and in particular, to a computer system and a data reading and writing method. Background technique
  • External storage refers to memory other than computer memory and CPU cache. It is characterized by the ability to save data after power is turned off.
  • the common external storage in computer systems is floppy disk storage, hard disk storage, optical disk storage, etc.
  • the hard disk is commonly used in current microcomputer systems.
  • the memory is a memory for temporarily storing the operational data in the CPU and the data exchanged with the external memory such as the hard disk. As long as the computer is running, the CPU transfers the data to be operated to the memory for calculation. The CPU then transmits the result.
  • the temporary storage of memory also determines that it is loss of power.
  • the memory in a traditional computer system is composed of a memory chip, a circuit board, and a gold finger.
  • the design goal of the memory space is to construct a memory that the CPU can read and write randomly in units of words (or bytes), and the design of the external memory space is to store in a limited storage space as much as possible. More data. Therefore, N+1 (N is a positive integer) address lines are constructed in the memory space to randomly address the memory cells, and the data bits of each memory cell are equal to the width of the CPU data bus.
  • N+1 N is a positive integer
  • the structure makes only 2 N+1 memory cells in the storage space, and the storage capacity of the entire memory space is only 2 N+1 words (or bytes); for the external storage space, the address represented by software can be constructed.
  • the number of data bits per external memory unit is "block capacity".
  • the number of address bits that the software can express is much larger than the number of address lines constructed by the CPU, N+1, the number of address bits in the external memory space is far more than the number of address bits in the memory space. Moreover, since the number of bits of data stored in the "block capacity" is far more than the width of the data bus of the CPU, the storage capacity of the external memory space can also be much larger than the storage capacity of the memory space. On the other hand, since the address of the external memory space is represented by software, the external memory space can only be The underlying software access of the system, the CPU can not directly read and write the external memory unit in the external storage space through the machine instruction.
  • the CPU in the traditional computer system, if it is necessary to extract the data stored in the external storage space, the CPU must first transfer the data of the external storage space into the memory space, and then can randomly search through the machine instruction. Address, so the mapping between memory space and external memory space uses the content copy method, that is, memory relocation technology.
  • the so-called memory relocation technology refers to the process of transforming the logical address space of a program into the actual physical address space in the memory when performing data addressing.
  • the specific method is: when the CPU uses machine instructions to access data on the external memory. The CPU first makes a request to the underlying software, and the underlying software addresses the external memory, and copies the found data into the internal memory, and then informs the CPU of the memory address of the copy.
  • the CPU then reads and writes the copy through machine instructions.
  • the above traditional method of data calling has obvious drawbacks, that is, a large amount of data is executed between the external memory and the memory, which delays the access of the CPU machine instruction to the data, and the long-time data calling operation easily leads to memory and external memory.
  • the data transfer channel between them becomes crowded, and the operation time for transferring data and calling data is increased, which consumes more system resources.
  • Chinese patent (CN1403921) discloses a data exchange and storage method and device, relating to the field of data processing technology, for realizing between various storage devices, including a mobile storage disk and a memory card as external storage devices, and the like Data is exchanged between hosts of the data processing system, or data read from one party is stored in any one or both of the three parties.
  • the device in the technical solution itself has data processing capability, and the device is not connected to the device.
  • data in an external storage device can be stored in an internal storage module, or data in an internal storage module can be stored in an external storage device.
  • the above technical solution is still limited to the description and improvement of data exchange between external storage (external storage device) and memory (internal storage module), and cannot solve the problems existing in the prior art.
  • the Chinese patent discloses a method for reading data in the memory, and sets a sampling clock DATA_CLK having a phase difference Tph from the memory controller main clock MCLK, and includes the following steps: A.
  • the memory controller is in the main clock domain. Sending a read control signal and a read address to the memory; B. receiving data stored in the read address of the memory output in the sampling clock domain, and buffering the received data; C. the memory controller is in the main clock domain, reading Take the cached data.
  • a system for reading data in memory only relates to the data interaction process between the memory and the processor, that is, the process of the processor reading the data from the memory, and does not solve the problems existing in the prior art. Summary of the invention
  • the conventional data calling method causes the data transmission channel between the external storage space and the memory space to be blocked, increases the operation time of transmitting data and calling data, and consumes more systems.
  • Resources now provide a computer system and data read and write operations, including:
  • a computer system comprising a processor and a memory, the memory comprising a plurality of memory cells and being divided into a plurality of equally sized memory blocks; each of the memory cells having a word address, accessed by a word address line;
  • the storage block has a block address and is accessed through a block address line, and the method further includes:
  • An addressing component respectively coupled to a high bit of the processor memory address line and a high bit of the word address line of the memory, and controllable to perform the processing within a predetermined range of consecutive or discontinuous on the memory
  • the upper bits of the memory address formed by the device are converted into the corresponding upper bits of the memory word address and output to the memory;
  • the lower bit of the processor memory address line is connected to a lower bit of the word address line of the memory; the preset range is less than or equal to an addressing range of the processor memory address line; and the processor Setting a range, changing a storage unit of the memory covered by the preset range.
  • the addressing component includes a plurality of latch units, an output of each of the latch units is coupled to a high bit of a word address line of the memory, and each of the latch units stores a memory cell a high level of the word address, the memory cells of the memory covered by the upper bits of the word address of the memory cells stored by all of the latch units form the preset range, and the processor stores the latch unit by modifying The high bit of the word address of the memory cell changes the preset range.
  • the addressing component includes a first decoding unit, and an input end of the first decoding unit is connected to a memory address line of the processor, and an output end of the first decoding unit
  • the latch units are respectively connected, and the first decoding unit outputs according to one of the latch units corresponding to the upper bit of the memory address formed by the processor.
  • the memory cell of the memory is divided into a plurality of regions of the same size according to a word address, and a high bit of a word address of the memory cell stored in each of the latch cells corresponds to a word address of the region. address;
  • the processor selects an area where the current target file is located when modifying a high bit of the word address of the storage unit stored in the latch unit, and assigns a high bit of the first address of the selected area to a lock Save the unit.
  • At least one of the plurality of latch units includes a first type of latch unit, and a high bit of a word address of the memory unit stored by the first type of latch unit cannot be modified.
  • the area where the word address corresponding to the upper digit of the word address of the memory unit stored by the first type of latch unit is located is used to store the operating system.
  • the write ends of all the latch units are addressed to the addressing range of the memory address line of the processor. And connected to the lower bits of the memory address line of the processor.
  • the addressing component includes a second decoding unit, and an input end of the second decoding unit is respectively connected to an output end of each of the latch units, and an output end of the second decoding unit Connected to the memory, the second decoding unit is configured to address the memory with the upper portion of the word address according to the upper bit of the memory word address output by the selected latch unit.
  • the latch unit is mainly formed by a set of latches.
  • the first decoding unit is mainly formed by a group of decoder chips.
  • the second decoding unit is mainly formed by a group of decoder chips.
  • Another aspect of the present invention includes a data reading and writing method, wherein, as applied to the computer system as described above, the method specifically includes:
  • Step 1 Determine whether the target file of the read/write request is stored in the storage unit set currently covered by the preset range, and if the target file is stored in the storage unit set currently covered by the preset range, perform step 2, Otherwise, step 6 is performed;
  • Step 2 The processor generates a memory address, where a high bit of the memory address is sent to the addressing component, and a lower bit of the memory address is sent to the memory;
  • Step 3 The addressing component converts a high bit of the memory address into a high bit of a corresponding word address of the memory and outputs the bit to the memory;
  • Step 4 the memory combines a high bit of the word address output by the addressing component and a low bit of the memory address into a word address, and strobed the word address corresponding storage unit to connect with the processor. Read and write operations;
  • Step 5 The processor uses the memory read/write mode to log from the current working memory According to the read and write operations, and exit waiting for the next read and write request;
  • Step 6 The processor changes the set of storage units covered by the preset range on the memory, so that the target file of the read/write request is in a storage unit covered by the memory in the preset range. Within the collection, go to step 2 to continue.
  • FIG. 1 is a schematic structural view of a computer system in a preferred embodiment of the present invention
  • FIG. 2 is a schematic flow chart of a data reading and writing method in a preferred embodiment of the present invention
  • a schematic structural diagram of a latch unit In a preferred embodiment, a schematic structural diagram of a latch unit
  • FIG. 4 is a schematic diagram of a connection structure of a computer system in a preferred embodiment of the present invention
  • FIG. 5 is a schematic diagram of a mechanism of a memory in a preferred embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a mapping window partitioning and management table in a preferred embodiment of the present invention
  • FIG. 7 is a schematic structural diagram of a mapping window management table in a preferred embodiment of the present invention
  • FIG. 8(A) 8(C) is a schematic view showing the arrangement and use of a non-closeable window in a preferred embodiment of the present invention.
  • the memory and the external memory are separated, so that the system needs to frequently transfer data between the memory and the external memory when calling the data.
  • the problem of copying provides a technical solution for constructing two kinds of storage spaces on a memory and reading and writing data thereon, including:
  • a computer system includes a processor 100 and a memory 200.
  • the memory 200 includes a plurality of memory cells and is divided into a plurality of memory blocks of equal size;
  • the memory cells have word addresses, accessed by word address lines 210; each memory block has a block address, accessed by block address line 220, and the form accessed by block address line 220 is accessed in the prior art system.
  • the form since this form is not the goal of the technical solution of the present invention, the system is no longer deployed by accessing the memory 200 through the block address line 220.
  • the method further includes: an addressing component 300 coupled to the upper bits of the memory address line 110 of the processor 100 and the upper bits of the word address line 210 of the memory 200, and a controllable continuous or discontinuous preset on the memory 200.
  • the upper bits of the memory address formed by the processor 100 are converted into the upper bits of the corresponding memory word address and output to the memory 200;
  • the lower bits of the memory address line 110 of the processor 100 are coupled to the lower bits of the word address line 210 of the memory 200;
  • the preset range is less than or equal to the addressing range of the memory address line 110 of the processor 100; the processor 100 changes the storage unit of the memory 200 covered by the preset range by modifying the preset range.
  • the preset range on the memory 200 is equivalent to the memory in the prior art, and the processor 100 accesses the preset range through the addressing component 300, which is equivalent to the processor accessing the memory in the prior art, when the target file is absent.
  • the processor 100 changes the preset range to the storage unit covered by the memory 200, so that the target file falls within the preset range, which is equivalent to the prior art.
  • the target file in the external memory is written into the memory.
  • the access to the memory and the external memory is implemented on a memory 200, so that the memory and the external memory are not separately set, which saves resources, and at the same time, the technical solution of the present invention requires a memory that requires a large number of read and write operations.
  • the data exchange with the external storage changes to the storage unit covered by the preset range, which greatly reduces the overhead of the system and improves the running speed of the system.
  • the upper bits of the memory address formed by the processor 100 are converted by the addressing component 300 to form a high bit of the word address of the memory 200, and cooperate with the low bit of the memory address formed by the processor 100, thereby implementing processing.
  • the device 100 accesses the memory 200 having a capacity greater than the addressing capability of the processor 100.
  • the storage unit that changes the preset range coverage can be implemented.
  • the address translation policy of the addressing component 300 can be implemented by hardware or by software.
  • the invention is not limited to the implementation manner.
  • an implementation manner of implementing conversion in hardware will be described below. A brief description of the technical solution.
  • the addressing component 300 can include a plurality of latching units 301, the output of each latching unit 301 being coupled to the upper bits of the word address lines 210 of the memory 200, each latching unit 301 storing The upper bits of the word address of a memory cell, the memory cells of the memory 200 of the upper address of the word address of all the memory cells stored by the latch unit 301 form a preset range, and the processor 100 modifies the memory cells stored in the latch unit 301 by modifying The high bit of the word address changes the preset range.
  • the implementation of the addressing component 300 described above is preset by a high bit of a word address of a memory cell of the memory 200 stored in each of the plurality of latch units 301, and the preset range may be continuous or discontinuous, and The processor 100 can modify the high bits of the word address of the memory cells stored in one or several or all of the latch units 301 at a time to implement a partial or all change to the preset range as needed.
  • the addressing component 300 can further include a first decoding unit 302.
  • the input end of the first decoding unit 302 is connected to the upper end of the memory address line 110 of the processor 100.
  • the output terminal of the code unit 302 is connected to each of the latch units 301, and the first decoding unit 302 performs output according to a latch unit 301 corresponding to the upper bit of the memory address formed by the processor 100.
  • the implementation method of using the first decoding unit 302 to cooperate with the latch unit 301 is only an implementation manner of the address translation strategy of the addressing component 300 in the technical solution of the present invention, and cannot limit the protection of the present invention. range.
  • the memory cells of the memory 200 are divided into a plurality of regions of the same size according to word addresses, and the upper bits of the word addresses of the memory cells stored in each of the latch cells 301 correspond to the word addresses of one region.
  • First address The processor 100 modifies the upper bit of the word address of the memory cell of the memory 200 in the latch, selects an area in which the current target file is located, and assigns the upper bit of the first address of the selected area to a latch unit 301.
  • the above technical solution defines the logical division of the memory 200 into regions of the same size, and causes the upper bits of the word address of the memory 200 stored in one latch unit 301 to cover exactly one region, thereby causing the processor 100 to modify the latch unit.
  • the upper bits of the word address of the memory 200 stored in 301 can directly assign the upper bits of the first address of the selected area to a latch unit 301.
  • the areas corresponding to the latch unit 301 can be avoided.
  • the occurrence of an overlap results in a reduction in the actual capacity of the preset range, which in turn results in a decrease in the addressing capability of the processor 100.
  • the plurality of latch units 301 includes at least one first type of latch, and the upper bits of the word address of the memory cells stored by the first type of latches are not modifiable.
  • the first type of latch can be used to point to the area where the files that the system often needs to access, in order to avoid frequent changes to the preset range of the system, resulting in reduced system operation efficiency.
  • the area of the word address corresponding to the upper bit of the word address of the memory cell stored by the first type of latch is used to store the operating system.
  • the operating system is usually the most frequently accessed file of the computer system, and usually the location of the operating system on the storage device does not change, so the area of the word address corresponding to the upper address of the word address of the storage unit of the first type of latch is located.
  • the storage of the operating system is beneficial to the efficiency of the system.
  • the addressing component 300 includes a second decoding unit 303.
  • the input end of the second decoding unit 303 is respectively connected to the output end of each latch unit 301, and the second decoding unit is respectively connected.
  • the output of the 303 is coupled to the memory 200.
  • the second decoding unit 303 is configured to address the upper portion of the word address of the memory 200 in accordance with the upper bits of the memory word address output by the selected latch unit 301.
  • latch unit 301 can be formed primarily of a set of latches.
  • the technical solution of the present invention further includes a data reading and writing method, which can be applied to the computer system as described above, and the steps specifically include:
  • Step 1 determining whether the target file of the read/write request is stored in the storage unit set currently covered by the preset range, and executing step 2 if the target file is stored in the storage unit set currently covered by the preset range, otherwise executing the step 6;
  • Step 2 The processor generates a memory address, and the upper bit of the memory address is sent to the addressing component, and the lower bit of the memory address is sent to the memory;
  • Step 3 The addressing component converts the high bit of the memory address into the high bit of the corresponding memory word address and outputs it to the memory;
  • Step 4 The memory combines the upper bits of the word address output by the addressing component and the lower bits of the memory address into a word address, and the strobe word address corresponding storage unit is connected to the processor for reading and writing operations;
  • Step 5 The processor reads and writes data from the current working memory by using the memory read and write mode, and exits waiting for the next read and write request;
  • Step 6 The processor changes the set of storage units covered by the preset in the preset range, so that the target file of the read/write request is within the preset range of the storage unit covered by the memory, and then proceeds to step 2 to continue execution.
  • Block Address The serial number of the sequence of the memory unit 201 in the data block in the memory 200, that is, the sequence of the memory address when the system addresses the component 300 through the block address line 220 and reads and writes the memory 200 in the external memory mode. number.
  • Block space A sequence of all block addresses.
  • the block space is the storage space on the memory 200 connected by the block address line 220, that is, the external storage space in the conventional sense.
  • Word Address The serial number of the memory unit 201 in memory 200 in units of memory space data width.
  • the memory space data width is equal to the data bus width of the processor 100 (CPU).
  • Word space A sequence of all word addresses.
  • the word space is the memory space on the memory 200 connected by word address lines 210.
  • word address line 210 and the block address line 220 are respectively connected to the same memory.
  • Dual space memory memory with both block space and word space, ie in the same storage
  • the memory of the word address line and the block address line is connected to the memory, that is, the memory 200 described in the preferred embodiment of the present invention.
  • Map window A range of determined memory addresses that can be assigned to a local range of memory space 200 that are contiguous and must not be subdivided.
  • one of the mapping windows corresponds to a continuous memory address of an area, and all the areas corresponding to the mapping window constitute the preset range.
  • Current mapping window A mapping window accessed by the current machine instruction of processor 100 (referred to below by the CPU).
  • the current mapping window is the area in which the memory cells of the currently strobed memory are located.
  • Map window first address The minimum memory address contained in a map window.
  • Mapping window The total amount of memory addresses contained in a mapping window.
  • the window size of a mapping window is equal to the maximum value of the memory address contained therein minus the first address of the mapping window plus one.
  • Mapping window number The serial number of the mapping window.
  • Window wall A storage unit that is contiguous in word space of a double-space memory in which a mapping window is placed.
  • a window wall is a collection of consecutive plurality of memory cells in memory 200 corresponding to a mapping window, i.e., an area in a preferred embodiment of the invention.
  • Window wall number The serial number of the window wall.
  • Window bit is the word space address of a memory 200 to which the mapping window head address can be assigned.
  • a common understanding is the location of the mapping window in the word space.
  • Shift Latch Indicates the window level in which a mapping window is currently located. The value is the window wall number corresponding to the window wall where the mapping window is located, that is, the latch unit 301 mentioned in the preferred embodiment of the present invention.
  • Shift Latch Group All shift latches are arranged into a sequence table.
  • Shift Latch Number The serial number of the shift latch in the shift latch group. When the shift latch is sorted by the map window number, the shift latch number is the same as the map window number.
  • Shift The operation of assigning a mapping window to a window wall is implemented in a preferred embodiment of the invention by modifying the value stored in latch unit 301.
  • Window opening The current state of the window wall to which a mapping window is assigned.
  • Closed window The current state of the window wall assigned by the no map window.
  • Non-closeable window The window to which the map window assigned to it cannot be moved, corresponding to the area pointed by the first type of latch in the preferred embodiment of the present invention.
  • the window wall where the current mapping window is located corresponds to the area pointed by the latch unit 301 currently gated by the first decoding unit 302 in the preferred embodiment of the present invention.
  • the object of the present invention can be attributed to: converting the upper bits of the memory address generated by the CPU to the upper address of the word address of the memory 200, that is, the mapping window, by the addressing component 300.
  • a window bit combined with a lower address of the memory address generated by the CPU to form a word address of the memory 200 to gate a memory cell on the memory 200 within a predetermined range, when the target file of the read/write request is not within the preset range
  • Reorganizing the preset range by changing the position of one or several mapping windows constituting the preset range on the memory 200, so that one or several mapping windows are moved to the window wall where the target file of the read/write request is located, thereby reorganizing
  • the subsequent preset range contains the storage unit where the target file for the read and write request is located.
  • the computer system designed according to the object of the invention only needs one memory, so there is no memory and external memory, but the block space and the word space are simultaneously constructed on this memory.
  • the memory of this structure is referred to as a dual space memory, and the CPU uses the mapping window of the memory space to perform randomized random access to the word space of the dual space memory, thereby eliminating the traditional computer system.
  • a technical solution for achieving the above object of the invention is a method for shifting a memory space of a computer on a dual space memory: using a shifting latch group to implement a word in a mapping window that is divided into memory spaces The address is mapped to an equal-number and consecutively addressed word space address on the word space of the dual-space memory. After the mapping is completed, the CPU accesses the word address in the mapping window to implement randomization of the word space on the dual-space memory. Access operation.
  • Changing the value of a certain shift latch in the shift latch group can map the memory address corresponding to the corresponding mapping window to another position on the word space of the dual space memory, which is equivalent to moving the mapping window to another A location, and thus in a preferred embodiment of the invention, such movement can be visually referred to as a shifting operation of a mapping window to a memory space.
  • the difference between the word space and the memory space on the dual space memory is:
  • the storage capacity of the memory space is determined by the number of memory address lines of the CPU, which is generally equal to the number of physical addresses given in the machine instructions of the computer system.
  • the capacity of the word space on the dual space memory in the preferred embodiment of the present invention is not limited by the number of memory address lines of the CPU.
  • the word space is associated with the block space in that they are address spaces on the same memory (i.e., dual spatial memory), so the total storage capacity identified by the two is equal.
  • Gp The block space size multiplied by the block size is equal to the word space size multiplied by the word length.
  • the block size is 2 X words (X is a positive integer), ie the words inside the block are addressed with X-bit word addressing lines, typically the lower X bits of the word space address, then the word space
  • the number of bits in the address higher than X is equal to the number of bits in the block space address, that is, the number of bits of the word address addressing line of the word space is equal to the number of bits in the block space address + ⁇ low bits. Therefore, in this case, the block space address is the upper part of the word space address.
  • the block size may be defined as an integer multiple of the area (i.e., window wall) capacity, and the window wall capacity may be defined as an integer multiple of the block capacity.
  • FIG. 4 is a schematic diagram showing the circuit structure of the above computer system in a preferred embodiment of the present invention.
  • the overall structure of the system in this embodiment includes: a CPU 1, a memory address decoding array 2, a shift latch group 3, and a dual space memory 4.
  • the principle is shown in FIG. 4, wherein the CPU 1 is a specific embodiment of the processor 100.
  • the memory address decoding array 2 is a specific embodiment of the first decoding unit 302.
  • the shift latch group 3 is a specific embodiment of the plurality of latch units 301.
  • the dual space memory 4 is a memory 200. A specific embodiment.
  • the CPU of the IA32 architecture is taken as an example, but it does not mean that the CPU of the IA32 architecture can be used as the limitation of the protection scope of the present invention.
  • the specific connection line may have a corresponding change, but the change is not necessary for the technical personnel of the present invention based on the technical solution of the present invention. It can be obtained by creative labor and should therefore be included in the scope of protection of the present invention.
  • the data bus of the CPU of the IA32 architecture has a width of 32 bits, and the data bus DB 31 ⁇ is used. Indicates; the address bus width is 32 bits, using the address bus AB 31 ⁇ .
  • the read/write control line is represented by a read/write control line R/W (in the preferred embodiment of the present invention, the superscript "#" indicates "following" or "low level active").
  • the memory access control line of the CPU 1 1 / ⁇ # space through the word and write control line # 4 double word space memory space read and write control lines WE # connection;?
  • Corresponding connection; and the address bus AB 3 of the CPU 1 is divided into two parts, wherein the lower p address line AB ( P - 1 ⁇ . through the low p bit word space word address line W ( p - ⁇ .
  • the embodiment shown in FIG. 4 works by giving a 32-bit memory address Ad 31 ⁇ when the CPU 1 accesses the memory.
  • the upper 32-p bit of the memory address Ad 31 i enters the memory address decoding array 2 through the upper address line ; 31 ⁇ ; the memory address decoding array 2 decodes the high 32-p bit Ad 31 i of the memory address,
  • the memory address decoding array 2 has one and only one output pin being an active level; the active level output pin controls the output of one of the latches in the shift latch group 3; the active latch
  • the saved value is sent to the upper word space addressing line; at the same time the lower part of the memory address is Ad ( p - 1 ⁇ . through the low p bit address line AB ( P - 1 ⁇ .
  • the lower word space addressing line is fed) ⁇ (P - D ⁇ , then word space addressing line W M ⁇ . Addressing the word space of the dual space memory 4, under the control of the valid signal of the word space read and write control line W#, the addressed word
  • the space storage unit transmits data to the CPU 1 through the word data transfer line DB 31 ⁇
  • a continuous and non-re-divided memory address assigned to the local range of the word space is the value of Ad( p - 1 ⁇ . Therefore, this system
  • the address of each mapping window is Ad ( p - ⁇ ., the window width is 2%, there are 2 ( 31 - p) shift latches, and each shift latch corresponds to one mapping window. Because of each shift The latch has Mp bits, so the word space has 2 M+1 bytes, which is 2 M - 31 times larger than the memory space, and is divided into 2 ( M - p) window walls.
  • the shifting principle can be simply stated as assuming that the total number of memory address lines of the CPU 1 is N+1 and the total number of word space address lines of the dual space memory 4 is M+l.
  • a low p-bit memory address line is used to form a mapping window, and the window width is 2.
  • the CPU1 When the CPU1 outputs a memory address of N+1 bit, its high n bit is selected by the memory address decoding array 2 to select a shift latch in the latch group 3, which is called the selected shift latch.
  • the corresponding mapping window is the current mapping window, and the shift latch outputs the high m bits of the word space address of the dual spatial memory 4, the value of m gives the current window wall where the current mapping window is located, and the CPU 1 accesses the current through the current mapping window. Word data on the window wall. If CPU1 accesses consecutive memory addresses, the value of n does not change, and the selected shift latch does not change, then the current mapping window does not change, and CPU1 accesses consecutive addresses of the same window wall.
  • the other shift latch in the shift latch group 3 is selected by the memory address decoding array 2, and the current mapping window is changed to the selected lock.
  • the corresponding mapping window of the register, the m-bit data output by the latch positions the current mapping window to another window wall, that is, the current mapping window is moved to the new window wall.
  • the shift lock can be The data input end of the memory is disposed on the upper window wall of the word space of the dual space memory 4, and the structure of the push latch is characterized in that: the data input end of the shift latch is located in the word space of the dual space memory 4.
  • the data output is the upper address line of the double space memory 4 word space for addressing the word space of the dual space memory 4.
  • the data input of the shift latch can be placed in the user invisible window of the word space of the dual space memory 4 to protect the push latch.
  • a dashed box shows a dual-space memory structure constructed with 1073741824 Nor Flash type RAM chips EN29GL256 (hereinafter simply referred to as memory chip 40).
  • memory chip 40 1073741824 Nor Flash type RAM chips EN29GL256
  • the specific device selection and quantity of the above-mentioned chips are required for the description, and the scope of protection of the present invention is not limited thereto.
  • a word space upper address decoder 41 (a specific embodiment of the second decoding unit 303) and 268435456 memory sub-blocks 42 are included.
  • the storage sub-body 42 is numbered from No. 0000000 to No. 268435455, and each storage sub-body 42 includes four memory chips 40, as indicated in FIG. No. 268435455 is shown as storage sub-body 42.
  • a preferred double space memory 4 word space address line AC M ⁇ is (M value is the number of bits of the word space address -1): the on-chip address pins A 21 4 of the four memory chips 40 are connected to each other to form the word space address line AC 24 of the memory sub-body 42. 2 , due to the logical byte select line B 3 ⁇ . Is the word space address line AC ⁇ n word space address line AC. After decoding the output line, then the word space address line AC 24 ⁇ 2 and the byte select line B 3 ⁇ . Together, the word space address line AC 24 ⁇ of the memory sub-body 42 is formed.
  • the chip select terminals 0 ⁇ of the four memory chips 40 are respectively connected together through the tristate gate k0 tristate gate k1, the tristate gate k2 and the tristate gate k3, after passing through the non-gate f,
  • the pins of the output pin of the word space upper address decoder 41 are connected with the same subscript number, and thus, the input terminal of the word space upper address decoder 41 is the upper part of the word address of the dual space memory 4, in FIG. Marked as AC 52 ⁇ 25 , then the address line pins of the dual space memory are AC 52 ⁇ 25 AC 24 ⁇ 2 and B 3 ⁇ . There are a total of 53 logically, so the double space stores 8P bytes.
  • the way to form it is: pin BE of CPU1. After taking "not", the word space addressing line has the lowest 2 bits W ⁇ n W.
  • the role of the four lines is called the logical word space addressing line minimum 2 bits; CPU1 memory address line AB 2 . ⁇ 2 directly as a word Spatial addressing line W 2 . ⁇ 2 ; CPU1 high 11-bit address line AB 31 ⁇ 2 ⁇ into the address of the memory address decode array 2.
  • the output enable terminals E 2 of the same latches of the subscripts in the shift latch group 3 are respectively connected. 47 ⁇ .
  • dual space memory word space address line AC M ⁇ The connection method is as follows: Since the memory sub-body 42 in FIG. 5 has 25 address lines, it can be used by W 24 ⁇ 2 and the pin BE of CPU1. The lowest 25-bit word space addressing line formed after the NAND is connected to the subspace address lines AC 24 ⁇ 2 and the byte select line B 3 ⁇ of the memory sub-block 42 through the tri-state gate k5 and the tri-state gate k6.
  • the upper 28-bit word space addressing lines W 52 ⁇ 25 pass through the three-state gate k4 suffix space upper address decoder 41 input terminals AC 52 ⁇ 25 , word space high address decoder 41 output end H0 leg 35455 ⁇ .
  • One preferred way to control access to a memory space of the double word space is 4: embodiment shown in FIG. 5 embodiment, the output of each memory chip 40 0E # control terminal and the inverted write control terminal WE # together and to the reader where the memory sub-control terminal 42 of the 0 / W #, the sub-memory write control terminal 42 through the tri-state gate # 0 connected to the control terminal of the CPU1 k7 write R / W #, and the three
  • the gate k7 is controlled by the access control pin M/I0 # of CPU1.
  • the tristate gate k7 is turned on when the access control pin M/I0 # is high, and the access control pin is accessed only when the CPU1 accesses the memory.
  • M/I0 # only outputs a high level, so CPU1's access to the word space can only be accessed by memory.
  • the access control pin M/I0 # and the memory read/write control line R/W # are both high, and the read/write control terminal 0/W# of the storage sub-body 42 is high.
  • the word space write control line WE # of each memory chip 40 in the memory sub-body 42 is invalidated, and the read/write control terminal 0/W # of the memory sub-body 42 is inverted to cause the output control terminal 0E of the memory chip 40.
  • the memory chip 40 outputs data to the CPU1, Similarly, when CPU1 gives a write memory instruction, the access control pin M/I0 # is high. The memory read/write control line R/W # is at a low level, so the memory chip 40 receives the data sent from the CPU 1.
  • a preferred double-space memory 4 word space access process is: access word space corresponds to CPU1 accessing memory, at this time block manager 43 does not work, block manager 43 output c is low level and block management The other outputs of the device 43 are all off, so the three-state gate k4, the three-state gate k5 and the three-state gate k6 are all on, and the value of the word space address line is derived from the memory address bus and the shift lock of the CPU 1.
  • the output of the memory at this time the system works, specifically: When the CPU1 accesses the memory, the memory address bus AB 31 ⁇ 2 and the pin BE. The 32-bit memory address is sent up, and its lower 21-bit memory address bus AB 2 . ⁇ 2 and BE.
  • the three-state gate k5 and the three-state gate k6 that are not passed through are connected to the respective memory sub-blocks 42 to form the lower 21-bit address Ad 2 of the dual-space memory 4.
  • ⁇ . (The word space is addressed by the double-space memory 4, the address line AC 2 . 2 and the byte select line B 3 ⁇ .), to achieve byte addressing within the 2M address range of the word space of the dual space memory 4, by This constitutes the mapping window of the system shown in FIG. 5; the upper 1 1 address bus of the CPU 1 is connected to the address end of the memory address decoding array 2 by 13 13 31 to 21 .
  • one of the 2K latches in the shift latch group 3 is selected, that is, the transition vector is selected; the encoded value of the high 11-bit memory address eight 13 31 to 21 generated by the CPU 1
  • the selected one of the shift latches will pass its saved 32-bit value through the output pin 0 31 of the shift latch group 3.
  • the word space addressing lines W 52 ⁇ 21 are output to the upper bits ; wherein the word space addressing lines W 24 ⁇ 21 are connected to the address lines AC 24 ⁇ 21 of the memory sub-blocks 42 through the open tri-state gate k5 to select the memory.
  • the shifting latch group 3 since the shifting latch group 3 is used to perform the shifting operation of the mapping window, if the user can directly push the mapping window at will, the security of the entire software system will be brought. Fatal danger, therefore, under no circumstances can any user's application be allowed to push any mapping window, including the ability to push its own mapping window, but only to the operating system to request access to the word space of the dual space memory 4,
  • the operating system converts the user's request into a mapping window request to the underlying control software, and the underlying control software implements a mapping window moving operation for the user.
  • the way to ensure that the user can't push the map window is to not allow the user to access the shift latch group.
  • One way to achieve this is to place the shifting latch set in a special location in the word space of the dual spatial memory 4 accessible only by the system manufacturer's dedicated underlying control software, and to perform operations that assign values to this area. Strict restrictions.
  • the push latch corresponding to the software that automatically recovers the system life and the system is set to be unmodifiable, and even the latches of these several map windows are changed to the unmodifiable latch, the system can be guaranteed Basic security in any situation.
  • the above-mentioned unmodifiable latch is a specific implementation of the first type of latch.
  • the shift latch points to a new position of the word space of the dual space memory 4, and the corresponding map window is positioned at the window wall with the new position as the window level.
  • windowing in the preferred embodiment of the invention
  • the current state of the window wall that is not directed by any of the latching latches is preferred in the preferred embodiment of the invention. It is called a closed window. If the value latched by a certain shift latch is set to be unmodifiable, the corresponding mapping window becomes an immovable mapping window, and the shift latch always points to a specific window wall, and this window wall is always In the window opening state, it becomes a non-closeable window.
  • the CPU 1 can access the data and programs in the corresponding non-closeable window through the non-removable mapping window under any condition, which creates conditions for automatic system recovery.
  • the position of the non-closeable window is determined by the system manufacturer, if the latched value of the shifting latch located therein cannot be read, the position of the corresponding non-closeable window is invisible to the software user, even its operation The system is also invisible.
  • the user or operating system's access to the non-closed window can only be requested by the underlying control software provided by the system manufacturer, which enhances the security of the system to some extent.
  • the push latch group 3 is the core of the implementation of the shifting technique, is a latch array, and its junction
  • the structure is shown in Figure 3.
  • the embodiment in the figure is mainly composed of a shift latch group chip array 301 formed by 8192 8-bit latch chips 74LS373 and a shift latch address decoder 310, and each of the four 74LS373 chips constitutes a 32-bit shift.
  • the latch 31, numbered from 0000 to 2047, is shown in the structure of the two-dot chain line in FIG.
  • the memory chip array 400 in the figure is an embodiment of a collection of storage sub-blocks 42.
  • the output control terminals 0 of the four latch chips 31 1 are connected together to form the output control terminal E. j of the shift latch 31 ;
  • the data output terminals Q 7 ⁇ of the latch chips 31 1 are sequentially arranged, and the data output terminals 0 31 of the shift latches 31 are connected to the write control terminals G of the latch chips 31 1 and are connected together.
  • the data line write line 33 of the shift latch group 3 is formed in parallel with the lower mark line, and the data write line 33 is further connected to the data bus DB 31 ⁇ of the CPU 1.
  • the write control terminal A of the jth shift latch 31 is controlled by an output pin Xi of its internal shift latch address decoder 310, and the input terminal of the shift latch address decoder 310 L. ⁇ .
  • the address space address line W 12 ⁇ 2 , the chip select terminal IE of the shift latch address decoder 310 is connected to the output of the gate Y, and the input of the AND gate Y is the word space address line W 24 ⁇ 13 Output of the spatial upper address decoder 41 According to the input terminal_L of the shift latch address decoder 310.
  • the connection to the chip select terminal IE, the process of writing data (transition vector value) to the jth shift latch 31 is as follows: When the word space address lines W 52 ⁇ 25 are all 1 and W 24 ⁇ 13 are all 0
  • the AND gate Y outputs 1, at which time the shift latch address decoder 310 is selected, and the shift latch address decoder 310 is paired from the input terminal_L.
  • the input contents of the connected partial word space address lines W 12 to 2 are decoded, and an output terminal is gated according to the value of the word space address lines W 12 to 2 , and the Xi controls the data writing of the jth shift latch 31
  • the control terminal A is valid, so the CPU 1 can pass the data bus DB 31 ⁇ .
  • the transition vector value is written to the jth shift latch 31. It can be seen that the data write end of the shift latch 31 is located in the high end area of the word space of the dual space memory 4, and its data output end produces the upper address of the word space. This is a feature that is different from the general usage of latches.
  • a non-closable window can be set and a data table can be placed in the window.
  • the mapping window No. 2047 can be set as an immovable mapping window, that is, the window wall in which it is located is set as a non-closeable window, and the shifting latch group 3 is placed in the window. Do not close the window.
  • the mapping window is set to an immovable mapping window.
  • the 2047 shift latch sends the Offff ffffh value to the word space addressing lines W 52 ⁇ 25 , it is addressed to the If ffff ffeO OOOOh position in the word space of the dual space memory 4, and the 2047 mapping window is positioned.
  • the If ffff ffeO 0000h position of the double space memory word space that is, the window wall of No. 4294967295, as shown in the table in the embodiment shown in FIG.
  • a shift latch 31 When the value of a shift latch 31 is set to be unmodifiable, its corresponding mapping window is It becomes a non-returnable window which is fixed to the window wall designated by the value of the shifting latch 31, and thus this window wall becomes a non-closeable window.
  • the non-reducing window is very important for the operation of the system. Its main purpose can be divided into two categories. One is to realize the access to the memory address specified by the hardware, such as the memory address accessed by the first instruction after the system reset; the other type It is a quick access to frequently used programs or data, such as access to the resident memory portion of the operating system.
  • the embodiment in Figures 8(A) to 8(C) shows the non-closable window settings and examples for the IA32 architecture CPU system.
  • the system is located at the OfffffffOH memory address after a system reset. At the instruction, this location is also the entry point of the system's real address mode initialization program. Since the upper address line AB 31 ⁇ 2 ⁇ of this address is all 1, and the 2047th shift latch 31 is selected, the 2047th tiling window is the current tiling window; due to the lower address line AB 2 of this address. ⁇ .
  • the output is IffffOH, so the first instruction must be located at the IffffOH offset address of the 2047 tiling window; since this address is the real-address mode initialization procedure entry for the system, the corresponding window wall must be accessible at power-on.
  • the method to meet these three requirements is to set a value that cannot be modified for the 2047th shifting latch, so that the 2047th sliding window is a non-reducible window, and the corresponding window wall is a non-closeable window, as shown in Fig. 8(A).
  • the initialization procedure can only be placed at other locations, and it is arranged in the position from If ffff ffe4 8000h in Figure 8 (B).
  • the offset address of this location in the 2047 mapping window is lfffff
  • the first instruction should be a relative transfer instruction with a transfer distance of 48000h.
  • the operation of the first instruction at the execution of the memory address OffffOh after the system reset will be directed by the transition system to the instruction at the execution word space IffffffffffOh, which in turn transfers CPU1 to the current mapping window.
  • the internal offset address is the start position of the real-address mode initialization program at 48000h, and then the CPU 1 executes the initialization procedure. From the perspective of CPU1, the entire process is no different from the prior art.
  • Data structures such as interrupt vector tables, file management tables, transition vector tables, and sway window management tables are the basis for system operations. They are frequently accessed, and basic operations such as keyboard scanning, display management, and file scheduling are often performed. Program modules, the access speed of these common data and program modules will seriously affect the operating efficiency and intuitive feeling of the system.
  • commonly used data structures and program modules are always placed in memory to ensure a high access speed, but these data and programs occupy a large amount of memory, resulting in a reduction in available memory for users, and at the same time causing the system
  • the increased memory space, these two side effects slow down the system's operating speed and deteriorate the user's intuitive feeling.
  • the following describes the technique by interrupt vector table, transition vector table, and operating system placement.
  • the interrupt vector table, the shift latch group (the shift vector table), the map window management table, the initialization program, the CPU shutdown state, and the non-closed window of No. 4294967295 are arranged.
  • the first instruction and other records and procedures.
  • the position of the first instruction must correspond to the initial state value of CPU1, and the location of other contents is set by the motherboard manufacturer.
  • the shift latch group 3 is set at 8 KB starting from If ffff ffeO OOOOh.
  • the command to assign 1234h to the 0005 shift latch 31 is: mov [ffeO 0014] , 1234h.
  • the initialization program restores the state of the CPU1 from the content of this position, then the system will "immediately" continue the work before the shutdown. , can be as fast as the user does not feel the waiting time.
  • the system assigns a command to the shift latch to assign a value to the ffeO OOOOh to ffeO lfffh of the memory space, and can use a 32-bit data command to assign an address. Is an integer multiple of 4.
  • the command to assign 1234h to the 0005 shift latch is: mov [ffeO 0014] , 1234h, that is, the fifth window is moved to the 1234h Window wall, the first address of the window wall is 00 00002 4680 0000h.
  • the manufacturer only needs to keep the user's confidential non-closed window latch number, the latch value in the push latch, the offset address of the shift latch group, and the actual structure of the shift latch group. In part, it is difficult for the user to interfere with the shifting latch group.
  • the underlying control software will check the security of the request after accepting the modification of the user or the operating system. After the security check, the user will modify the push latch instead of the user to strengthen the system. Security.
  • the block space that the operating system can manage is lower than the window wall of No. 4294967295, it is impossible for the ordinary user to use the operating system to store the shifting latch group in the block space.
  • the window walls are previously dispensed by the system on a dual spatial memory.
  • the attributes of each window wall must also be marked in the mapping window partitioning and management table in FIG. 6, such as whether it is a windowing state, In the case of the window opening state, which mapping window is positioned in the window wall, the file name stored in the window wall, and the like.
  • the window partitioning and management table shown in FIG. 6 represents these management information only with "mapping window number", "file name”, and "file successor window wall".
  • the value of the "map window number” is the number of the mapping window currently positioned on the corresponding window wall.
  • the "file name" is through the dual space memory.
  • the file management system on the block space is stored in the name of the file on the window wall; the "file successor window wall” column is given on the corresponding window wall The wall number of the adjacent successor part of the file.
  • the "file name” maps the location of the file stored in the dual space memory to the word space in the block space, and
  • the "map window number” maps the word space position of this file to the memory space, so the CPU can directly access the storage unit of this file through the mapping window.
  • the window management table is used by the operating system.
  • the "file name" and "file successor window” of the table are filled in;
  • the operating system schedules a file to be put into operation, it locates an available mapping window on the window wall and fills in the corresponding "map window number". Therefore, in a preferred embodiment of the present invention, the mapping window partitioning and management table is identical to the storage block management table of the conventional external memory.
  • the window management table can be regarded as a storage block management table, and thus can be incorporated into the file management system of the operating system.
  • the window wall only needs to be hidden in the mapping window partitioning and management table.
  • the window wall of the address above 100000 0000 OOOOh is hidden.
  • the operating system cannot use the block space corresponding to the window wall hidden in the embodiment shown in FIG. 6.
  • this does not affect the CPU's access to the word space of these window walls through the mapping window, which creates conditions for hiding important non-closeable windows.
  • the portion of the word space that is not used does not need to be mounted with a memory chip to reduce the cost.
  • the computer system can establish a mapping window management table to record the usage of the mapping window (for example, the current window level of each shift latch, the idle time of the mapping window) Whether the content of the corresponding window wall allows writing, the file name, whether the file is executable, the position of the subsequent content of the file, and the like).
  • a mapping window management table to record the usage of the mapping window (for example, the current window level of each shift latch, the idle time of the mapping window) Whether the content of the corresponding window wall allows writing, the file name, whether the file is executable, the position of the subsequent content of the file, and the like).
  • the mapping window head address, the mapping window number, the movable window, the window name, the file name, the data type, the sharing permission, the idle time, and the like are used.
  • the establishment and use of the mapping window management table will be explained.
  • the "file name” indicates which file the data in the window wall in which the mapping window is located ( ⁇ : the current data in the mapping window) belongs to;
  • the "data type” indicates the read, write and executable of the current data in the mapping window.
  • Feature ie, operational attribute
  • shared permission indicates the sharing condition of the current data in the mapping window;
  • movable indicates whether the mapping window can be moved (ie, in the preferred embodiment of the present invention) Select "), that is, whether the corresponding shift latch can be Write;
  • “Idle Time” records the time since the last time the map window was used, to determine if the map window is suitable for distribution to a new requester.
  • the mapping window management table should be used by the underlying control software provided by the manufacturer, which should be invisible to the user (or even the operating system). Specifically, when the underlying control software receives a request to allocate a mapping window, it needs to obtain the required mapping window type, window wall number, file name on the window bit, data type of the file, whether to allow writing, whether to allow or not. Share and other content.
  • the underlying control software checks the idle time column of the mapping window management table, and selects a mapping window according to the set algorithm. For example, in the list in the embodiment shown in FIG. 7, the mapping window of the jth is selected.
  • the underlying control software modifies the content of the jth row in the mapping window management table according to the received request information, and uses the corresponding transition command to give the jth shift latch the window wall number brought in the mapping window request, thereby The jth map window is moved to the specified window wall.
  • the system then feeds back the mapping window number j to the requester. After the requester obtains the mapping window number, it is placed in the "map window number" column of the window wall row in the mapping window wall partitioning and management table, thereby completing positioning a mapping window in the specified window wall of the double space memory word space. the process of.

Landscapes

  • Engineering & Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

公开了一种计算机系统,包括:一寻址组件,与处理器内存地址线的高位及存储器的字地址线的高位分别连接,可控制的在存储器上一连续或者不连续的预设范围内将处理器形成的内存地址的高位转化为对应的存储器字地址的高位并输出至存储器;处理器内存地址线的低位与存储器的字地址线的低位连接;预设范围小于或者等于处理器内存地址线的寻址范围;处理器通过修改预设范围,变化预设范围覆盖的存储器的存储单元。上述技术方案的有益效果是:减少了传统系统中必需的内存芯片结构,减少了整个计算机系统的制造成本;减少了用于数据交换的时间,提高了系统的运行效率;缩短了读写操作的操作时间;应用简单,适用性广。

Description

一种计算机系统及数据读写方法 技术领域
本发明涉及数据调用技术领域, 尤其涉及一种计算机系统及数据读写方 法。 背景技术
在当前的计算机系统中, 通常有两种存储方式, 即外部存储器 (外存) 和内部存储器(内存)。外存是指除计算机内存及 CPU缓存以外的存储器, 特 点在于断电后仍然能够保存数据。 计算机系统中常见的外存有软盘存储器、 硬盘存储器、 光盘存储器等, 目前的微机系统中比较常用的就是硬盘。 而内 存是指用于暂时存放 CPU中的运算数据, 以及与硬盘等外部存储器交换的数 据的存储器, 只要计算机在运行中, CPU就会把需要运算的数据调到内存中 进行运算, 当运算完成后 CPU再将结果传送出来。 内存的暂存性也决定其是 掉电易失的, 传统的计算机系统中的内存是由内存芯片、 电路板、 金手指等 部分组成的。
由于在计算机系统的设计思路中, 内存空间的设计目标是构造 CPU能以 字 (或者字节) 为单位进行随机读写的存储器, 而外存空间的设计目标是在 有限的存储空间内存储尽量多的数据。 因此, 在内存空间中构造了 N+1条(N 为正整数) 地址线来进行随机寻址内存的内存单元, 每个内存单元的数据位 数与 CPU的数据总线的宽度相等, 这种内存结构使得存储空间中只包括 2N+1 个内存单元, 整个内存空间的存储容量仅为 2N+1个字 (或字节); 而对于外存 空间来说, 可以构造以软件表示的地址—— "块编号"来进行寻址的外存单 元, 每个外存单元的数据位数为 "块容量"。 由于软件可以表达的地址位数远 远大于 CPU构造的地址线的数量 N+1 , 因此外存空间的地址位数远远多于内 存空间的地址位数。 又由于 "块容量" 中所存储的数据位数远远多于 CPU的 数据总线的宽度, 因此外存空间的存储容量亦可以远远大于内存空间的存储 容量。 另一方面, 由于外存空间的地址由软件来表示, 所以外存空间只能由 系统的底层软件访问, CPU 无法通过机器指令直接对外存空间中的外存单元 进行读写操作。
综上所述, 在传统的计算机系统中, 若需要提取保存于外存空间内的数 据, 则 CPU必须先将外存空间的数据调入内存空间中, 随后才能通过机器指 令对其进行随机寻址, 因此内存空间和外存空间之间的映射采用了内容拷贝 方式, 即内存重定位技术。 所谓内存重定位技术, 是指在进行数据寻址时, 把程序的逻辑地址空间变换成内存中的实际物理地址空间的过程, 具体方法 是: 当 CPU要用机器指令访问外存储器上的数据时, CPU首先向底层软件提 出请求,底层软件对外存储器进行寻址,并将找到的数据拷贝到内存储器中, 然后将这份拷贝的内存地址告知 CPU。CPU随后通过机器指令对这份拷贝进行 读写操作。 上述传统的数据调用的方法存在着明显的缺陷, 即有大量数据在 外存和内存之间被执行拷贝操作, 延缓了 CPU机器指令对数据的访问, 长时 间的数据调用操作容易导致内存和外存之间的数据传送通道变得拥挤, 并且 增加了传送数据和调用数据的操作时间, 耗费了较多的系统资源。
中国专利(CN1403921 )公开了一种数据交换及存储方法与装置, 涉及数 据处理技术领域, 用于实现在各种存储设备, 包括作为外存储设备的移动存 储盘和存储卡之间以及二者同数据处理系统主机之间交换数据, 或者实现将 从一方读出的数据存入所述三方之任何一方或两方, 该技术方案中的装置自 身具有数据处理能力, 在所述装置不连接所述系统主机的情况下即可将外部 存储设备中的数据存储到内部存储模块中、 或将内部存储模块中数据存储到 外部存储设备中。 上述技术方案仍然局限于对外存 (外部存储设备) 和内存 (内部存储模块) 之间的数据交换进行描述和改进, 无法解决现有技术中存 在的问题。
中国专利(CN101000590 )公开了一种读取内存中数据的方法, 设置与内 存控制器主时钟 MCLK具有相位差 Tph的采样时钟 DATA_CLK, 并且包括如下 歩骤: A、 内存控制器在主时钟域下, 向内存发送读控制信号和读地址; B、 在采样时钟域下接收内存输出的所述读地址中存储的数据, 并缓存所接收的 数据; C、 内存控制器在主时钟域下, 读取所述缓存的数据。 以及一种读取内 存中数据的系统。 上述技术方案仅涉及内存与处理器之间的数据交互过程, 即处理器从内存中读取数据的过程, 并不能解决现有技术中存在的问题。 发明内容
根据现有技术中存在的问题, 即传统的数据调用方法会导致外存空间与 内存空间之间的数据传输通道的堵塞, 增加了传送数据和调用数据的操作时 间, 并且耗费了较多的系统资源, 现提供一种计算机系统及数据读写操作方 法, 具体包括:
一种计算机系统, 包括处理器和存储器, 所述存储器包括多个存储单元 并被划分成多个相等大小的存储块; 每个所述存储单元具有字地址, 通过字 地址线进行访问; 每个所述存储块具有块地址, 通过块地址线进行访问, 其 中, 还包括:
一寻址组件, 与所述处理器内存地址线的高位及所述存储器的字地址线 的高位分别连接,可控制的在所述存储器上一连续或者不连续的预设范围内 将所述处理器形成的内存地址的高位转化为对应的所述存储器字地址的高 位并输出至所述存储器;
所述处理器内存地址线的低位与所述存储器的字地址线的低位连接; 所述预设范围小于或者等于所述处理器内存地址线的寻址范围; 所述处理器通过修改所述预设范围, 变化所述预设范围覆盖的所述存储 器的存储单元。
优选的, 所述寻址组件包括多个锁存单元, 每个所述锁存单元的输出端 连接所述存储器的字地址线的高位, 每个所述锁存单元存储一所述存储单元 的字地址的高位, 所有所述锁存单元存储的所述存储单元的字地址的高位覆 盖的所述存储器的存储单元形成所述预设范围, 所述处理器通过修改所述锁 存单元中存储的所述存储单元的字地址的高位改变所述预设范围。
优选的, 所述寻址组件包括一第一译码单元, 所述第一译码单元的输入 端与所述处理器的内存地址线高位连接, 所述第一译码单元的输出端与每个 所述锁存单元分别连接, 所述第一译码单元根据所述处理器形成的内存地址 的高位选通对应的一个所述锁存单元进行输出。
优选的, 所述存储器的存储单元按照字地址被划分成复数个大小相同的 区域, 每个所述锁存单元存储的所述存储单元的字地址的高位对应一个所述 区域的字地址的首地址; 所述处理器修改所述锁存单元中存储的所述存储单元的字地址的高位时 选择一当前目标文件所在的区域, 并将选中的所述区域的首地址的高位赋值 至一所述锁存单元。
优选的, 多个所述锁存单元中至少包括一个第一类锁存单元, 所述第一 类锁存单元存储的存储单元的字地址的高位不可被修改。
优选的, 所述第一类锁存单元存储的存储单元的字地址的高位对应的字 地址所在的区域用以存储操作系统。
优选的, 当所述预设范围小于所述处理器的内存地址线的寻址范围时, 所有所述锁存单元的写入端被编址于所述处理器的内存地址线的寻址范围 内, 并与所述处理器的内存地址线的低位连接。
优选的, 所述寻址组件包括一第二译码单元, 所述第二译码单元的输入 端与每个所述锁存单元的输出端分别连接, 所述第二译码单元的输出端与所 述存储器连接, 所述第二译码单元用以根据被选中的所述锁存单元输出的所 述存储器字地址的高位对所述存储器进行字地址高位部分的寻址。
优选的, 所述锁存单元主要由一组锁存器形成。
优选的, 所述第一译码单元主要由一组译码器芯片形成。
优选的, 所述第二译码单元主要由一组译码器芯片形成。
本发明的另一方面, 包括一种数据读写方法, 其中, 应用于如上述计算 机系统, 歩骤具体包括:
歩骤 1, 判断读写请求的目标文件是否存储于所述预设范围当前覆盖的 存储单元集合内, 如目标文件存储于所述预设范围当前覆盖的存储单元集合 内则执行歩骤 2, 否则执行歩骤 6;
歩骤 2, 处理器产生一内存地址, 所述内存地址的高位被送入所述寻址 组件, 所述内存地址的低位被送入所述存储器;
歩骤 3, 所述寻址组件将所述内存地址的高位转化为对应的所述存储器 的字地址的高位并输出至所述存储器;
歩骤 4, 所述存储器将所述寻址组件输出的所述字地址的高位及所述内 存地址的低位组合成字地址, 并选通所述字地址对应存储单元与所述处理器 连接进行读写操作;
歩骤 5, 所述处理器采用所述内存读写方式从所述当前工作内存中对数 据进行读写操作, 并退出等待下一次读写请求;
歩骤 6, 所述处理器改变所述预设范围于所述存储器上覆盖的存储单元 集合, 使所述读写请求的目标文件处于所述预设范围内于所述存储器上覆盖 的存储单元集合内, 转至歩骤 2继续执行。
上述技术方案的有益效果是:
1 ) 将计算机系统中的外存与内存合并,减少了传统系统中必需的内存 芯片结构, 减少了整个计算机系统的制造成本;
2 ) 在对外存中的数据进行调用时, 无需先向内存中发送一份数据拷 贝, 也无需在数据被修改过以后重新对外存进行更新, 避免了长 时间调用数据所产生的数据通道的拥堵现象,并且减少了用于数 据交换的时间, 提高了系统的运行效率;
3 ) 无内存与外存之间数据交换, 因而降低了了对内存命中率的要求, 可降低对操作系统的要求, 可提高操作系统的运行效率;
4) 直接在外存空间中对数据进行读写操作,缩短了读写操作的操作时 间;
5 ) 并没有对传统的硬件存储结构做大幅度修改,应用简单,适用性广。 附图说明
图 1是本发明的较佳的实施例中, 一种计算机系统的结构示意图; 图 2是本发明的较佳的实施例中, 一种数据读写方法的流程示意图; 图 3是本发明的较佳的实施例中, 锁存器单元的结构示意图;
图 4是本发明的较佳的实施例中, 一种计算机系统的连接结构示意图; 图 5是本发明的较佳的实施例中, 存储器的机构示意图;
图 6是本发明的较佳的实施例中,映射窗壁划分与管理表的结构示意图; 图 7是本发明的较佳的实施例中, 映射窗管理表的结构示意图; 图 8 (A)〜图 8 (C)是本发明的较佳的实施例中, 不可闭窗的设置和使 用示意图。 雄:^
下面结合附图和具体实施例对本发明作进 限定。
本发明的较佳的实施例中, 针对现有技术中存在的问题, 即传统的计算 机系统中, 内存与外存分开从而导致系统调用数据时需要频繁在内存与外存 之间进行数据传输和拷贝的问题, 给出了一种在一个存储器上构造两种存储 空间, 并在其上进行数据读写的技术方案, 具体包括:
如图 1所示, 本发明的较佳的实施例中, 一种计算机系统, 包括处理器 100和存储器 200,存储器 200包括多个存储单元并被划分成多个相等大小的 存储块; 每个存储单元具有字地址, 通过字地址线 210进行访问; 每个存储 块具有块地址, 通过块地址线 220进行访问, 上述通过块地址线 220进行访 问的形式即现有技术中系统对外存进行访问的形式, 由于此形式并非本发明 技术方案的目标, 因此不再对系统通过块地址线 220访问存储器 200进行展 开。
其中, 还包括: 一寻址组件 300, 与处理器 100的内存地址线 110的高 位及存储器 200的字地址线 210的高位分别连接, 可控制的在存储器 200上 一连续或者不连续的预设范围内将处理器 100形成的内存地址的高位转化为 对应的存储器字地址的高位并输出至存储器 200;
处理器 100的内存地址线 110的低位与存储器 200的字地址线 210的低 位连接;
其中预设范围小于或者等于处理器 100的内存地址线 110的寻址范围; 处理器 100通过修改预设范围, 变化预设范围覆盖的存储器 200的存储 单元。
上述技术方案中, 存储器 200上的预设范围相当于现有技术中的内存, 处理器 100通过寻址组件 300访问该预设范围, 相当于现有技术中处理器访 问内存, 当目标文件不在预设范围内时即现有技术中目标文件不在内存中的 情况, 处理器 100通过改变预设范围于存储器 200上覆盖的存储单元, 使目 标文件落入预设范围内, 相当于现有技术中将外存中的目标文件写入内存, 上述技术方案通过在一个存储器 200上定义一预设范围并通过处理器 100在 需要的时候改变预设范围覆盖的存储单元, 使现有技术中系统对内存和外存 的访问在一个存储器 200上实现, 从而不在需要分别设置内存和外存, 节省 了资源, 同时, 由于本发明的技术方案将原本需要进行大量读写操作的内存 与外存之间的数据交换改变为改变预设范围覆盖的存储单元, 大幅减少了系 统的开销, 提高了系统的运行速度。
进一歩的, 上述技术方案中, 通过寻址组件 300对处理器 100形成的内 存地址的高位进行转换, 形成存储器 200的字地址高位, 并配合处理器 100 形成的内存地址的低位, 从而实现处理器 100在容量大于处理器 100寻址能 力的存储器 200上进行访问, 同时, 只要改变寻址组件 300的转换策略, 即 可实现改变预设范围覆盖的存储单元。
需要指出的是, 寻址组件 300的地址转换策略可由硬件实现, 也可由软 件实现, 本发明并不限制其实现方式, 作为对本发明可行性的说明, 下面将 以一种硬件实现转换的实施方式对技术方案作进一歩的描述。
本发明的较佳的实施例中, 寻址组件 300可包括多个锁存单元 301, 每 个锁存单元 301的输出端连接存储器 200的字地址线 210的高位, 每个锁存 单元 301存储一存储单元的字地址的高位, 所有锁存单元 301存储的存储单 元的字地址的高位覆盖的存储器 200的存储单元形成预设范围, 处理器 100 通过修改锁存单元 301中存储的存储单元的字地址的高位改变预设范围。
上述寻址组件 300的实现方式通过多个锁存单元 301中分别存储的存储 器 200的存储单元的字地址的高位框定预设范围, 该预设范围可以是连续的 也可以是不连续的, 并且, 处理器 100可每次修改 1个或者几个或者全部锁 存单元 301中存储的存储单元的字地址的高位, 实现根据需要对预设范围部 分或者全部的改变。
本发明的较佳的实施例中,寻址组件 300还可包括一第一译码单元 302, 第一译码单元 302的输入端与处理器 100的内存地址线 110的高位连接, 第 一译码单元 302的输出端与每个锁存单元 301分别连接, 第一译码单元 302 根据处理器 100形成的内存地址的高位选通对应的一个锁存单元 301进行输 出。
需要指出的是, 采用第一译码单元 302配合锁存单元 301的实现方法仅 仅是本发明技术方案中寻址组件 300的地址转换策略的一种实现方式, 并不 能以此限制本发明的保护范围。 本发明的较佳的实施例中, 存储器 200的存 储单元按照字地址被划分成复数个大小相同的区域, 每个锁存单元 301存储 的存储单元的字地址的高位对应一个区域的字地址的首地址; 处理器 100修改锁存器中存储 200的存储单元的字地址的高位时选择一 当前目标文件所在的区域, 并将选中的区域的首地址的高位赋值至一锁存单 元 301。
上述技术方案将存储器 200进行逻辑上的分割定义成大小相同的区域, 并使一个锁存单元 301中存储的存储器 200的字地址的高位正好覆盖一个区 域, 从而使处理器 100在修改锁存单元 301中存储的存储器 200的字地址的 高位时可直接将一被选中的区域的首地址的高位赋值至一锁存单元 301, 通 过这种实施方式可避免出现锁存单元 301对应的区域之间出现重叠导致预设 范围实际容量缩小, 进而导致处理器 100寻址能力降低。
本发明的较佳的实施例中, 多个锁存单元 301中至少包括一个第一类锁 存器, 第一类锁存器存储的存储单元的字地址的高位不可被修改。 第一类锁 存器可用于指向系统经常需要访问的文件所在的区域, 以避免系统频繁的改 变预设范围造成系统运行效率降低。 本发明的较佳的实施例中, 第一类锁存器存储的存储单元的字地址的高 位对应的字地址所在的区域用以存储操作系统。 操作系统通常为计算机系统 访问最为频繁的文件, 且通常操作系统于存储设备上的位置不会改变, 因此 将第一类锁存器存储的存储单元的字地址的高位对应的字地址所在的区域用 以存储操作系统有利于系统运行效率提高。
本发明的较佳的实施例中, 寻址组件 300包括一第二译码单元 303, 第 二译码单元 303的输入端与每个锁存单元 301的输出端分别连接, 第二译码 单元 303的输出端与存储器 200连接, 第二译码单元 303用以根据被选中的 锁存单元 301输出的存储器字地址的高位对存储器 200进行字地址高位部分 的寻址。
本发明的较佳的实施例中, 锁存单元 301可主要由一组锁存器形成。 本发明的技术方案中还包括一种数据读写方法, 可被应用于如上述计算 机系统中, 歩骤具体包括:
歩骤 1, 判断读写请求的目标文件是否存储于预设范围当前覆盖的存储 单元集合内, 如目标文件存储于预设范围当前覆盖的存储单元集合内则执行 歩骤 2, 否则执行歩骤 6; 歩骤 2, 处理器产生一内存地址, 内存地址的高位被送入寻址组件, 内 存地址的低位被送入存储器;
歩骤 3, 寻址组件将内存地址的高位转化为对应的存储器的字地址的高 位并输出至存储器;
歩骤 4, 存储器将寻址组件输出的字地址的高位及内存地址的低位组合 成字地址, 并选通字地址对应存储单元与处理器连接进行读写操作;
歩骤 5, 处理器采用内存读写方式从当前工作内存中对数据进行读写操 作, 并退出等待下一次读写请求;
歩骤 6, 处理器改变预设范围内于存储器上覆盖的存储单元集合, 使读 写请求的目标文件处于预设范围内于存储器上覆盖的存储单元集合内, 转至 歩骤 2继续执行。
以下通过对一些具体的实施例进行说明以阐述本发明的主要思想, 在此之前先对一些名词进行定义。下述名词的定义仅适用于本发明的一 些具体的实施例中用作对本发明的技术方案做详细的解释, 以有利于本 领域技术人员对本发明的技术方案的深入理解, 而非用于限定本发明的 保护范围。
块地址: 存储器 200上以数据块为单位的存储单元 201序列的序列 号, 即系统通过块地址线 220寻址组件 300, 以外存读写方式对存储器 200进行读写操作时的存储地址的序列号。
块空间: 所有块地址组成的序列。 本发明的较佳的实施例中, 块空 间就是由块地址线 220连接的存储器 200上的存储空间, 也就是传统意 义上的外存空间。
字地址: 存储器 200上以内存空间数据宽度为单位的存储单元 201 的序列号。 在现有的计算机系统中内存空间数据宽度等于处理器 100 ( CPU ) 的数据总线宽度。
字空间: 所有字地址组成的序列。 本发明的较佳的实施例中, 字空 间就是由字地址线 210连接的存储器 200上的存储空间。
需要指出的是上述字空间和块空间指向的是同一存储器, 即在同一 存储器上分别连接字地址线 210和块地址线 220。
双空间存储器: 同时具有块空间和字空间的存储器, 即在同一存储 器上分别连接字地址线和块地址线的存储器, 也即本发明的较佳的实施 例中所述的存储器 200。
映射窗: 可以被指派到存储器 200的字空间上局部范围的一段连续 且不得再分割的确定的内存地址范围。 本发明的较佳的实施例中, 一个 上述映射窗即对应一个区域的一段连续的内存地址, 所有的映射窗对应的 区域组成上述的预设范围。
当前映射窗: 处理器 100 (以下以 CPU进行指代) 的当前机器指令 访问的映射窗。 本发明的较佳的实施例中, 当前映射窗即当前被选通的 存储器的存储单元所处的区域。
映射窗首地址: 一个映射窗包含的最小内存地址。
映射窗幅: 一个映射窗包含的内存地址总量。 本发明的较佳的实施 例中, 一个映射窗的窗幅等于其中包含的内存地址的最大值减去该映射 窗首地址之后再加 1。
映射窗号: 映射窗的序列号。
窗壁: 正好安置一个映射窗的双空间存储器的在字空间上连续的存 储单元。 本发明的较佳的实施例中, 一个窗壁为在存储器 200中对应于 一个映射窗的连续的多个存储单元的集合, 即本发明较佳实施例中的区 域。
窗壁号: 窗壁的序列号。
窗位:为一个存储器 200的字空间地址,可对其指派映射窗首地址。 本发明的较佳的实施例中, 通俗的理解, 就是映射窗在字空间上的定位 位置。
推移锁存器: 指示一个映射窗当前所在的窗位, 其值就是对应映射 窗所在窗壁的窗壁号, 也即本发明的较佳的实施例中提到的锁存单元 301。
推移锁存器组: 所有推移锁存器排列成的序列表。
推移锁存器号: 推移锁存器在推移锁存器组中的序列号。 当推移锁 存器按映射窗号排序时, 推移锁存器号与映射窗号相同。
推移: 将一个映射窗指派给一个窗壁的操作, 在本发明的较佳的实 施例中推移以修改锁存单元 301中存储的值来实现。 开窗: 被指派了一个映射窗的窗壁的当前状态。
闭窗: 无映射窗指派的窗壁的当前状态。
不可闭窗: 指派给其的映射窗不能被推移的窗壁, 相当于本发明较 佳实施例中第一类锁存器指向的区域。
当前窗壁: 当前映射窗所在的窗壁, 相当于本发明较佳实施例中当 前被第一译码单元 302选通的锁存单元 301指向的区域。
本发明的较佳的实施例中, 基于上述名词的定义, 可以将本发明的发 明目的归结于:通过寻址组件 300将 CPU产生的内存地址的高位转换为存 储器 200的字地址高位即映射窗的窗位,并结合 CPU产生的内存地址的低 位形成存储器 200的字地址,以选通在一预设范围内的存储器 200上的存 储单元, 当读写请求的目标文件不在预设范围内时, 通过改变组成预设范 围的一个或者几个映射窗于存储器 200上的位置, 重组预设范围, 使一个 或者几个映射窗被推移到读写请求的目标文件所在的窗壁,从而使重组后 的预设范围包含读写请求的目标文件所在的存储单元。依据该发明目的设 计的计算机系统只需一个存储器, 因而没有内存与外存之分, 但这个存储 器上同时构造了块空间和字空间, 由于块空间的访问, 不是本发明的改进 方向, 因此现有技术中块空间的访问方式都可以被应用, 不再赘述。 本发 明的较佳的实施例中, 将这种结构的存储器称为双空间存储器, CPU透过 内存空间的映射窗对这个双空间存储器的字空间进行分区域随机访问,从 而消除了传统计算机系统中大量数据在内存和外存之间传送的问题。
实现上述发明目的的技术方案, 简言之, 就是一种将计算机的内存空 间在双空间存储器上推移的方法: 利用一个推移锁存器组, 实现将内存空 间上分割出的映射窗内的字地址映射到双空间存储器的字空间上的一段 等量且连续编址的字空间地址,映射完成后, CPU访问映射窗内的字地址, 可实现对双空间存储器上的这段字空间进行随机存取操作。改变推移锁存 器组中某个推移锁存器的值,可实现将对应的映射窗对应的内存地址映射 到双空间存储器的字空间上的另一个位置,相当于把该映射窗移动到另一 个位置, 因此本发明的较佳的实施例中, 可以形象地将这种移动称为对内 存空间的映射窗的推移操作。
本发明的较佳的实施例中,双空间存储器上的字空间与内存空间的差 异在于: 内存空间的存储容量大小由 CPU的内存地址线的数量决定, 一般 等于计算机系统的机器指令中给出的物理地址位数。而本发明的较佳的实 施例中的双空间存储器上的字空间的容量并不受 CPU 的内存地址线数量 限制。
本发明的较佳的实施例中,字空间与块空间的联系在于它们是同一个 存储器(即双空间存储器)上的地址空间, 所以二者标识的总存储容量相 等。 gp : 块空间大小乘以块容量等于字空间大小乘以字长。 这决定了下列 事实: 如果块容量为 2X个字 (X为正整数), 即块内部的字用 X位字寻址 线来寻址, 一般为字空间地址的低 X位, 则字空间地址中高于 X的位数等 于块空间地址的位数,即字空间的字地址寻址线的位数等于块空间地址位 数 +χ 个低位。 因此, 在这种情况下, 块空间地址就是字空间地址的高位 部分。 在本发明的较佳的实施例中, 可定义块大小为区域 (即窗壁)容量 的整数倍, 也可以定义窗壁容量是块容量的整数倍。
如图 4为本发明的一个较佳的实施例,对上述计算机系统的电路结构 做具体描述的示意图。
本发明的较佳的实施例中,对图 4所示的实施例以及后续附图中的附 图标记做以下说明:
该实施例中系统总体结构包括: CPU1、 内存地址译码阵列 2、 推移锁 存器组 3、 和双空间存储器 4, 原理如图 4所示, 其中 CPU1为处理器 100 的一种具体实施例,内存地址译码阵列 2为第一译码单元 302的一种具体 实施例, 推移锁存器组 3为多个锁存单元 301的一种具体实施例, 双空间 存储器 4为存储器 200的一种具体实施例。
为了便于说明, 在本发明的各个较佳的实施例中, 均以 IA32架构的 CPU为例, 但并不意味着能够以 IA32架构的 CPU作为本发明的保护范围 的限定。 本发明的其他较佳的实施例中, 随着 CPU的架构类型的改变, 具 体的连接线可能会有相应的变化,但这种变化为本领域技术人员在本发明 的技术方案的基础上不必付出创造性劳动即可获得,因而均应包含在本发 明的保护范围内。
本发明的较佳的实施例中, IA32架构的 CPU的数据总线的宽度为 32 位, 用数据总线 DB31〜。表示; 地址总线宽度为 32 位, 用地址总线 AB31〜。 表示; 读写控制线以读写控制线 R/W表示(本发明的较佳的实施例中, 上 标 "# "表示 "取非"或 "低电平有效")。
其中 CPU 1的内存读写控制线 1?/¥#通过字空间读写控制线 #与双空间 存储器 4的字空间读写控制线 WE#连接; CPU1的数据总线 DB31〜。通过字数 据传送线 DB31〜。与双空间存储器 4的数据线 DQ31〜。对应连接; 而 CPU 1的地 址总线 AB3 分成两部分,其中低位的 p条地址线 AB (P-1〜。通过低 p位的字 空间字寻址线 W(p- ^。与双空间存储器 4的低 p位的字空间地址线 AC(P -^ 对应连接, 其余的高位部分的地址线 ΑΒ31ι则对应连接入内存地址译码阵 列 2 ; 内存地址译码阵列 2的各输出线分别接推移锁存器组 3中一个锁存 器的输出控制端; 所有推移锁存器的同名数据输出线相并接, 并连接高位 的字空间寻址线 , 其中 -p等于推移锁存器的位数。
图 4所示的实施例的工作原理为:当 CPU1访问内存时给出 32位内存 地址 Ad31〜。; 内存地址的高 32-p位 Ad31i通过高位的地址线 ΑΒ31ι进入内 存地址译码阵列 2 ; 内存地址译码阵列 2对内存地址的高 32-p位 Ad31i 译码后, 内存地址译码阵列 2有且仅有一个输出引脚为有效电平; 这个有 效电平输出引脚控制推移锁存器组 3中的一个锁存器的输出端有效;该有 效锁存器把其保存的值送上高位的字空间寻址线 ; 同时内存地址的低 位部分 Ad (p-1〜。通过低 p位的地址线 AB (P-1〜。送入低位的字空间寻址线的 ^ (P-D→, 于是字空间寻址线 WM〜。对双空间存储器 4的字空间进行寻址, 在 字空间读写控制线 W#的有效信号控制下,被寻址的字空间存储单元通过字 数据传送线 DB31〜。传送数据至 CPU1
由其工作原理可知, 在图 4所示的实施例中, 被指派到字空间局部范 围上的一段连续且不得再分割的内存地址是 Ad(p-1〜。的取值, 因此, 这个 系统的每个映射窗的窗内地址为 Ad (p -^。, 窗幅为 2% 共有 2 (31p)个推移锁 存器, 每个推移锁存器对应一个映射窗。 由于每个推移锁存器有 M-p位, 故字空间共有 2M+1字节, 比内存空间大 2M31倍, 分为 2 (Mp)个窗壁。
结合图 4中的实施例, 推移原理可简单说明为, 假设 CPU1的内存地 址线总数为 N+ 1 , 双空间存储器 4的字空间地址线总数为 M+ l。 用低 p位 内存地址线构成映射窗, 窗幅为 2 其余的高 n位内存地址线构成推移锁 存器选择线, 则有 2"个推移锁存器, 且 n=N+ l-p ; 推移锁存器的输出数据 送上字空间地址线的高 m位, 则字空间被分成 2m个窗壁, 且 m大于 n, m=M+l-p。 当 CPU1输出一个 N+l位的内存地址后, 其高 n位通过内存地址 译码阵列 2选中推移锁存器组 3中的一个推移锁存器,这时称被选中的推 移锁存器所对应的映射窗为当前映射窗,该推移锁存器输出双空间存储器 4的字空间地址的高 m位, m的值给出当前映射窗被定位的当前窗壁, CPU1 通过当前映射窗访问当前窗壁上的字数据。若 CPU1访问连续的内存地址, 则 n的值不变, 于是选中的推移锁存器不变, 则当前映射窗不变, 则 CPU1 访问到同一个窗壁的连续地址。 若 CPU1访问内存的地址有大跳跃, 导致 n值改变, 则通过内存地址译码阵列 2选中推移锁存器组 3中的另一个推 移锁存器, 则当前映射窗改为后被选中的锁存器的对应的映射窗, 该锁存 器输出的 m位数据将当前映射窗定位到另一个窗壁上,即将当前映射窗推 移到新窗壁。
当更新一个推移锁存器的锁存值后,就使得该推移锁存器对应的映射 窗指向其新值所表示的窗壁, 因此也称推移锁存器为推移矢量, 此后一旦 CPU1送出的内存地址的高 n位选中该推移锁存器, 则对应的映射窗就自 动被推移到该窗壁。修改推移锁存器中存储的值可实现该推移锁存器对应 的映射窗改变其定位的窗壁, 为了方便 CPU1修改推移锁存器, 在一种较 优的实施方式中,可把推移锁存器的数据输入端设置在双空间存储器 4的 字空间的高位窗壁上, 这时推移锁存器在结构上的特点为: 推移锁存器的 数据输入端位于双空间存储器 4的字空间中,而数据输出端是双空间存储 器 4字空间的高位地址线, 用于对双空间存储器 4的字空间寻址。在一种 较优的实施方式中, 可将推移锁存器的数据输入端设置在双空间存储器 4 的字空间的用户不可见窗壁以保护推移锁存器的安全。
本发明较优的实施例中, 如图 5 所示, 其中的虚线框给出了用 1073741824片 Nor Flash型 RAM芯片 EN29GL256 (下文简称为存储芯片 40 )构造的双空间存储器结构, 需要说明的是上述芯片的具体器件选型及 数量均为说明需要, 并不能以此限定本发明的保护范围。 其中, 包括一个 字空间高位地址译码器 41 (第二译码单元 303 的一种具体实施例) 和 268435456个存储子体 42。 存储子体 42从 No. 0000000到 No. 268435455 编号, 每个存储子体 42 包含 4 个存储芯片 40, 如图 5 中标示有 No. 268435455存储子体 42所示。
一种较优的双空间存储器 4的数据线 DQ31〜。的形成方式为: 各存储芯 片 40的片选端 05#分别通过三态门 k0、 三态门 kl、 三态门 k2和三态门 k3 后并接在一起, 经过非门 f 后, 形成所在存储子体 42 的片选端 d ( i=0 l 268435455 ) , 而各三态门分别由信号线 B3、 信号线 B2 信号线 和信号线 B。控制, 于是信号线 B3、 信号线 B2、 信号线 和信号 线 B。组成该存储子体 42的数据线 DQ3 的字节选择线 B3〜。;所有存储子体 42 的字节选择线 B3〜。连接在一起, 取反后接到 CPU1 的引脚 BE 。, 因此 受信号线 B。控制的存储芯片 40的数据线 DQ7〜。被连接到 CPU1的最低 8位 数据线 DB7〜。,受信号线 制的存储芯片 40的数据线 DQ7〜。被连接到 CPU1 的数据线 DB158, 受信号线 B2控制的存储芯片 40的数据线 DQ7〜。被连接到 CPU1的数据线 DB2316,受信号线 B3控制的存储芯片 40的数据线 DQ7〜。被连 接到 CPU1的数据线 DB3124, 于是 4个存储芯片 40的 8位数据线 DQ7〜。共 同组成存储子体 42的 32位数据线 DQ3
一种较优的双空间存储器 4 的字空间地址线 ACM〜。的形成方式为 (M 值为字空间地址的位数 -1 ) : 4个存储芯片 40的片内地址引脚 A21 4对应 并接后形成所在存储子体 42的字空间地址线 AC242,由于逻辑上字节选择 线 B3〜。是字空间地址线 AC^n字空间地址线 AC。解码后的输出线, 则字空 间地址线 AC242和字节选择线 B3〜。一起组成存储子体 42 的字空间地址线 AC24〜。,逻辑上共 25根; 4个存储芯片 40的片选端 0^分别通过三态门 k0 三态门 kl、 三态门 k2和三态门 k3后并接在一起, 经过非门 f 后, 形成 所在存储子体 42 的片选端 Q ( i=0 1 268435455 ) , 存储子体 42 的片选端 C268435455〜。连接字空间高位地址译码器 41的输出引脚中下标编号 相同的引脚, 于是, 字空间高位地址译码器 41的输入端就是双空间存储 器 4的字地址的高位部分, 图 5中标记为 AC5225, 于是双空间存储器的地 址线引脚为 AC5225 AC242和 B3〜。, 逻辑上共计 53条, 故双空间存储有 8P 字节。
一种较优的字空间寻址线 WM〜。的形成方式为: CPU1 的引脚 BE 。取 "非" 后起到字空间寻址线最低 2位 W^n W。的作用, 故可称这 4条线为 逻辑上的字空间寻址线最低 2位; CPU1的内存地址线的 AB2。〜2直接作为字 空间寻址线 W2。〜2 ; CPU1高 11位的地址线 AB312^ 入内存地址译码阵列 2 的寻址端 。〜。, 内存地址译码阵列 2的 2048条输出线 0247〜。分别连接推 移锁存器组 3中的下标相同的一个锁存器的输出使能端 E247〜。,对 2K个推 移矢量进行选择; 被输出线 0247〜。选中的一个推移锁存器输出保存的 32 位值到推移锁存器组 3 的输出引脚 031〜。, 输出引脚 031〜。的输出形成高位 的字空间寻址线 W5221。 于是, 在逻辑上, 由字空间寻址线 W522和 CPU1的 引脚 BE 。引脚的 "非"共 53位形成字空间寻址线 W52〜。, 故字空间有 8P 字节地址。
一种较优的字空间寻址线 WM〜。和双空间存储器字空间地址线 ACM〜。的 连接方式为: 由于图 5中的存储子体 42有地址线 25根, 故可将由 W242 和 CPU1的引脚 BE 。取非后所形成的最低 25位的字空间寻址线通过三态 门 k5和三态门 k6后连接到存储子体 42的子空间地址线 AC242和字节选 择线 B3〜。形成的 25根地址线; 高 28位的字空间寻址线 W5225通过三态门 k4后接字空间高位地址译码器 41的输入端 AC5225, 字空间高地址译码器 41的输出端 H0腿 35455〜。分别接一个存储子体 42的片选端 d (i=0, 1, …… , 268435455) , 且连接时使存储子体 42的编号与字空间高位地址译码器 41 的输出端下标编号值相同,于是字空间寻址线 W5225寻址存储子体 42实现 对存储子体 42的选择, 而字节选择线 B3〜。寻址存储子体 42内的芯片 40, 字空间寻址线 W242寻址芯片 40内的字节存储单元。
一种较优的对双空间存储器 4的字空间的访问方式的控制为: 如图 5 所示的实施例中,各存储芯片 40的输出控制端 0E#取反后和写入控制端 WE# 一同并接到所在存储子体 42的读写控制端 0/W#,存储子体 42的读写控制 端 0 #通过三态门 k7后连接 CPU1的读写控制端 R/W#,而三态门 k7受 CPU1 的访问控制引脚 M/I0#的控制, 在访问控制引脚 M/I0#为高电平时三态门 k7才导通, 又由于仅当 CPU1访问内存时访问控制引脚 M/I0#才输出高电 平, 所以 CPU1对字空间的访问只能是访问内存方式。 当 CPU1给出读内存 指令时, 访问控制引脚 M/I0#和内存读写控制线 R/W#均为高电平, 则存储 子体 42的读写控制端 0/W#为高电平,进而使存储子体 42内的各存储芯片 40的字空间写控制线 WE#无效, 而存储子体 42的读写控制端 0/W#取反后 使存储芯片 40的输出控制端 0E#有效,于是存储芯片 40输出数据到 CPU1 , 同理, 当 CPU1给出写内存指令时, 访问控制引脚 M/I0#为高电平。 而内存 读写控制线 R/W#为低电平, 故存储芯片 40接收 CPU1送来的数据。
一种较优的双空间存储器 4的字空间的访问过程为:访问字空间对应 于 CPU1访问内存, 这时块管理器 43不工作, 块管理器 43的输出端 c为 低电平且块管理器 43的其他输出端均为断开状态, 于是三态门 k4、 三态 门 k5和三态门 k6均为导通状态, 且字空间地址线的值来源于 CPU1的内 存地址总线和推移锁存器的输出, 此时推移系统工作, 具体为: 当 CPU1 访问内存时于内存地址总线 AB312和引脚 BE 。上送出 32位内存地址, 其 低 21位内存地址总线 AB2。〜2和 BE 。取非穿过开启的三态门 k5和三态门 k6接入各存储子体 42, 形成双空间存储器 4的低 21位地址 Ad2。〜。 (由双 空间存储器 4的字空间寻址线 AC2。〜2和字节选择线 B3〜。形成),实现对双空 间存储器 4的字空间每 2M地址范围内的字节寻址, 由此构成图 5所示系 统的映射窗; CPU1的高 1 1位的地址总线八133121接入内存地址译码阵列 2 的寻址端 ^〜。, 经由内存地址译码阵列 2后, 在推移锁存器组 3中的 2K 个锁存器中选择一个, 即选择推移矢量; 被 CPU1产生的高 11位内存地址 八133121的编码值选中的一个推移锁存器将其保存的 32 位值通过推移锁存 器组 3的输出引脚 031〜。输出到高位的字空间寻址线 W5221 ; 其中字空间寻 址线 W2421穿过开启的三态门 k5接入各存储子体 42的地址线 AC2421, 来 选择存储子体 42内部 16个窗壁中的一个; 而字空间寻址线 W5225穿过开 启的三态门 k6接字空间高位地址译码器 41的输入端 AC5225, 来选择存储 子体 42。 故: 字空间寻址线 W5221完成对双空间存储器 4的窗壁的选择, 共有 232 ( 40=4294967296 ) 个窗壁, 其值是窗位首地址的高 32位。
本发明的较佳的实施例中, 需要考虑以下这种情况:
由于计算机系统中有一些程序和数据关乎到整个系统的安全, 例如: 中断向量表、 任务段中的记录、 推移锁存器组等, 使用者一旦由于恶意或 误操作而客观上修改了这些程序或数据, 就会导致数据被盗、数据损坏或 系统崩溃。因此计算机系统总是将这些程序和数据设定为使用者不可修改 或不可见; 还有一些数据在内存中的位置已经被 CPU的硬件定义好, 必须 将它们按要求放好, 否则系统无法正常工作, 这些位置的数据也不允许使 用者修改。 进一歩地, 本发明的较佳的实施例中, 由于采用推移锁存器组 3来进 行映射窗的推移操作, 但是如果使用者能随意直接推动映射窗, 将给整个 软件系统的安全带来致命危险, 因此, 任何情况下都不能允许任何使用者 的应用程序来推动任何映射窗, 包括不能推动它自身的映射窗, 而只能向 操作系统提出访问双空间存储器 4的字空间的请求,由操作系统将使用者 的请求变换为向底层控制软件提出映射窗请求,再由底层控制软件为使用 者实施映射窗移动操作。确保使用者不能推动映射窗的办法在于不允许使 用者访问推移锁存器组。达到这一目标的方法之一是将推移锁存器组安置 在只有系统制造商的专用底层控制软件可以访问的双空间存储器 4 的字 空间的特殊位置上, 而且对给这个区域赋值的操作进行严格限制。 另外, 如果将关乎系统生命和系统自动回复的软件所对应的推移锁存器设定为 不可修改, 甚至将这几个映射窗的锁存器改用不可修改锁存器, 则可以保 证系统在任何情况下的基本安全。上述提到的不可修改锁存器即为第一类 锁存器的具体实施方式。
当修改了一个推移锁存器锁存的内容时,该推移锁存器指向双空间存 储器 4的字空间的一个新位置,对应的映射窗就被定位在以这个新位置为 窗位的窗壁上,这个窗壁的当前状态在本发明的较佳的实施例中被称为开 窗,而没有被任何推移锁存器来指向的窗壁的当前状态在本发明的较佳的 实施例中被称为闭窗。 如果将某个推移锁存器锁存的值设定为不可修改, 则相应的映射窗成为不可移动的映射窗,且这个推移锁存器就始终指向一 个特定的窗壁, 这个窗壁就始终处于开窗状态, 成为不可闭窗。 本发明的 较佳的实施例中, 任何状况下 CPU1都能透过不可移动映射窗来访问对应 的不可闭窗中的数据和程序, 这为系统自动恢复创造了条件。
由于不可闭窗的位置是由系统制造商决定的,如果位于其中的推移锁 存器的锁存值不能被读出, 则对应不可闭窗的位置对软件使用者均不可 见, 甚至其对操作系统也是不可见的。使用者或操作系统对不可闭窗的访 问只能请求系统制造商提供的底层控制软件来完成,这在一定程度上加强 了系统的安全性。
如图 3所示的实施例中示出了一种推移锁存器组 3的构造的优选实施 方式。 推移锁存器组 3是实现推移技术的核心, 是一个锁存器阵列, 其结 构如图 3所示。 图中的实施例主要由 8192个 8位锁存器芯片 74LS373形 成的推移锁存器组芯片阵列 301和一个推移锁存器地址译码器 310组成, 每 4个 74LS373芯片组成一个 32位的推移锁存器 31,编号从 0000到 2047 见图 3的双点划线方框内结构。 图中的存储芯片阵列 400即存储子体 42 组成的集合的一种实施例。
在第 j个推移锁存器 31 中 (j=0 l 2047 4个锁存器芯片 31 1的输出控制端 0并接在一起, 形成该推移锁存器 31的输出控制端 E.j ; 4个锁存器芯片 31 1 的数据输出端 Q7〜。顺序排列, 组成该推移锁存器 31 的数据输出端 031 4个锁存器芯片 31 1的写入控制端 G并接在一起, 形 成该推移锁存器 31的写入控制端 A.j ; 4个锁存器芯片 311的数据写入端 D7〜。顺序排列, 组成该推移锁存器 31的数据写入端 D3
所有推移锁存器 31的数据输出端 03 的同下标线并接在一起, 形成 推移锁存器组 3的数据输出线 32, 数据输出线 32进一歩的构成字空间地 址线的高 32位 W5221 ; 第 j个推移锁存器 31的输出控制端 E.i受内存地址 译码阵列 2的一个输出引脚 控制;所有推移锁存器 31的数据写入端 D3 。的同下标线并接在一起, 形成推移锁存器组 3的数据写入线 33, 数据写 入线 33进一歩的并连接到 CPU1的数据总线 DB31〜。; 第 j个推移锁存器 31 的写入控制端 A 受其内部的推移锁存器地址译码器 310 的一个输出引脚 X.i控制, 而推移锁存器地址译码器 310的输入端 _L。〜。接字空间地址线 W122, 推移锁存器地址译码器 310的片选端 IE接与门 Y的输出, 而与门 Y的 输入为字空间地址线 W2413取非和字空间高位地址译码器 41 的输出端 根据推移锁存器地址译码器 310的输入端 _L。〜。和片选端 IE的连接, 向第 j个推移锁存器 31写入数据 (推移矢量值) 的过程为: 当字空间地 址线 W5225全为 1且 W2413全为 0时, 与门 Y输出 1, 此时推移锁存器地址 译码器 310被选中, 推移锁存器地址译码器 310对从输入端 _L。〜。连接的 部分字空间地址线 W122输入的内容进行译码, 根据字空间地址线 W122的 值选通一个 出端, 该 X.i控制第 j个推移锁存器 31的数据写入控制端 A有效,于是 CPU1可通过数据总线 DB31〜。将推移矢量值写入第 j个推移锁 存器 31。 由此可知: 推移锁存器 31的数据写入端位于双空间存储器 4的 字空间的高端区域, 而它的数据输出端产生字空间的高位地址。 这是不同 于锁存器一般用法的特征。
本发明的较佳的实施例中, 对不可闭窗做进一歩的说明:
可设定一个不可闭窗并将一个数据表放置在该窗中。本发明的较佳的 实施例中, 可以将第第 2047号映射窗设定为不可移动映射窗, 即将它所 在的窗壁设定为不可闭窗, 并将推移锁存器组 3放置在该不可闭窗中。
本发明的较佳的实施例中, 如图 8 (A) 〜图 8 ( C ) 所示, 若将 2047 号推移锁存器的锁存值设定为 Offff ffffh, 并不可修改, 则 2047号映 射窗被设定为不可移动映射窗。 当 2047号推移锁存器把 Offff ffffh值 送上字空间寻址线 W5225后,在双空间存储器 4的字空间上寻址到 If ffff ffeO OOOOh位置, 于是第 2047号映射窗被定位在双空间存储器字空间的 If ffff ffeO 0000h位置, 即第 4294967295号窗壁, 如图 6所示的实施 例中的表格所示。
当一个推移锁存器 31的值被设定为不可修改时, 它对应的映射窗就 成为不可推移窗, 该窗被固定在该推移锁存器 31的值所指定的窗壁上, 于是这个窗壁成为不可闭窗。不可推移窗对系统的运行至关重要, 其主用 途可分为两类, 一类是实现对硬件指定的内存地址的访问, 如系统复位后 第一条指令所访问的内存地址;另一类是实现对常用程序或数据的快速访 问, 如对操作系统中常驻内存部分的访问。 图 8 (A) 〜图 8 ( C ) 中的实 施例给出了针对 IA32架构 CPU系统的不可闭窗设置和实例,对于 IA32架 构 CPU (如 Pentium家族), 系统复位后将执行位于 OfffffffOH内存地址 处的指令, 这个位置也就是系统的实地址模式初始化程序入口。 由于这个 地址的高位地址线 AB312^ 出全为 1,使第 2047号推移锁存器 31被选中, 则第 2047号推移窗为当前推移窗; 由于这个地址的低位地址线 AB2。〜。输 出为 IffffOH, 于是第一条指令必须位于 2047号推移窗的 IffffOH偏移 地址处; 由于此地址处是系统的实地址模式初始化程序入口, 因此对应的 窗壁必须在上电时就能访问, 这要求第 2047号推移窗必须在系统上电前 就位于这个窗壁。 满足这三点要求的方法就是给第 2047号推移锁存器设 定一个不能被修改的值, 使 2047号推移窗为不可推移窗, 对应的窗壁为 不可闭窗,如图 8 (A)中,设定 2047号推移锁存器 31的值为 OffffffffH, 并不能被改变, 则 2047号推移窗被定位在 4294967295号窗壁, 该窗壁在 字空间的起始地址为 If ffff ffeO 0000H, 于是该窗的 IffffOH偏移地 址的字空间地址为 If ffff ffeO 0000H+lf fff0H=lf ffff ffff fffOH, 于是在这个地址处放置 CPU1复位后要执行的第一条指令, 见图 8 ( B)。 由于图 8 ( B) 中将第一条指令安排在字空间的最高端, 则初始化程序只 能放在其他位置, 图 8 ( B ) 中将其安排在从 If ffff ffe4 8000h的位置, 这个位置在 2047号映射窗中的偏移地址为 lfffff
ffe48000h-lfffffffe00000h=48000h , 于是, 第一条指令应该是一条以 48000h为转移距离的相对转移指令。
在图 8 ( B ) 所示的实施方式下, 系统复位后执行内存地址 OffffOh 处第一条指令的操作将由推移系统引导为执行字空间 IffffffffffffOh 处的指令,该指令又将 CPU1转移到当前映射窗内偏移地址为 48000h处的 实地址方式初始化程序的开始位置, 随后 CPU1执行初始化程序。 从 CPU1 的角度看, 整个过程与现有技术并无差别。
诸如中断矢量表、 文件管理表、 推移矢量表、 推移窗管理表等数据结 构是系统运行的基础,它们会被频繁地访问,再如键盘扫描、显示器管理、 文件调度等基本操作也是经常被执行的程序模块,对这些常用数据和程序 模块的访问速度将严重影响系统的运行效率和直观感觉。在现有的计算机 系统中, 总是把常用的数据结构和程序模块放置在内存中, 以保证较高的 访问速度, 但这些数据和程序占用了大量内存, 导致用户可用内存减少, 同时导致系统的内存空间加大,这两个副作用反而减慢了系统的运行速度 和变坏了用户的直观感觉。 然而, 使用不可推移窗很容易解决这个问题, 下面分别以中断向量表、 推移矢量表和操作系统的安置来说明这个技术。
如图 8 ( B ) 所示的实施例中, 在第 4294967295号不可闭窗中安排了 中断向量表、 推移锁存器组 (推移矢量表)、 映射窗管理表、 初始化程序、 CPU停机状态、 第一条指令等记录表和程序。 其中第一条指令的位置必须 与 CPU1的初始状态值对应, 其他内容的位置都由主板制造商设定。 如图 8 (B)所示的将推移锁存器组 3设定在 If ffff ffeO OOOOh开始的 8KB位 置, 给第 0005号推移锁存器 31赋值 1234h的命令为: mov [ffeO 0014] , 1234h。 系统关机时将 CPU1停机前的所有状态都保存入 " CPU停机状态位置", 在下次开机时, 初始化程序从这个位置的内容来恢复 CPU1的状态, 则系 统就会 "立即"接续关机前的工作, 可快到用户感觉不到等待时间。 本发明的较佳的实施例中, 于上述歩骤的基础上, 该系统给推移锁存 器赋值的命令为给内存空间的 ffeO OOOOh到 ffeO lfffh赋值, 而且可使 用 32位数据指令, 赋值地址为 4的整数倍。 例如, 本发明的较佳的实施 例中, 对于 IA32架构的 CPU, 给第 0005号推移锁存器赋值 1234h的命令 为: mov [ffeO 0014] , 1234h, 即将第 5号映射窗推移到 1234h号窗壁, 该窗壁的首地址为 00 00002 4680 0000h。 制造商只要对使用者保密不可 闭窗的推移锁存器编号、 该推移锁存器中的锁存值、推移锁存器组的偏移 地址和推移锁存器组实际结构等项中的任何部分,使用者就很难干扰推移 锁存器组。底层控制软件接受使用者或操作系统的修改推移锁存器的要求 后会先检査该要求的安全性,在通过安全性检査后再代替使用者修改推移 锁存器, 由此来加强系统的安全性。
本发明的较佳的实施例中,如果再设定操作系统可以管理的块空间低 于第 4294967295号窗壁, 则普通使用者不可能利用操作系统在块空间中 向推移锁存器组所在存储单元存入文件的方法来修改推移锁存器。
本发明的较佳的实施例中, 窗壁事先由系统在双空间存储器上进行分 配。 从管理窗壁的角度考虑, 本发明的较佳的实施例中, 在如图 6中的映 射窗壁划分与管理表中还必须标记出每个窗壁的属性, 如是否为开窗状 态、若是开窗状态则哪个映射窗定位在该窗壁中、 该窗壁内存储的文件名 等等。 如图 6中所示的窗壁划分与管理表仅以 "映射窗号"、 "文件名"、 "文件后继窗壁" 来代表这些管理信息。 其中, "映射窗号" 的值为当前 定位在对应窗壁上的映射窗的编号,若该值为 ffffh则表示该窗壁的当前 状态为闭窗; "文件名" 为通过双空间存储器的块空间上的文件管理系统 被存储于该窗壁上的文件的名称; "文件后继窗壁" 栏给出对应窗壁上的 文件的相邻后继部分所在的窗壁号。显然,本发明的较佳的实施例中, "文 件名"将双空间存储器上存储的文件在块空间的位置映射到了字空间, 而
"映射窗号"又将这个文件的字空间位置映射到了内存空间, 于是 CPU可 以透过映射窗直接访问这个文件的存储单元。
本发明的较佳的实施例中, 窗壁管理表归操作系统使用, 当操作系统 在块空间上存入一个文件时, 则填写这个表的 "文件名"和 "文件后继窗 壁"; 当操作系统调度一个文件投入运行时, 则将一个可用的映射窗定位 在这个窗壁, 并填写对应的 "映射窗号"。 因此, 本发明的较佳的实施例 中, 映射窗壁划分与管理表与传统的外存储器的存储块管理表一致。
本发明的较佳的实施例中, 若系统中只有一种窗幅, 且大小等于块容 量, 则窗壁管理表可视为存储块管理表, 因此可以纳入操作系统的文件管 理系统中。
对于本发明的一个较佳的实施例中给出的不可闭窗,如果要使该不可 闭窗对操作系统不可见, 只需在映射窗壁划分与管理表中隐去该窗壁即 可。 本发明的较佳的实施例中, 如图 6所示的实施例中, 隐去了 10 0000 0000 OOOOh 以上地址的窗壁。 操作系统无法使用如图 6所示的实施例中 隐去的窗壁所对应的块空间。但是这不影响 CPU透过映射窗访问这些窗壁 的字空间, 这为隐藏重要的不可闭窗创造了条件。在隐去的窗壁空间中字 空间也不使用的部分不需安装存储器芯片, 以降低造价。
为有效管理映射窗, 本发明的较佳的实施例中, 计算机系统可建立一 个映射窗管理表来记录映射窗的使用情况(例如每个推移锁存器当前的窗 位、 映射窗的空闲时间、 对应窗壁的内容是否允许写、 文件名称、 文件是 否可执行、 文件相邻后续内容的位置等等)。 本发明的一个较佳的实施例 中, 如图 7所示的实施例中, 仅以映射窗首地址、 映射窗号、 可移动、 窗 位、 文件名、 数据类型、 共享许可、 空闲时间等为例来说明映射窗管理表 的建立和使用。其中"文件名 "标示该映射窗所位于的窗壁中的数据(§卩: 映射窗中的当前数据) 属于哪个文件; "数据类型" 标示映射窗中当前数 据的读、 写和可执行的特性(即操作属性); "共享许可"标示映射窗中当 前数据的共享条件; "可移动" 标示该映射窗是否可以被移动 (即本发明 的较佳的实施例中的 "是否可被重选"), 即对应的推移锁存器是否可以被 写入; "空闲时间" 记录该映射窗上次被使用后到目前的时间, 以供判断 该映射窗是否适合分配给新的请求者使用。
为了系统安全的考虑, 本发明的较佳的实施例中, 上述映射窗管理表 应由制造商提供的底层控制软件使用, 其对使用者(甚至操作系统)都应 当是不可见的。 具体地, 当底层控制软件收到一个分配映射窗的请求时, 需要同时获得所需的映射窗类型、 窗壁号、 窗位上的文件名、 该文件的数 据类型、 是否允许写、 是否允许共享等内容。 底层控制软件査映射窗管理 表的空闲时间列, 按照设定的算法选定一个映射窗, 例如图 7所示的实施 例中的列表中, 选定第 j号的映射窗。底层控制软件按照接收到的请求信 息修改映射窗管理表中第 j行的内容,并用相应的推移命令给第 j号推移 锁存器赋予本次映射窗请求中带来的窗壁号,从而将第 j号映射窗移动到 指定的窗壁上。 随后系统将映射窗号 j反馈给请求者。请求者得到映射窗 号后, 将其置入映射窗壁划分与管理表中该窗壁行的 "映射窗号"栏, 依 此完成将一个映射窗定位在双空间存储器字空间的指定窗壁的过程。本发 明的较佳的实施例中, 上述过程与传统地将窗壁上的数据拷贝到内存, 随 后将拷贝的对应的内存地址记录在内存地址的重定位管理表中的过程类
、 于上述技术方案的基础上, 对于系统中各个元件的物理 /逻辑连接关 系的变化, 以及读写操作方法中的流程中的等效元素替换, 均包括在本发 明的保护范围之内。
以上所述仅为本发明较佳的实施例, 并非因此限制本发明的实施方式及 保护范围, 对于本领域技术人员而言, 应当能够意识到凡运用本发明说明书 及图示内容所做出的等同替换和显而易见的变化所得到的方案, 均应当包含 在本发明的保护范围内。

Claims

权 利 要 求 书
1. 一种计算机系统, 包括处理器和存储器, 所述存储器包括多个存储单 元并被划分成多个相等大小的存储块; 每个所述存储单元具有字地址, 通过 字地址线进行访问; 每个所述存储块具有块地址, 通过块地址线进行访问, 其特征在于, 还包括:
一寻址组件, 与所述处理器内存地址线的高位及所述存储器的字地址线 的高位分别连接,可控制的在所述存储器上一连续或者不连续的预设范围内 将所述处理器形成的内存地址的高位转化为对应的所述存储器字地址的高 位并输出至所述存储器;
所述处理器内存地址线的低位与所述存储器的字地址线的低位连接; 所述预设范围小于或者等于所述处理器内存地址线的寻址范围; 所述处理器通过修改所述预设范围, 变化所述预设范围覆盖的所述存储 器的存储单元。
2. 如权利要求 1所述的计算机系统, 其特征在于, 所述寻址组件包括多 个锁存单元,每个所述锁存单元的输出端连接所述存储器的字地址线的高位, 每个所述锁存单元存储一所述存储单元的字地址的高位, 所有所述锁存单元 存储的所述存储单元的字地址的高位覆盖的所述存储器的存储单元形成所述 预设范围, 所述处理器通过修改所述锁存单元中存储的所述存储单元的字地 址的高位改变所述预设范围。
3. 如权利要求 2所述的计算机系统, 其特征在于, 所述寻址组件包括一 第一译码单元, 所述第一译码单元的输入端与所述处理器的内存地址线高位 连接, 所述第一译码单元的输出端与每个所述锁存单元分别连接, 所述第一 译码单元根据所述处理器形成的内存地址的高位选通对应的一个所述锁存单 元进行输出。
4. 如权利要求 2所述的计算机系统, 其特征在于, 所述存储器的存储单 元按照字地址被划分成复数个大小相同的区域, 每个所述锁存单元存储的所 述存储单元的字地址的高位对应一个所述区域的字地址的首地址;
所述处理器修改所述锁存单元中存储的所述存储单元的字地址的高位时 选择一当前目标文件所在的区域, 并将选中的所述区域的首地址的高位赋值 至一所述锁存单元。
5. 如权利要求 2所述的计算机系统, 其特征在于, 多个所述锁存单元中 至少包括一个第一类锁存单元, 所述第一类锁存单元存储的存储单元的字地 址的高位不可被修改。
6. 如权利要求 5所述的计算机系统, 其特征在于, 所述第一类锁存单元 存储的存储单元的字地址的高位对应的字地址所在的区域用以存储操作系 统。
7. 如权利要求 3所述的计算机系统, 其特征在于, 所述寻址组件包括一 第二译码单元, 所述第二译码单元的输入端与每个所述锁存单元的输出端分 别连接, 所述第二译码单元的输出端与所述存储器连接, 所述第二译码单元 用以根据被选中的所述锁存单元输出的所述存储器字地址的高位对所述存储 器进行字地址高位部分的寻址。
8. 如权利要求 2所述的计算机系统, 其特征在于, 所述锁存单元主要由 一组锁存器形成。
9. 如权利要求 3所述的计算机系统, 其特征在于, 所述第一译码单元主 要由一组译码器芯片形成。
10. 如权利要求 7所述的计算机系统, 其特征在于, 所述第二译码单元 主要由一组译码器芯片形成。
11. 一种数据读写方法, 其特征在于, 应用于如权利要求 1所述计算机 系统, 歩骤具体包括:
歩骤 1, 判断读写请求的目标文件是否存储于所述预设范围当前覆盖的 存储单元集合内, 如目标文件存储于所述预设范围当前覆盖的存储单元集合 内则执行歩骤 2, 否则执行歩骤 6;
歩骤 2, 处理器产生一内存地址, 所述内存地址的高位被送入所述寻址 组件, 所述内存地址的低位被送入所述存储器;
歩骤 3, 所述寻址组件将所述内存地址的高位转化为对应的所述存储器 的字地址的高位并输出至所述存储器;
歩骤 4, 所述存储器将所述寻址组件输出的所述字地址的高位及所述内 存地址的低位组合成字地址, 并选通所述字地址对应存储单元与所述处理器 连接进行读写操作; 歩骤 5, 所述处理器采用所述内存读写方式从所述当前工作内存中对数 据进行读写操作, 并退出等待下一次读写请求;
歩骤 6, 所述处理器改变所述预设范围内于所述存储器上覆盖的存储单 元集合, 使所述读写请求的目标文件处于所述预设范围内于所述存储器上覆 盖的存储单元集合内, 转至歩骤 2继续执行。
12. 如权利要求 11所述的数据读写方法, 其特征在于, 所述寻址组件包 括多个锁存单元, 每个所述锁存单元的输出端连接所述存储器的字地址线的 高位, 每个所述锁存单元存储一所述存储单元的字地址的高位, 所有所述锁 存单元存储的所述存储单元的字地址的高位覆盖的所述存储器的存储单元形 成所述预设范围, 所述处理器通过修改所述锁存单元中存储的所述存储单元 的字地址的高位改变所述预设范围。
13. 如权利要求 12所述的数据读写方法, 其特征在于, 所述寻址组件包 括一第一译码单元, 所述第一译码单元的输入端与所述处理器的内存地址线 高位连接, 所述第一译码单元的输出端与每个所述锁存单元分别连接, 所述 第一译码单元根据所述处理器形成的内存地址的高位选通对应的一个所述锁 存单元进行输出。
14. 如权利要求 12所述的数据读写方法, 其特征在于, 所述存储器的存 储单元按照字地址被划分成复数个大小相同的区域, 每个所述锁存单元存储 的所述存储单元的字地址的高位对应一个所述区域的字地址的首地址; 所述处理器修改所述锁存单元中存储的所述存储单元的字地址的高位时 选择一所述读写请求的目标文件所在的区域, 并将选中的所述区域的首地址 的高位赋值至一所述锁存单元。
15. 如权利要求 12所述的计算机系统, 其特征在于, 多个所述锁存单元 中至少包括一个第一类锁存单元, 所述第一类锁存单元存储的存储单元的字 地址的高位不可被修改。
16. 如权利要求 15所述的计算机系统, 其特征在于, 所述第一类锁存单 元存储的存储单元的字地址的高位对应的字地址所在的区域用以存储操作系 统。
17. 如权利要求 13所述的计算机系统, 其特征在于, 所述寻址组件包括 一第二译码单元, 所述第二译码单元的输入端与每个所述锁存单元的输出端 分别连接, 所述第二译码单元的输出端与所述存储器连接, 所述第二译码单 元用以根据被选中的所述锁存单元输出的所述存储器字地址的高位对所述存 储器进行字地址高位部分的寻址。
18. 如权利要求 12所述的计算机系统, 其特征在于, 所述锁存单元主要 由一组锁存器形成。
19. 如权利要求 13所述的计算机系统, 其特征在于, 所述第一译码单元 主要由一组译码器芯片形成。
20. 如权利要求 17所述的计算机系统, 其特征在于, 所述第二译码单元 主要由一组译码器芯片形成。
PCT/CN2014/080343 2014-05-12 2014-06-19 一种计算机系统及数据读写方法 WO2015172419A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/116,882 US10042759B2 (en) 2014-05-12 2014-06-19 Dual space storage management system and data read/write method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410199434.9 2014-05-12
CN201410199434.9A CN105095095B (zh) 2014-05-12 2014-05-12 一种计算机系统及数据读写方法

Publications (1)

Publication Number Publication Date
WO2015172419A1 true WO2015172419A1 (zh) 2015-11-19

Family

ID=54479213

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/080343 WO2015172419A1 (zh) 2014-05-12 2014-06-19 一种计算机系统及数据读写方法

Country Status (3)

Country Link
US (1) US10042759B2 (zh)
CN (1) CN105095095B (zh)
WO (1) WO2015172419A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108694131A (zh) * 2017-04-06 2018-10-23 罗伯特·博世有限公司 用于运行存储装置的方法和设备

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6517549B2 (ja) * 2015-03-13 2019-05-22 東芝メモリ株式会社 メモリコントローラ、記憶装置、データ転送システム、データ転送方法、及びデータ転送プログラム
US10395722B2 (en) * 2017-09-29 2019-08-27 Intel Corporation Reading from a mode register having different read and write timing
KR102638793B1 (ko) * 2018-10-01 2024-02-21 에스케이하이닉스 주식회사 반도체장치
CN110109785B (zh) * 2019-04-16 2023-03-31 晶晨半导体(上海)股份有限公司 内存容量获取方法、装置、计算机设备及可读存储介质
US10811082B1 (en) * 2019-06-24 2020-10-20 Sandisk Technologies Llc Non-volatile memory with fast data cache transfer scheme
US10825526B1 (en) * 2019-06-24 2020-11-03 Sandisk Technologies Llc Non-volatile memory with reduced data cache buffer
CN110416848B (zh) * 2019-07-16 2021-06-08 武汉盛硕电子有限公司 充电线工装、充电线和充电线读写数据的方法
US12014198B2 (en) 2021-03-25 2024-06-18 International Business Machines Corporation Running smaller memory-address width program code in a larger memory-address width address space
CN113254389B (zh) * 2021-06-07 2021-10-29 深圳华云信息系统有限公司 基于fpga的数据处理方法、装置、电子设备及存储介质
CN113656331A (zh) * 2021-10-20 2021-11-16 北京微核芯科技有限公司 基于高低位的确定访问地址的方法和装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5159672A (en) * 1989-12-28 1992-10-27 Intel Corporation Burst EPROM architecture
GB2269247A (en) * 1992-07-28 1994-02-02 Rhythm Watch Co Interfacing an IC memory card to a central processing unit of a computer
CN1731369A (zh) * 2004-08-05 2006-02-08 中兴通讯股份有限公司 扩展存贮空间的装置和随机访问方法
CN101354666A (zh) * 2008-05-22 2009-01-28 清华大学 微小卫星星载计算机数据存储用的差错检测和纠错系统
CN101369262A (zh) * 2008-09-17 2009-02-18 浪潮齐鲁软件产业有限公司 一种在寻址空间小于1m的系统内使用w83977芯片的方法
CN203151561U (zh) * 2013-04-10 2013-08-21 长春工程学院 一种网络远程控制开关

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2721415B1 (fr) * 1994-06-21 1996-09-06 France Telecom Dispositif électronique d'adressage de mémoire, notamment pour une mémoire organisée par bancs.
JP5040306B2 (ja) * 2006-12-28 2012-10-03 富士通株式会社 記憶制御装置及び記憶制御方法
CN102262595B (zh) * 2011-07-29 2014-04-02 航天恒星科技有限公司 一种微处理器扩展寻址方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5159672A (en) * 1989-12-28 1992-10-27 Intel Corporation Burst EPROM architecture
GB2269247A (en) * 1992-07-28 1994-02-02 Rhythm Watch Co Interfacing an IC memory card to a central processing unit of a computer
CN1731369A (zh) * 2004-08-05 2006-02-08 中兴通讯股份有限公司 扩展存贮空间的装置和随机访问方法
CN101354666A (zh) * 2008-05-22 2009-01-28 清华大学 微小卫星星载计算机数据存储用的差错检测和纠错系统
CN101369262A (zh) * 2008-09-17 2009-02-18 浪潮齐鲁软件产业有限公司 一种在寻址空间小于1m的系统内使用w83977芯片的方法
CN203151561U (zh) * 2013-04-10 2013-08-21 长春工程学院 一种网络远程控制开关

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108694131A (zh) * 2017-04-06 2018-10-23 罗伯特·博世有限公司 用于运行存储装置的方法和设备
CN108694131B (zh) * 2017-04-06 2024-03-29 罗伯特·博世有限公司 用于运行存储装置的方法和设备

Also Published As

Publication number Publication date
US20170153974A1 (en) 2017-06-01
CN105095095B (zh) 2018-04-06
US10042759B2 (en) 2018-08-07
CN105095095A (zh) 2015-11-25

Similar Documents

Publication Publication Date Title
WO2015172419A1 (zh) 一种计算机系统及数据读写方法
US11138143B2 (en) Techniques for command validation for access to a storage device by a remote client
US9852069B2 (en) RAM disk using non-volatile random access memory
US20230367711A1 (en) Systems and methods for scalable and coherent memory devices
TW202107297A (zh) 實施用於雲端遊戲資料儲存及擷取之高速資料通信組構之系統及方法
US8843706B2 (en) Memory management among levels of cache in a memory hierarchy
JP6049716B2 (ja) セキュアなストレージのハイジャック保護のための技術
US8099539B2 (en) Method and system of a shared bus architecture
US11061591B2 (en) Storage device processing stream data, system including the same, and operation method thereof
KR20200030325A (ko) 스토리지 장치 및 시스템
JP2005182781A (ja) バックアッププロセスのチェックポイント状態の永続メモリデバイス
WO1997028503A1 (en) Method and system for implementing data transfers
GB2483167A (en) Storage device with separate application and interface processors
JP2006252358A (ja) ディスクアレイ装置及びその共有メモリ装置、ディスクアレイ装置の制御プログラム及び制御方法
CN105718242A (zh) 多核dsp中支持软硬件数据一致性的处理方法及系统
US20100036979A1 (en) External Direct Memory Access of Embedded Controller Memory
CN105955919A (zh) 基于FPGA的多MCU读写NANDFlash的实现方法
CN104298620A (zh) 一种耐擦写低能耗的外接计算机加速设备
CN106339327A (zh) 一种计算机系统及刀片式服务器机箱
CN114691594A (zh) 一种基于非对称双核mcu设计的芯片架构及其实现方法
CN113190475A (zh) 一种二级cache控制器结构
US10261700B1 (en) Method and apparatus for streaming buffering to accelerate reads
CN106909324A (zh) 一种基于沙盒重定向的计算机加速设备
JPH10293684A (ja) コンピュータシステムおよびその立ち上げ制御方法
WO2021129304A1 (zh) 内存管理器、处理器内存子系统、处理器和电子设备

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 15116882

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14892152

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14892152

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 14892152

Country of ref document: EP

Kind code of ref document: A1