WO2015184646A1 - 高速缓冲存储器与主存储器的映射查找方法和装置 - Google Patents

高速缓冲存储器与主存储器的映射查找方法和装置 Download PDF

Info

Publication number
WO2015184646A1
WO2015184646A1 PCT/CN2014/079400 CN2014079400W WO2015184646A1 WO 2015184646 A1 WO2015184646 A1 WO 2015184646A1 CN 2014079400 W CN2014079400 W CN 2014079400W WO 2015184646 A1 WO2015184646 A1 WO 2015184646A1
Authority
WO
WIPO (PCT)
Prior art keywords
array
microring
switch
light
modulation
Prior art date
Application number
PCT/CN2014/079400
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 CN201480038272.9A priority Critical patent/CN105474215B/zh
Priority to PCT/CN2014/079400 priority patent/WO2015184646A1/zh
Publication of WO2015184646A1 publication Critical patent/WO2015184646A1/zh

Links

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02FOPTICAL DEVICES OR ARRANGEMENTS FOR THE CONTROL OF LIGHT BY MODIFICATION OF THE OPTICAL PROPERTIES OF THE MEDIA OF THE ELEMENTS INVOLVED THEREIN; NON-LINEAR OPTICS; FREQUENCY-CHANGING OF LIGHT; OPTICAL LOGIC ELEMENTS; OPTICAL ANALOGUE/DIGITAL CONVERTERS
    • G02F1/00Devices or arrangements for the control of the intensity, colour, phase, polarisation or direction of light arriving from an independent light source, e.g. switching, gating or modulating; Non-linear optics
    • G02F1/35Non-linear optics
    • G02F1/37Non-linear optics for second-harmonic generation
    • G02F1/377Non-linear optics for second-harmonic generation in an optical waveguide structure
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/40Data acquisition and logging

Definitions

  • Embodiments of the present invention relate to computer technology, and in particular, to a mapping search method and apparatus for a cache memory and a main memory. Background technique
  • a computer storage system is a system consisting of devices (hardware) and algorithms (software) that are used to store various programs, control components, and management information for storing programs and data.
  • the storage system in the existing computer includes a central processing unit (CPU), a cache (Cache, referred to as a cache), a main memory (mainmemory, referred to as main memory), and a secondary storage (auxiliary storage), the specific level
  • CPU central processing unit
  • cache cache
  • main memory mainmemory
  • secondary storage secondary storage
  • the cache is used to store instructions and data that need to be run in the near future to increase the CPU's access to the memory. Since there is a communication relationship between the cache and the main memory, there must be an address mapping between them. There are three types of address mapping between the existing cache and the main memory: direct mapping (fixed mapping), fully associative mapping (flexible) Severe mapping relationship), group associative mapping (the compromise between the two mappings above).
  • the full associative mapping allows each block in the main memory to be mapped to any position in the cache.
  • the main memory and the buffer are divided into data blocks of the same size, and a main data block can be loaded.
  • this mapping method can replace any old block from the cache that has been filled. Since any block in the main memory can be loaded into any space in the cache, the cache is stored. The space utilization is high. When the CPU needs to access data, the cache hit rate is relatively high. However, when accessing the data block, the cache compares the main block of the data block with all the tags in the cache each time. After that, it can be judged whether the required data block is in the cache.
  • the use of such address mapping method requires more digits and times of comparison, resulting in a complicated logic circuit design and an increase in delay. Summary of the invention
  • Embodiments of the present invention provide a mapping search method and apparatus for a cache memory and a main memory.
  • an optical comparator including:
  • the first portion includes a first laser array, a first modulator array, a first wavelength division multiplexer, a first beam splitter, and a first switch array; wherein the first laser array is used to output different a pulsed light of a wavelength; the first modulator array includes at least one first modulation microring forming a column, the number of the first modulation microrings being the same as the number of columns of the first switch array, at the first An input signal is applied to the modulator array, the number of the first modulation microrings is the same as the number of the input signals, and the first modulator array is configured to receive the pulsed light of different wavelengths, and respectively input the respective input signals Modulating onto each pulsed light to obtain at least one first modulated pulsed light; the first wavelength division multiplexer is configured to synthesize the received at least one first modulated pulsed light to obtain first combined modulated pulsed light, and Transmitting to the first beam splitter through a lateral waveguide; the first beam splitter is configured to obtain at least one
  • the second part comprises a second laser array, a second modulator array, a second wavelength division multiplexer, a second beam splitter and a second switch array; wherein the second laser array is used for Outputting pulsed light of different wavelengths;
  • the second modulator array includes at least one second modulation microring forming a column, the number of the second modulation microrings being the same as the number of columns of the second switch array,
  • the input signal is applied to a second modulator array, the number of the second modulator microrings being the same as the number of the input signals, the second modulator array being configured to receive the pulsed light of the different wavelengths, and
  • Each input signal is separately modulated onto each pulsed light to obtain at least one second modulated pulsed light
  • the second wavelength division multiplexer is configured to synthesize the received at least one second modulated pulsed light to obtain a second combined wave Modulating the pulsed light and transmitting it to the second beam splitter through a transverse waveguide;
  • the second beam splitter is configured to obtain
  • the first output optical signal outputted by the first portion and the second output optical signal outputted by the second portion are transmitted to a third portion through a lateral waveguide, and the third portion includes at least one light intensity detector, The number of the light intensity detectors is the same as the number of rows of the first switch array; the third portion outputs an electrical signal according to the input first output light signal and the second output light signal.
  • the method further includes: a longitudinal waveguide, and at least one light absorbing unit;
  • the longitudinal waveguide is disposed between two first switch microrings at corresponding positions in two adjacent rows of the first switch array, and two of corresponding positions in two adjacent rows of the second switch array Between the second switch microrings;
  • Each of the first switch array and the second switch array is provided with a corresponding one of the light absorbing units.
  • the method further includes: a longitudinal waveguide, and at least one light absorbing unit;
  • the longitudinal waveguide is disposed between two first switch microrings at corresponding positions in two adjacent rows of the first switch array, and two of corresponding positions in two adjacent rows of the second switch array Between the second switch microrings;
  • a corresponding one of the light absorbing units is disposed between adjacent ones of the first switch array and the second switch array.
  • an embodiment of the present invention provides an optical comparator that implements a cache and a main body by using an optical comparator, such as the first aspect or the first possible implementation of the first aspect or the second possible implementation of the first aspect.
  • a memory mapping search method including:
  • the cache memory groups the main memory block corresponding to each data storage unit in the cache memory to form a control signal array, and the control signal array is used as the first control signal of the optical comparator and the first Two control signals;
  • the main memory address of the prefetched data includes a main memory block mark of the prefetched data, and the main memory block of the prefetched data is marked as
  • the first input signal and the second input signal of the optical comparator are input to the first modulator array and the second modulator array; And transmitting data in a data storage unit at a corresponding position in the cache to the CPU according to the electrical signal array output by the third portion of the optical comparator.
  • the data of the corresponding position in the cache memory according to the electrical signal output output by the third portion of the optical comparator is sent to the CPU, including:
  • the method further includes:
  • the cache memory acquires corresponding data from the main memory according to the main memory address of the prefetched data, and sends the corresponding data to the CPU, and simultaneously updates the array of the control signals.
  • a mapping search method and apparatus for a cache memory and a main memory wherein an optical comparator is formed by using the first portion, the second portion, and the third portion, the first portion of the optical comparator including the first laser array, the first modulation Array, first wavelength division multiplexer, first beam splitter and first switch array, wherein an input signal B is applied to the first modulator array, and a control signal A is applied to the first switch microring array,
  • the relationship between the radius of the first modulation microring in the first modulation array and the radius of the first switching microring in the first switch array is 4 ⁇ , so that the first portion can implement the second of the logic operation relationship optical comparator
  • the portion includes a second laser array, a second modulator array, a second wavelength division multiplexer, a second beam splitter, and a second switch array, wherein an input signal B is applied to the second modulator array, the second switch
  • the control signal A is applied to the microring array, because the relationship between the radius ⁇ of the second modulation microring in the
  • FIG. 1 is a schematic diagram of a hierarchical structure of a storage system in an existing computer system
  • FIG. 2 is a schematic diagram of the first embodiment of the optical comparator of the present invention
  • FIG. 4 is a schematic diagram of the basic structure of the optical comparator according to the first embodiment of the present invention
  • FIG. 5 is a schematic structural view of Embodiment 1 of the optical comparator according to the present invention
  • FIG. 6 is a schematic structural view of a second embodiment of an optical comparator according to the present invention.
  • FIG. 7 is a schematic structural view of a third embodiment of an optical comparator according to the present invention.
  • FIG. 8 is a flowchart of Embodiment 1 of a method for implementing a map search of a cache memory and a main memory by using the above optical comparator;
  • FIG. 9 is a schematic diagram of a second embodiment of a method for performing a map search of a cache memory and a main memory by using the above optical comparator.
  • FIG. 3 is a schematic structural diagram of a first embodiment of a basic structure of an optical comparator according to the present invention.
  • the structure of the basic structure 1 of the optical comparator of the present embodiment may include: a first modulation microring, a first switching microring, and The light intensity detector, wherein the first modulation microring, the first switching microring and the light intensity detector are connected by a transverse waveguide, and the specific structure thereof is shown in FIG. 3, wherein the radius R fliJ of the first modulation microring and the first The dimensional relationship of the radius of a switching microring is given by equation (1). Where A is the wavelength of the light wave incident from the leftmost lateral waveguide of Fig. 3, and n is the refractive index of the light.
  • the radius of the first modulation microring and the first switching microring in the basic structure of the optical comparator shown in FIG. 3 has the relationship of the formula (1), converting it into phase, the first modulation microring can be obtained.
  • the phase difference from the first switching microring is r.
  • the control signal applied to the first modulation microring is denoted by ⁇ , and the control signal applied to the first switching microring is denoted by ⁇ .
  • the ring is in an unresonant state
  • the first modulation microring When the first modulation microring is in an unresonant state, the light wave incident from the leftmost lateral waveguide of FIG. 3 is transmitted to the right through the transverse waveguide, and transmitted to the first switching microring, so that the first switching microring is input with the optical signal.
  • the first modulation microring When the first modulation microring is in a resonant state, the light wave incident from the leftmost lateral waveguide of FIG.
  • a longitudinal waveguide is disposed beside the first switch microring.
  • the optical signal can be imported except that it can be consumed by resonating into the first switch microring.
  • the longitudinal waveguide is transmitted such that when the first switching microring resonates, no optical signal travels to the right along the transverse waveguide direction.
  • Structure 1 can give the results as shown in Table 1.
  • Table 1 Logical operation of the basic structure of the optical comparator
  • the optical signal Since the first modulation microring is in an unresonant state, the optical signal does not enter the first modulation microring, and the optical signal passes through the transverse waveguide.
  • Right transmission that is, the first switch micro-ring input has an optical signal, and since the first switch micro-ring is in an unresonant state, the optical signal does not enter the first switch micro-ring, and the optical signal passes The waveguide is transmitted to the right and transmitted to the light intensity detector.
  • ⁇ . 4 is a schematic structural diagram of Embodiment 1 of the basic structure of the optical comparator of the present invention.
  • the structure of the basic structure 2 of the optical comparator of the present embodiment may include: a second modulation microring, a second switching microring, and The light intensity detector, wherein the second modulation microring, the second switching microring and the light intensity detector are connected by a transverse waveguide, and the specific structure thereof is as shown in FIG. 4, wherein the radius of the second modulation microring R M and the The dimensional relationship of the radius of the two-switch microring is given by equation (2).
  • A is the wavelength of the light wave incident from the leftmost lateral waveguide of Fig. 4, and n is the refractive index of the light. Since the radius of the second modulation microring and the first switching microring in the basic structure of the optical comparator shown in FIG. 4 has a relationship of the formula (2), converting it into a phase, the second modulation microring can be obtained. The phase difference from the second switching microring is r.
  • the control signal applied to the second modulation microring is denoted by ⁇ , and the control signal applied to the second switching microring is denoted by ⁇ .
  • the microring is in a resonant state
  • the second modulated microring is placed in an unresonant state.
  • the second modulation microring When the second modulation microring is in an unresonant state, the light wave incident from the leftmost lateral waveguide of FIG. 4 is transmitted to the right through the transverse waveguide, and transmitted to the second switching microring, so that the second switching microring is input with the optical signal.
  • the first modulation microring When the first modulation microring is in a resonant state, the light wave incident from the leftmost lateral waveguide of FIG.
  • the second switch micro-ring input has no optical signal; when the second switch micro-ring is in an unresonant state, the optical signal input to the second switch micro-ring does not enter the second switch micro-ring, but is oriented along the transverse waveguide
  • the right transmission is output to the light intensity detector, and the light intensity detector inputs an optical signal.
  • the optical signal input to the second switching microring resonates into the second switching microring. It is consumed, so that no light signal is transmitted to the right along the direction of the transverse waveguide, that is, the light intensity detector inputs a no-light signal.
  • a longitudinal waveguide is disposed beside the second switch microring.
  • the optical signal can be imported except that it can be consumed by resonating into the second switch microring.
  • the longitudinal waveguide is transmitted such that when the second switching microring resonates, no optical signal travels to the right along the transverse waveguide direction.
  • the second switching microring is in a resonant state.
  • the second modulation microring Since the second modulation microring is in a resonant state, no optical signal is transmitted to the right through the transverse waveguide, that is, the second switching microring inputs no optical signal, and is connected to the horizontal
  • the second switching microring is in an unresonant state. Since the second modulation microring is in an unresonant state, the optical signal does not enter the second modulation microring.
  • Second modulation microring The resonant state, not The optical signal is transmitted to the right through the transverse waveguide, that is, the second switch micro-ring input has no optical signal, and the light intensity detector connected to the end of the transverse waveguide does not sense the light intensity, that is, the output electrical signal is low level 0.
  • the logic operation can be realized by using the basic structure 2 of the above optical comparator.
  • FIG. 5 is a schematic structural diagram of Embodiment 1 of the optical comparator according to the present invention.
  • the optical comparator of the embodiment is a basic structure 1 and a plurality of implementations shown in FIG. 4 of the optical comparator according to the embodiment shown in FIG.
  • the basic structure 2 of the optical comparator of the example is combined, and the optical comparator of the embodiment may include three parts, which are a first part, a second part and a third part, respectively.
  • the first part includes a first laser array, a first modulator array, a first wavelength division multiplexer, a first beam splitter, and a first switch array; wherein the first laser array is configured to output different wavelengths Pulsed light; the first modulator array includes at least one first modulation microring forming a column, the number of the first modulation microrings being the same as the number of columns of the first switch array, in the first modulator An input signal is applied to the array, the number of the first modulation microrings being the same as the number of the input signals, the first modulator array is configured to receive the pulsed light of different wavelengths, and respectively modulate each input signal to Acquiring at least one first modulated pulse light on each pulsed light; the first wavelength division multiplexer is configured to synthesize the received at least one first modulated pulsed light to obtain first combined modulated pulsed light, and Transmitting a waveguide to the first beam splitter; the first beam splitter is configured to obtain at least one first beam splitting modulated pulse light according to the first combined modulated
  • the first laser array is configured to output pulsed light of different wavelengths, and the first modulator array receives pulsed light of different wavelengths, wherein the sizes of the first modulated microrings of different rows in the first modulator array are different, respectively
  • the pulsed light of different wavelengths output by the first laser array generates resonance.
  • the first switch micro-rings of different columns in the first switch array are different in size to respectively resonate with pulse light of different wavelengths in the first split-beam modulated pulse light containing the different wavelength pulsed light passing through the first beam splitter.
  • a second part comprising a second laser array, a second modulator array, a second wavelength division multiplexer, a second beam splitter and a second switch array; wherein the second laser array is configured to output pulses of different wavelengths Light;
  • the second modulator array includes at least one second modulation microring forming a column, the number of the second modulation microrings being the same as the number of columns of the second switch array, in the second modulator array Applying the input signal, the number of the second modulator microrings is the same as the number of the input signals, and the second modulator array is configured to receive the pulsed light of different wavelengths, and respectively input the respective signals Modulating onto each pulsed light to obtain at least one second modulated pulsed light;
  • the second wavelength division multiplexer is configured to synthesize the received at least one second modulated pulsed light to obtain a second combined modulated pulsed light, and Transmitting to the second beam splitter through a transverse waveguide;
  • the second beam splitter is configured to obtain at least one second
  • the second laser array is configured to output pulsed light of different wavelengths, and the second modulator array receives pulsed light of different wavelengths, wherein the sizes of the second modulated microrings of different rows in the second modulator array are different, respectively The pulsed light of different wavelengths output by the second laser array generates resonance.
  • the second switch microrings of the different columns in the second switch array are different in size to respectively oscillate the pulsed light of different wavelengths in the first split-beam modulated pulse light having different wavelengths of pulsed light passing through the second beam splitter.
  • the first output optical signal outputted by the first portion and the second output optical signal outputted by the second portion are transmitted to the third portion through the transverse waveguide, and the third portion includes at least one light intensity detector, and the number of the light intensity detectors
  • the first switch array has the same number of rows; the third portion outputs an electrical signal according to the input first output optical signal and the second output optical signal.
  • the light intensity detector when any one of the first output optical signal and the second output optical signal connected to the same light intensity detector is an optical signal, the light intensity detector outputs a high level in the third part.
  • when an input signal is applied to the first modulator array, ⁇ may be a column vector, including a plurality of elements, each element having a value range of 0 or 1, in the first switch micro Applying a control signal ⁇ on the ring array, ⁇ can be a matrix containing multiple elements, each element has a value range of 0 or 1, and the number of columns of the A matrix is the same as the number of rows of the B matrix.
  • the first output optical signal is output, and the high level 1 indicates that the first output optical signal is an optical signal, and the low level 0 indicates the first
  • a control signal A is applied to the second switch microring array.
  • the first output optical signal outputted by the first portion and the second output optical signal outputted by the second portion are transmitted to the third portion through the transverse waveguide, wherein the first output optical signal may include a plurality of elements, and the second output optical signal may include multiple Each element of the first output optical signal is connected to an element of the same position in the second output optical signal to a same light intensity detector, and the light intensity detector outputs according to the first output optical signal and the second output optical signal.
  • the electrical signal that is, when any of the first output optical signal and the second output optical signal is an optical signal, the third portion outputs a high level 1, and otherwise outputs a low level 0.
  • the main memory block corresponding to each data storage unit in the cache memory is formed into a control signal array as a control signal in the first part and the second part of the optical comparator.
  • the cache memory receives the main memory address of the prefetched data sent by the CPU, and based on the main memory block mark of the prefetched data included in the main memory address of the prefetched data, the main memory block mark of the prefetched data is used as the light comparison.
  • the input signal of the device according to the logic operation function that the optical comparator can implement, the control signal array composed of the main memory block mark of the prefetched data and the main memory block mark corresponding to each data storage unit in the cache memory
  • the corresponding element in the electrical signal array outputted by the third portion is a low level 0, thereby, the data in the data storage unit corresponding to the low level 0 position in the electrical signal array outputted by the third portion This is the prefetched data of the CPU.
  • a light comparator is formed by using the first portion, the second portion, and the third portion
  • the first portion of the optical comparator includes a first laser array, a first modulator array, a first wavelength division multiplexer, a first beam splitter, and a first switch array, wherein an input signal B is applied to the first modulator array Applying a control signal A on the first switched microring array, since the relationship between the radius of the first modulated microring in the first modulation array and the radius of the first switching microring in the first switching array is 4 ⁇
  • the first portion can implement a logical operation relationship ⁇ ;
  • the second portion of the optical comparator includes a second laser array, a second modulator array, a second wavelength division multiplexer, a second beam splitter, and a second switch array, wherein Applying an input signal B to the second modulator array, applying a control signal A to the second switching microring array, due to the relationship between the radius R of the second modulation microring in the second modulation array and the radius of the second switching
  • This function is not realized by inverting the control signal ⁇ and the input signal ⁇ in the electric domain, but using the micro ring size on the optical domain.
  • the above relational expression is realized, because of the parallelism of light, the optical comparator has the characteristics of parallel operation and small delay, and can be applied to the position of searching for data required by the CPU in the cache memory, and is realized by using the optical comparator.
  • Fully associative mapping its logic circuit is simpler than the prior art logic circuit that implements full associative mapping, and its comparison delay does not increase with the number of comparison bits.
  • FIG. 6 is a schematic structural diagram of Embodiment 2 of the optical comparator according to the present invention.
  • the present embodiment further includes a longitudinal waveguide and at least one light absorbing unit, wherein the longitudinal waveguide is disposed in the first switch array.
  • the following two methods can be used when setting the light absorbing unit between the first switching microrings of the row and the second switching microring of each row of the second switching array:
  • a corresponding light absorbing unit is disposed between two adjacent rows of the first switch array and the second switch array; (2) each row in the first switch array and the second switch array A corresponding light absorbing unit is provided.
  • a longitudinal waveguide and a light absorbing unit are added on the basis of the embodiment shown in FIG. 5, which can better absorb the optical signal of the switched microring resonance, and avoid some optical signals not being absorbed when the switching microring resonates. And entering the array of light intensity detectors affects the output of the light comparator.
  • the first switch array and the second switch array of the optical comparator shown in FIG. 6 are both k rows and m columns, and the first modulator array and the second modulator array of the optical comparator are both m rows and 1 column, wherein k And m can take any integer, and the optical comparator can realize the function of finding which row in the k X m-dimensional matrix is equal to the m-dimensional column vector.
  • the first portion of the optical comparator of the embodiment is combined with the basic structure of the optical comparators of the embodiment of FIG. 3, wherein each of the first modulation microrings in the first modulation array is in the first switch array.
  • the size relationship of each of the first switching microrings is the radius R of the first modulation microring of each row in the first modulation microring array and the radius R of the first switching microring of each column in the first switching array. The relationship is the formula (3).
  • denotes the i-th wavelength and ⁇ denotes the refractive index of the light.
  • the second portion of the optical comparator of the present embodiment is combined with the optical comparators of the second embodiment of FIG. 4, wherein each of the second modulated microrings and the second open array of the second modulation array
  • the size relationship of each of the second switching microrings is the radius R of the first modulation microring of each row in the second modulation microring array
  • n the refractive index of light.
  • m dimension vector B as the input signal of the optical comparator, and respectively applied to the first
  • the first laser array and the second laser array of the optical comparator respectively emit m pulse lights having a wavelength of - ⁇ , respectively, and m values of the B vector are applied as an input signal to the first modulator array.
  • the m wavelengths ⁇ , - ⁇ pulsed light is synthesized by the second wavelength division multiplexer, and then split into m beams by the second beam splitter and respectively input from the entrances of different rows in the second switch array, wherein Each beam contains pulsed light of m wavelengths, and the pulsed light of m wavelengths collectively carry a B vector.
  • optical comparator function of the optical comparator of the present invention is introduced.
  • the optical comparator of the embodiment can output a matrix C, wherein the relationship between the matrix C and the matrix A and the matrix B is as follows:
  • the optical comparator is a comparator of 4 ⁇ 4 matrix and a 4-dimensional column vector, which can realize the function of finding which row in the 4 ⁇ 4 matrix is equal to the 4-dimensional column vector, Where the values of the 4 X 4 matrix and the column vector are both binary numbers 1 or 0,
  • the first laser array and the second laser array of the optical comparator respectively emit four wavelengths of pulsed light, which are applied to the first modulator array by using four values 1, 0, 1, 0 of the ⁇ vector as input signals. And on the second modulator array, when the pulsed light passes through the first modulator array and the second modulator array, the four input signals 1, 0, 1, and 0 are carried to four wavelengths, .
  • the four wavelengths of the four values 1, 0, 1, and 0 of the ⁇ vector are transmitted, and the pulsed light is synthesized by the first wavelength division multiplexer, and then split into four beams by the first beam splitter, and respectively Input from different row entries in the first switch array, each beam containing four wavelengths, and four wavelengths collectively carrying a ⁇ vector; likewise, four ⁇ vectors carrying four values 1, 0, 1, 0
  • the wavelengths ⁇ , ⁇ , ⁇ , ⁇ pulsed light are combined by the second wavelength division multiplexer, and then divided into 4 beams by the second beam splitter, and input from different row entrances in the second switch array, respectively. Each beam contains four wavelengths, and the four wavelengths collectively carry the ⁇ vector.
  • the switch microrings in each column of the first switch array and the second switch array respond to the same wavelength, and the different columns of switch microrings respond to different wavelengths, for example, criz, ⁇ , ⁇ , corresponding microrings only respond to wavelength 4, to other wavelengths Not responding.
  • the first beam splitter After the optical signal of the wavelength 4 is sent to the first wavelength division multiplexer, the first beam splitter enters the transverse waveguide of the first row of the first switch array, and since the corresponding first switch microring is in the wavelength resonance state, The optical signal of wavelength 4 is introduced into the longitudinal waveguide by the corresponding first switching microring resonance and transmitted downward, and is absorbed by the light absorbing unit; the optical signal of the wavelength ⁇ passing through the second modulation array is resonated by the second modulated microring Consumed, then no optical signal enters the transverse waveguide of the corresponding row in the first switch array, and thus the first switch array and the corresponding row in the second switch array are applied due to the same control signal
  • the pulsed optical signals of some wavelengths are introduced into the longitudinal waveguide by the corresponding switching microrings in the first switch array and the second switch array, and are transmitted downward, absorbed by the light absorbing unit, and not
  • the pulsed optical signals of the switching microring resonance in a switch array and the second switch array are transmitted along the transverse waveguide and sensed by corresponding light intensity detectors in the light intensity detector array, and each light intensity detector is based on Can I sense the light intensity output signal 1 or 0? According to the logic operation function that the above optical comparator can realize, the following results can be obtained:
  • the optical comparator in the above embodiment is applied to the fully associative mapping in the address mapping between the cache memory and the main memory, that is, each word block in the main memory can be mapped to any position in the cache memory at a high speed.
  • the optical comparator in the above embodiment is used when looking up the position of the data required by the CPU in the buffer memory.
  • FIG. 8 is a flowchart of a first embodiment of a method for searching a cache memory and a main memory by using the above optical comparator.
  • the method in this embodiment may include: Step 801: A cache memory
  • the main memory block marks corresponding to the data storage units in the cache memory constitute an array of control signals, and the control signal array is used as the control signal of the optical comparator.
  • Step 802 Receive a main memory address of the prefetched data sent by the central processing unit CPU, where the main memory address of the prefetched data includes a main memory block mark of the prefetched data, and the main memory block of the prefetched data
  • the input signal which is labeled as the optical comparator, is input to the first modulator array and the second modulator array.
  • Step 803 Send data in a data storage unit at a corresponding position in the cache to the CPU according to the electrical signal array outputted by the third portion of the optical comparator.
  • the data in the data storage unit of the corresponding location in the cache memory is sent to the CPU according to the electrical signal array outputted by the third portion of the optical comparator, which may be:
  • the data in the data storage unit corresponding to the 0 position in the signal array is sent to the CPU.
  • the cache The memory acquires corresponding data from the main memory according to the main memory address of the prefetched data, and sends the corresponding data to the CPU, and simultaneously updates the array of the control signals.
  • the main control block corresponding to each data storage unit in the cache memory is formed into a control signal array, and the control signal array is used as a control signal of the optical comparator to receive central processing.
  • a main memory address of the prefetched data sent by the CPU the main memory address of the prefetched data includes a main memory block mark of the prefetched data, and the main memory block of the prefetched data is marked as the optical comparator
  • the input signal is input to the first modulator array and the second modulator array, and the data in the data storage unit at the corresponding position in the cache memory is sent to the CPU according to the electrical signal array outputted by the third portion of the optical comparator.
  • the optical comparator realizes the negation on the optical domain by using the micro-ring size relationship, it has the characteristics of parallel operation and small delay, and can quickly find the required data, and when the number of comparison bits is large,
  • the logic circuit of the optical comparator is simpler in structure than the comparison circuit in the prior art.
  • FIG. 9 is a schematic diagram of a second embodiment of a method for searching a cache memory and a main memory by using the above optical comparator.
  • the 4-bit main memory block mark is applied as four values of the B vector and applied as an input signal to the modulator array of the optical comparator.
  • the main memory block is marked with 4 bits as an example, and the present embodiment is not limited thereto, and the high speed is
  • the buffer memory has four 4-bit marks as the A matrix, four rows and four columns, and is applied as a control signal to the switch array.
  • the light intensity detector in the optical comparator proposed in the above embodiment does not need to be too high precision, and only needs to be able to sense the light intensity without distinguishing the wavelength sensing.
  • optical comparator of the present invention is applicable not only to the cache memory and the main memory.
  • the fully associative mapping in the address mapping mode also applies to other address mapping methods, such as direct mapping and group associative mapping.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. . Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the method of various embodiments of the present invention.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Nonlinear Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Optics & Photonics (AREA)
  • Optical Modulation, Optical Deflection, Nonlinear Optics, Optical Demodulation, Optical Logic Elements (AREA)

Abstract

一种高速缓冲存储器与主存储器的映射查找方法和装置。光比较器可以实现逻辑运算关系异或,此功能的实现不是通过对控制信号A和输入信号B在电域上取反,而是在光域上利用微环尺寸的上述关系式实现,由于光的并行性,该光比较器具有并行性运算、延迟小的特点,可将其应用于在高速缓冲存储器中查找CPU所需数据的位置,使用该光比较器实现的全相联映射,其逻辑电路相对于现有技术中实现全相联映射的逻辑电路结构简单,并且其比较延迟不会随着比较位数的增多而增大。

Description

高速缓冲存储器与主存储器的映射查找方法和装置
技术领域
本发明实施例涉及计算机技术, 尤其涉及一种高速缓冲存储器与主存 储器的映射查找方法和装置。 背景技术
计算机存储系统是指计算机中由存放程序和数据的各种存储设备、 控 制部件及管理信息调度的设备 (硬件) 和算法 (软件) 所组成的系统。
现有计算机中的存储系统包括中央处理器 (Central Processing Unit, 简称 CPU)、高速缓冲存储器(Cache,简称缓存)、主存储器(Mainmemory, 简称主存) 以及辅助存储器 (辅存) , 其具体层次结构如图 1所示, 具体 的, CPU和主存之间可以直接交换信息, 但是由于主存速度无法满足 CPU 的存取需求, 故在其两者之间加入缓存, 缓存是由静态存储芯片 (SRAM) 组成, 其容量较小但速度远高于主存, 接近于 CPU速度, 从而在 CPU与主存 之间以协调 CPU和主存速度不匹配的问题。 缓存用于存放近期需要运行的指 令与数据, 以提高 CPU对存储器的访问速度。 缓存和主存之间既然存在通信 关系, 那么它们之间必然存在地址映射, 现有的缓存和主存之间地址映射方 式有三种: 直接映射 (固定的映射关系) 、 全相联映射 (灵活性大的映射关 系) 、 组相联映射 (上述两种映射的折中) 。
其中,全相联映射允许主存中每一个字块映射到缓存中任何一块位置上, 如图 2所示, 主存与缓存分成相同大小的数据块, 主存的某一数据块可以装入 缓存中的任意一块空间中, 这种映射方式可以从已被占满的缓存中替换任一 旧字块, 由于主存中的任意数据块可以装入缓存中的任意一块空间, 所以缓 存的存储空间利用率高, 当 CPU需要存取数据时, Cache命中率比较高,然而, 在存取数据块时, 缓存每次都要将数据块的主存字块标记和缓存中的全部标 记进行比较后, 才能判读出所需数据块是否在缓存内, 采用这种地址映射方 式需要比较的位数和次数较多, 从而导致其逻辑电路设计复杂和延迟增大的 不足。 发明内容
本发明实施例提供一种高速缓冲存储器与主存储器的映射查找方法 和装置。
第一方面, 本发明实施例提供一种光比较器, 包括:
第一部分, 所述第一部分包括第一激光器阵列、 第一调制器阵列、 第一 波分复用器、 第一分束器和第一开关阵列; 其中, 所述第一激光器阵列用于 输出不同波长的脉冲光; 所述第一调制器阵列包括至少一个形成一列的第一 调制微环, 所述第一调制微环的数量与所述第一开关阵列的列数相同, 在所 述第一调制器阵列上施加输入信号, 所述第一调制微环的数量与所述输入信 号的数量相同, 所述第一调制器阵列用于接收所述不同波长的脉冲光, 并将 各输入信号分别调制到各脉冲光上以获取至少一个第一调制脉冲光; 所述第 一波分复用器用于合成接收到的所述至少一个第一调制脉冲光以获得第一合 波调制脉冲光, 并通过横向波导发送给所述第一分束器; 所述第一分束器用 于根据所述第一合波调制脉冲光获得至少一个第一分束调制脉冲光, 所述第 一分束调制脉冲光的数量与所述第一开关阵列的行数相同; 所述第一开关阵 列用于将接收到的各第一分束调制脉冲光分别发送到所述第一开关阵列中每 一行所包括的至少一个第一开关微环中; 所述第一开关阵列中每一行所包括 的至少一个第一开关微环根据控制信号对所述第一分束调制脉冲光进行谐波 处理, 获取第一输出光信号; 其中, 所述第一调制微环的半径 R 与所述第一 开关微环的半径^^的关系为 R^. = RM]1 ,其中, Λ为第 1个脉冲光的波长, η为光的折射率, Γ为圆周率;
第二部分, 所述第二部分包括第二激光器阵列、 第二调制器阵列、 第二 波分复用器、 第二分束器和第二开关阵列; 其中, 所述第二激光器阵列用于 输出不同波长的脉冲光; 所述第二调制器阵列包括至少一个形成一列的第二 调制微环, 所述第二调制微环的数量与所述第二开关阵列的列数相同, 在所 述第二调制器阵列上施加所述输入信号, 所述第二调制器微环的数量与所述 输入信号的数量相同,所述第二调制器阵列用于接收所述不同波长的脉冲光, 并将各输入信号分别调制到各脉冲光上以获取至少一个第二调制脉冲光; 所 述第二波分复用器用于合成接收到的所述至少一个第二调制脉冲光以获得第 二合波调制脉冲光, 并通过横向波导发送给所述第二分束器; 所述第二分束 器用于根据所述第二合波调制脉冲光获得至少一个第二分束调制脉冲光, 所 述第二分束脉冲光的数量与所述第二开关阵列的行数相同; 所述第二开关阵 列用于将接收到的各第二分束调制脉冲光分别发送到所述第二开关阵列中每 —行所包括的至少一个第二开关微环中; 所述第二开关阵列中每一行所包括 的至少一个第二开关微环根据所述控制信号对所述第二分束调制脉冲光进行 谐波处理, 获取第二输出光信号; 其中, 所述第二调制微环的半径 R 与所述 第二开关微环的半径 R 的关系为 ^^. = .+1, 其中, 为第 1个脉冲光的 波长, η为光的折射率, Γ为圆周率;
所述第一部分输出的所述第一输出光信号与所述第二部分输出的所述第 二输出光信号通过横向波导传输到第三部分, 所述第三部分包含至少一个光 强探测器, 所述光强探测器的数量与所述第一开关阵列的行数相同; 所述第 三部分根据输入的所述第一输出光信号和所述第二输出光信号输出电信号。
结合第一方面, 在第一方面的第一种可能的实现方式中, 还包括: 纵向波导, 以及至少一个光吸收单元;
所述纵向波导设置在所述第一开关阵列中相邻两行中对应位置上的两个 第一开关微环之间, 以及所述第二开关阵列中相邻两行中对应位置上的两个 第二开关微环之间;
所述第一开关阵列和所述第二开关阵列中每一行均设置有一个对应的所 述光吸收单元。
结合第一方面, 在第一方面的第二种可能的实现方式中, 还包括: 纵向波导, 以及至少一个光吸收单元;
所述纵向波导设置在所述第一开关阵列中相邻两行中对应位置上的两个 第一开关微环之间, 以及所述第二开关阵列中相邻两行中对应位置上的两个 第二开关微环之间;
所述第一开关阵列和所述第二开关阵列中相邻两行之间设置有一个对应 的所述光吸收单元。
第二方面, 本发明实施例提供一种利用如第一方面或第一方面的第一种 可能的实现方式或第一方面的第二种可能的实现方式的光比较器实现高速缓 冲存储器与主存储器的映射查找方法, 包括:
高速缓冲存储器将所述高速缓冲存储器中的各数据存储单元对应的 主存字块标记组成控制信号阵列, 将所述控制信号阵列作为所述光比较器 的所述第一控制信号和所述第二控制信号;
接收中央处理器 CPU发送的预取数据的主存地址, 所述预取数据的 主存地址包含预取数据的主存字块标记, 将所述预取数据的主存字块标记 作为所述光比较器的所述第一输入信号和所述第二输入信号, 输入到所述 第一调制器阵列和所述第二调制器阵列; 根据所述光比较器的所述第三部分输出的电信号阵列, 将所述高速缓 冲存储器中对应位置的数据存储单元中的数据发送给 CPU。
结合第二方面, 在第二方面的第一种可能的实现方式中, 所述根据所 述光比较器的所述第三部分输出的电信号阵列, 将所述高速缓冲存储器中 对应位置的数据存储单元中的数据发送给 CPU, 包括:
将所述电信号阵列中 0 位置对应的数据存储单元中的数据发送给 CPU。
结合第二方面的第一种可能的实现方式, 在第二方面的第二种可能的 实现方式中, 所述方法还包括:
若所述电信号阵列中的各元素均为非 0元素, 则高速缓冲存储器根据 预取数据的主存地址从主存中获取对应的数据发送给 CPU,同时更新所述 所述控制信号阵列。
本发明实施例高速缓冲存储器与主存储器的映射查找方法和装置, 通 过使用第一部分、 第二部分和第三部分形成一光比较器, 光比较器的第一 部分包括第一激光器阵列、 第一调制器阵列、 第一波分复用器、 第一分束 器和第一开关阵列, 其中, 在第一调制器阵列上施加输入信号 B, 在第一 开关微环阵列上施加控制信号 A, 由于第一调制阵列中的第一调制微环的 半径^ ^与第一开关阵列中的第一开关微环的半径 的关系为 4πη , 从而使得该第一部分可以实现逻辑运算关系 光比较 器的第二部分包括第二激光器阵列、 第二调制器阵列、 第二波分复用器、 第二分束器和第二开关阵列,其中,在第二调制器阵列上施加输入信号 B , 在第二开关微环阵列上施加控制信号 A, 由于第二调制阵列中的第二调制 微环的半径^ ^与第二开关微环的半径 ^的关系为 ]' 4πη, 从而使 得该第二部分可以实现逻辑运算关系 ^, 进而通过横向波导将第一部分 输出的第一输出光信号和第二部分输出的第二部分输出光信号传输到第 三部分, 使得第三部分可以实现逻辑运算关系异或, 此功能的实现不是通 过对控制信号 Α和输入信号 B在电域 h取反, 而是在光域 h利用微环尺 寸的上述关系式实现, 由于光的并行性, 该光比较器具有并行性运算、 延 迟小的特点, 可将其应用于在高速缓冲存储器中查找 CPU所需数据的位 置, 使用该光比较器实现的全相联映射, 其逻辑电路相对于现有技术中实 现全相联映射的逻辑电路结构简单, 并且其比较延迟不会随着比较位数的 增多而增大。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将 对实施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易 见地, 下面描述中的附图是本发明的一些实施例, 对于本领域普通技术 人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得 其他的附图。
图 1为现有计算机系统中的存储系统层次结构示意图;
图 2为现有技术中高速缓冲存储器和主存储器之间的全相联映射关 图 3为本发明光比较器基本结构一实施例一的结构示意图; 图 4为本发明光比较器基本结构二实施例一的结构示意图; 图 5为本发明光比较器实施例一的结构示意图;
图 6为本发明光比较器实施例二的结构示意图;
图 7为本发明光比较器实施例三的结构示意图;
图 8为本发明利用上述光比较器实现高速缓冲存储器与主存储器的映 射查找方法实施例一的流程图;
图 9为本发明利用上述光比较器实现高速缓冲存储器与主存储器的映 射查找方法实施例二的示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 3为本发明光比较器基本结构一实施例一的结构示意图, 如图 3所 示, 本实施例光比较器基本结构一的结构可以包括: 第一调制微环、 第一 开关微环和光强探测器, 其中, 第一调制微环、 第一开关微环和光强探测 器通过横向波导连接, 其具体结构如图 3所示, 其中, 第一调制微环的半 径 RfliJ与第一开关微环的半径 的尺寸关系为公式 (1 ) 。 其中, A为从图 3最左侧横向波导入射的光波的波长, n为光的折射率。 由于图 3所示的光比较器的基本结构中的第一调制微环和第一开关微 环的半径具有如公式 (1 ) 的关系, 将其换算为相位, 可以得出第一调制 微环与第一开关微环的相位差为 r。
在第一调制微环上所施加的控制信号用 Β表示, 在第一开关微环上所施 加的控制信号用 Α表示。 当 A=l表示对第一开关微环施加控制信号, 从而使 得该第一开关微环处于谐振状态; 当 A=0表示对第一开关微环不施加控制信 号, 从而使得该第一开关微环处于不谐振状态; 当 B=l表示对第一调制微环 施加控制信号, 从而使得该第一调制微环处于不谐振状态; 当 B=0表示对第 一调制微环不施加控制信号, 从而使得该第一调制微环处于谐振状态。
当第一调制微环处于不谐振状态时, 从图 3最左侧横向波导入射的光 波会通过横向波导向右传输, 传输到第一开关微环, 从而第一开关微环输 入有光信号, 当第一调制微环处于谐振状态时, 从图 3最左侧横向波导入 射的光波会被谐振到该第一调制微环中而被消耗, 从而没有光信号通过横 向波导向右传输, 从而第一开关微环输入无光信号; 当第一开关微环处于 不谐振状态时, 输入到第一开关微环的光信号不会进入该第一开关微环 内, 而是沿着横向波导方向向右传输, 传输到光强探测器, 光强探测器输 入有光信号, 当第一开关微环处于谐振状态时, 输入到第一开关微环的光 信号会谐振进入第一开关微环内而被消耗, 从而没有光信号沿着横向波导 方向向右传输, 即光强探测器输入无光信号。
如图 3所示, 在第一开关微环旁设置有纵向波导, 则当第一开关微环 处于谐振时, 光信号除了可以通过谐振进入第一开关微环而被消耗掉外, 还可以导入纵向波导而被传出, 从而使得当第一开关微环谐振时, 没有光 信号沿着横向波导方向向右传输。
施加在第一开关微环上的控制信号的取值范围为 A=0或 1, 施加在第 一调制微环上的控制信号的取值范围为 B=0或 1, 利用上述光比较器基本 结构一可以得出如表 1的结果。 表 1 光比较器基本结构一实现的逻辑运算
Figure imgf000009_0001
其中, 当 A=0, B=0时, 表示对第一调制微环不施加控制信号, 该第 一调制微环处于谐振状态, 对第一开关微环不施加控制信号, 该第一开关 微环处于不谐振状态, 由于第一调制微环处于谐振状态, 则没有光信号通 过横向波导向右传输, 即第一开关微环输入无光信号, 进而连接在横向波 导末端的光强探测器感测不到光强, 即输出电信号为低电平 0; 当 A=0, B=l, 表示对第一调制微环施加控制信号, 该第一调制微环处于不谐振状 态, 对第一开关微环不施加控制信号, 该第一开关微环处于不谐振状态, 由于第一调制微环处于不谐振状态, 则光信号不会进入第一调制微环中, 有光信号通过横向波导向右传输, 即第一开关微环输入有光信号, 由于该 第一开关微环处于不谐振状态, 则该有光信号不会进入该第一开关微环 中, 则该有光信号通过横向波导向右传输, 传输到光强探测器, 光强探测 器输入有光信号, 光强探测器感测到光强, 即输出电信号为高电平 1 ; 当 A=l, B=0, 表示对第一调制微环不施加控制信号, 该第一调制微环处于 谐振状态,对第一开关微环施加控制信号,该第一开关微环处于谐振状态, 由于第一调制微环处于谐振状态, 则没有光信号通过横向波导向右传输, 即第一开关微环输入无光信号, 进而连接在横向波导末端的光强探测器感 测不到光强, 即输出电信号为低电平 0; 当 A=l, B=l, 表示对第一调制 微环施加控制信号, 该第一调制微环处于不谐振状态, 对第一开关微环施 加控制信号, 该第一开关微环处于谐振状态, 由于第一调制微环处于不谐 振状态, 则有光信号通过横向波导向右传输, 即第一开关微环输入有光信 号, 然而由于第一开关微环处于谐振状态, 则该有光信号进入第一开关微 环中, 进而没有光信号通过横向波导传输给光强探测器, 光强探测器感测 不到光强, 即输出电信号为低电平 0。
即利用上述光比较器基本结构一可以实现逻辑运算: ^。 图 4为本发明光比较器基本结构二实施例一的结构示意图, 如图 4所 示, 本实施例光比较器基本结构二的结构可以包括: 第二调制微环、 第二 开关微环和光强探测器, 其中, 第二调制微环、 第二开关微环和光强探测 器通过横向波导连接, 其具体结构如图 4所示, 其中, 第二调制微环的半 径 RM与第二开关微环的半径 的尺寸关系为公式 (2) 。
其中, A为从图 4最左侧横向波导入射的光波的波长, n为光的折射率。 由于图 4所示的光比较器的基本结构中的第二调制微环和第一开关微 环的半径具有如公式 (2 ) 的关系, 将其换算为相位, 可以得出第二调制 微环与第二开关微环的相位差为 r。
在第二调制微环上所施加的控制信号用 Β表示, 在第二开关微环上所施 加的控制信号用 Α表示。 当 A=l表示对第二开关微环施加控制信号, 从而使 得该第二开关微环处于不谐振状态; 当 A=0表示对第二开关微环不施加控制 信号, 从而使得该第二开关微环处于谐振状态; 当 B=l表示对第二调制微环 施加控制信号, 从而使得该第二调制微环处于谐振状态; 当 B=0表示对第二 调制微环不施加控制信号, 从而使得该第二调制微环处于不谐振状态。
当第二调制微环处于不谐振状态时, 从图 4最左侧横向波导入射的光波 会通过横向波导向右传输, 传输到第二开关微环, 从而第二开关微环输入有 光信号, 当第一调制微环处于谐振状态时, 从图 4最左侧横向波导入射的光 波会被谐振到该第一调制微环中而被消耗, 从而没有光信号通过横向波导向 右传输, 从而第二开关微环输入无光信号; 当第二开关微环处于不谐振状态 时, 输入到第二开关微环的光信号不会进入该第二开关微环内, 而是沿着横 向波导方向向右传输, 输出到光强探测器, 光强探测器输入有光信号, 当第 二开关微环处于谐振状态时, 输入到第二开关微环的光信号会谐振进入第二 开关微环内而被消耗, 从而没有光信号沿着横向波导方向向右传输, 即光强 探测器输入无光信号。
如图 4所示, 在第二开关微环旁设置有纵向波导, 则当第二开关微环 处于谐振时, 光信号除了可以通过谐振进入第二开关微环而被消耗掉外, 还可以导入纵向波导而被传出, 从而使得当第二开关微环谐振时, 没有光 信号沿着横向波导方向向右传输。 施加在第二开关微环上的控制信号的取值范围为 A=0或 1, 施加在第 二调制微环上的控制信号的取值范围为 B=0或 1, 利用上述光比较器基本 结构二可以得出如表 2的结果。
表 2 光比较器基本结构二实现的逻辑运算
Figure imgf000011_0001
其中, 当 A=0, B=0时, 表示对第二调制微环不施加控制信号, 该第 二调制微环处于不谐振状态, 对第二开关微环不施加控制信号, 该第二开 关微环处于谐振状态, 由于第二调制微环处于不谐振状态, 则光信号不会 进入第二调制微环中, 有光信号通过横向波导向右传输, 即第二开关微环 输入有光信号, 由于该第二开关微环处于谐振状态, 则该有光信号进入第 二开关微环中, 进而没有光信号通过横向波导传输给光强探测器, 光强探 测器感测不到光强, 即输出电信号为低电平 0; 当 A=0, B=l时, 表示对 第二调制微环施加控制信号, 该第二调制微环处于谐振状态, 对第二开关 微环不施加控制信号, 该第二开关微环处于谐振状态, 由于第二调制微环 处于谐振状态, 则没有光信号通过横向波导向右传输, 即第二开关微环输 入无光信号, 进而连接在横向波导末端的光强探测器感测不到光强, 即输 出电信号为低电平 0; 当 A=l, B=0时, 表示对第二调制微环不施加控制 信号, 该第二调制微环处于不谐振状态, 对第二开关微环施加控制信号, 该第二开关微环处于不谐振状态, 由于第二调制微环处于不谐振状态, 作 为光信号不会进入第二调制微环中, 有光信号通过横向波导向右传输, 即 第二开关微环输入有光信号, 由于该第二开关微环处于不谐振状态, 则该 有光信号不会进入该第二开关微环中, 则该有光信号通过横向波导向右传 输, 传输到光强探测器, 光强探测器输入有光信号, 光强探测器感测到光 强, 即输出电信号为高电平 1 ; 当 A=l, B=l, 表示对第二调制微环施加 控制信号,该第二调制微环处于谐振状态,对第二开关微环施加控制信号, 该第二开关微环处于不谐振状态, 由于第二调制微环处于谐振状态, 则没 有光信号通过横向波导向右传输, 即第二开关微环输入无光信号, 进而连 接在横向波导末端的光强探测器感测不到光强,即输出电信号为低电平 0。
即利用上述光比较器基本结构二可以实现逻辑运算 。
从上述光比较器基本结构一和光比较器基本结构二的描述, 可以看出 光比较器基本结构一和二分别实现了逻辑运算异或 "㊉" 的前半部分和后 半部分, 即 Θ = + Α 中的: 和^ 4· , 并且此功能的实现不是通过对 控制信号 A和 B在电域上取反, 而是在光域上利用微环尺寸的上述关系式
(公式 (1 ) 和公式 (2 ) ) 实现。
图 5为本发明光比较器实施例一的结构示意图, 本实施例的光比较器 是利用多个上述图 3所示实施例的光比较器的基本结构一和多个上述图 4 所示实施例的光比较器的基本结构二组合而成, 本实施例的光比较器可以 包括三个部分, 分别为第一部分、 第二部分以及第三部分。
其中, 第一部分, 包括第一激光器阵列、 第一调制器阵列、 第一波分复 用器、 第一分束器和第一开关阵列; 其中, 所述第一激光器阵列用于输出不 同波长的脉冲光; 所述第一调制器阵列包括至少一个形成一列的第一调制微 环, 所述第一调制微环的数量与所述第一开关阵列的列数相同, 在所述第一 调制器阵列上施加输入信号, 所述第一调制微环的数量与所述输入信号的数 量相同, 所述第一调制器阵列用于接收所述不同波长的脉冲光, 并将各输入 信号分别调制到各脉冲光上以获取至少一个第一调制脉冲光; 所述第一波分 复用器用于合成接收到的所述至少一个第一调制脉冲光以获得第一合波调制 脉冲光, 并通过横向波导发送给所述第一分束器; 所述第一分束器用于根据 所述第一合波调制脉冲光获得至少一个第一分束调制脉冲光, 所述第一分束 调制脉冲光的数量与所述第一开关阵列的行数相同; 所述第一开关阵列用于 将接收到的各第一分束调制脉冲光分别发送到所述第一开关阵列中每一行所 包括的至少一个第一开关微环中; 所述第一开关阵列中每一行所包括的至少 一个第一开关微环根据控制信号对所述第一分束调制脉冲光进行谐波处理, 获取第一输出光信号; 其中, 所述第一调制微环的半径 R 与所述第一开关微 环的半径 ? 的关系为 = ? +1, 其中, Λ为第 1个脉冲光的波长, n为 光的折射率, Γ为圆周率;
其中, 第一激光器阵列用于输出不同波长的脉冲光, 第一调制器阵列接 收不同波长的脉冲光, 其中, 第一调制器阵列中不同行的第一调制微环的尺 寸不同, 以分别对第一激光阵列输出的各不同波长的脉冲光产生谐振。 第一 开关阵列中不同列的第一开关微环的尺寸不同, 以分别对经过第一分束器的 含有不同波长脉冲光的第一分束调制脉冲光中的不同波长的脉冲光产生谐 振。 第二部分, 包括第二激光器阵列、 第二调制器阵列、 第二波分复用器、 第二分束器和第二开关阵列; 其中, 所述第二激光器阵列用于输出不同波长 的脉冲光; 所述第二调制器阵列包括至少一个形成一列的第二调制微环, 所 述第二调制微环的数量与所述第二开关阵列的列数相同, 在所述第二调制器 阵列上施加所述输入信号, 所述第二调制器微环的数量与所述输入信号的数 量相同, 所述第二调制器阵列用于接收所述不同波长的脉冲光, 并将各输入 信号分别调制到各脉冲光上以获取至少一个第二调制脉冲光; 所述第二波分 复用器用于合成接收到的所述至少一个第二调制脉冲光以获得第二合波调制 脉冲光, 并通过横向波导发送给所述第二分束器; 所述第二分束器用于根据 所述第二合波调制脉冲光获得至少一个第二分束调制脉冲光, 所述第二分束 脉冲光的数量与所述第二开关阵列的行数相同; 所述第二开关阵列用于将接 收到的各第二分束调制脉冲光分别发送到所述第二开关阵列中每一行所包括 的至少一个第二开关微环中; 所述第二开关阵列中每一行所包括的至少一个 第二开关微环根据所述控制信号对所述第二分束调制脉冲光进行谐波处理, 获取第二输出光信号; 其中, 所述第二调制微环的半径 R 与所述第二开关微 环的半径 R 的关系为 ^ = +1, 其中, Λ为第 1个脉冲光的波长, n为 光的折射率, Γ为圆周率;
其中, 第二激光器阵列用于输出不同波长的脉冲光, 第二调制器阵列接 收不同波长的脉冲光, 其中, 第二调制器阵列中不同行的第二调制微环的尺 寸不同, 以分别对第二激光阵列输出的各不同波长的脉冲光产生谐振。 第二 开关阵列中不同列的第二开关微环的尺寸不同, 以分别对经过第二分束器的 含有不同波长脉冲光的第一分束调制脉冲光中的不同波长的脉冲光产生谐 振。
第一部分输出的第一输出光信号与第二部分输出的第二输出光信号通过 横向波导传输到第三部分, 第三部分包含至少一个光强探测器, 所述光强探 测器的数量与所述第一开关阵列的行数相同; 所述第三部分根据输入的所述 第一输出光信号和所述第二输出光信号输出电信号。
其中, 当连接相同光强探测器的第一输出光信号和第二输出光信号中 任意一输出光信号为有光信号, 第三部分中该光强探测器输出高电平。
具体地, 上述光比较器的第一部分, 当在第一调制器阵列上施加输入 信号 Β, Β可以为列向量, 包含多个元素, 各元素取值范围为 0或 1, 在 第一开关微环阵列上施加控制信号 Α, Α可以为一矩阵, 包含多个元素, 各元素的取值范围为 0或 1, A矩阵的列数与 B矩阵的行数相同, 第一激 光器阵列输出不同波长的脉冲光经过该光比较器的第一部分后, 输出第一 输出光信号, 用高电平 1表示第一输出光信号为有光信号, 用低电平 0表 示第一输出光信号为无光信号, 则第一输出光信号与控制信号八、 输入信 号 B具有逻辑运算关系: 第一输出光信号 = s。
上述光比较器的第二部分, 当在第二调制器阵列上施加输入信号 B,
B可以为一阵列, 包含多个元素, 各元素取值范围 0或 1, 在第二开关微 环阵列上施加控制信号 A, A可以为一矩阵, 包含多个元素, 各元素的取 值范围为 0或 1, A矩阵的列数与 B矩阵的行数相同, 第二激光器阵列输 出不同波长的脉冲光经过该光比较器的第二部分后, 输出第二输出光信 号, 用高电平 1表示第二输出光信号为有光信号, 用低电平 0表示第二输 出光信号为无光信号, 则第二输出光信号与控制信号八、 输入信号 B具有 逻辑运算关系: 第二输出光信号 = 5。
第一部分输出的第一输出光信号和第二部分输出的第二输出光信号 通过横向波导传输到第三部分,其中,第一输出光信号可以包含多个元素, 第二输出光信号可以包含多个元素, 第一输出光信号中的各元素与第二输 出光信号中相同位置的各元素连接一相同光强探测器, 该光强探测器根据 第一输出光信号和第二输出光信号输出电信号, 即当第一输出光信号和第 二输出光信号中任一输出光信号为有光信号, 则第三部分输出高电平 1, 否则输出低电平 0。 经过上述分析, 通过第三部分可以实现逻辑运算: 输 出电信号=第一输出光信号 +第二输出光信号 = s + 5。
利用上述本发明实施例提供的光比较器, 将高速缓冲存储器中的各数 据存储单元对应的主存字块标记组成控制信号阵列作为该光比较器的第 一部分和第二部分中的控制信号, 高速缓冲存储器接收 CPU发送的预取 数据的主存地址, 根据该预取数据的主存地址包含的预取数据的主存字块 标记, 将预取数据的主存字块标记作为该光比较器的输入信号, 根据该光 比较器所能实现的逻辑运算功能, 当预取数据的主存字块标记与高速缓冲 存储器中的各数据存储单元对应的主存字块标记组成的控制信号阵列中 某一行相同时,第三部分输出的电信号阵列中与其对应的元素为低电平 0, 由此, 第三部分输出的电信号阵列中低电平 0位置对应的数据存储单元中 的数据即为 CPU的预取数据。
本实施例,通过使用第一部分、第二部分和第三部分形成一光比较器, 光比较器的第一部分包括第一激光器阵列、 第一调制器阵列、 第一波分复 用器、 第一分束器和第一开关阵列, 其中, 在第一调制器阵列上施加输入 信号 B , 在第一开关微环阵列上施加控制信号 A, 由于第一调制阵列中的 第一调制微环的半径^^与第一开关阵列中的第一开关微环的半径 的 关系为 4πη 从而使得该第一部分可以实现逻辑运算关系^ ; 光比较器的第二部分包括第二激光器阵列、 第二调制器阵列、 第二波分复 用器、 第二分束器和第二开关阵列, 其中, 在第二调制器阵列上施加输入 信号 B , 在第二开关微环阵列上施加控制信号 A, 由于第二调制阵列中的 第二调制微环的半径 R 与第二开关微环的半径 的关系为 4πη , 从而使得该第二部分可以实现逻辑运算关系 , 进而通 过横向波导将第一部分输出的第一输出光信号和第二部分输出的第二部 分输出光信号传输到第三部分, 使得第三部分可以实现逻辑运算关系异 或, 此功能的实现不是通过对控制信号 Α和输入信号 Β在电域上取反, 而 是在光域上利用微环尺寸的上述关系式实现, 由于光的并行性, 该光比较 器具有并行性运算、 延迟小的特点, 可将其应用于在高速缓冲存储器中查 找 CPU所需数据的位置, 使用该光比较器实现的全相联映射, 其逻辑电路 相对于现有技术中实现全相联映射的逻辑电路结构简单, 并且其比较延迟 不会随着比较位数的增多而增大。
图 6为本发明光比较器实施例二的结构示意图, 本实施例是在上述实 施例的基础上, 还包括纵向波导和至少一个光吸收单元, 所述纵向波导设 置在第一开关阵列中每行的第一开关微环之间, 以及第二开关阵列中每行 的第二开关微环之间, 相应设置光吸收单元时可以选用以下两种方式:
( 1 ) 如图 6所示, 在第一开关阵列和第二开关阵列中相邻两行之间设置 一个对应的光吸收单元; (2 ) 在第一开关阵列和第二开关阵列中每一行 均设置一个对应的光吸收单元。
本实施例在图 5所示实施例的基础上增加了纵向波导和光吸收单元, 可以更好的吸收被开关微环谐振的光信号, 避免当开关微环谐振时有部分 光信号没有被吸收消耗而进入光强探测器阵列, 影响光比较器的输出结 果。
下面采用一个具体的实施例, 对上述实施例的技术方案进行详细说 明。 本实施例采用图 6所示光比较器进行说明。
图 6所示的光比较器的第一开关阵列和第二开关阵列均为 k行 m列, 该光比较器的第一调制器阵列和第二调制器阵列均为 m行 1列, 其中, k 和 m可以取任意整数, 利用该光比较器可以实现查找 k X m维矩阵中哪一 行和该 m维列向量相等的功能。
本实施例的光比较器的第一部分利用多个图 3实施例所述的光比较器 基本结构一组合而成, 其中, 第一调制阵列中的各第一调制微环与第一开 关阵列中的各第一开关微环的尺寸关系为, 第一调制微环阵列中每行的第 一调制微环的半径 R 和第一开关阵列中的每一列的第一开关微环的半径 R 的尺寸关系为公式 (3 ) 。
λ
RaB, = RaAj, + ί = 2· · · τη ( 3 )
Figure imgf000016_0001
其中 Λ表示第 i个波长, η表示光的折射率。
本实施例的光比较器的第二部分利用多个图 4实施例所述的光比较器 本结构二组合而成, 其中, 第二调制阵列中的各第二调制微环与第二开 阵列中的各第二开关微环的尺寸关系为, 第二调制微环阵列中每行的第 调制微环的半径 R
Figure imgf000016_0002
其中 表; ,· 水、波〉 长, n表示光的折射率。 m 维列向量 B= 作为该光比较器的输入信号, 并分别作用于第一
4: 2 · · · Am
^22 · " ^2m 调制器阵列上。 kX m维矩阵 A
Figure imgf000016_0003
, c, 2 · • · 4," 为光比较器的控制信号, 并分别作用于第一开关阵列和第二开关阵列。
具体地, 该光比较器的第一激光器阵列和第二激光器阵列分别发出 m 个波长分别为 -Λ的脉冲光, 通过第一调制器阵列将 B 向量的 m个 值 … 作为输入信号施加到第一调制阵列巾的每一个第一调制微环 上, 通过第二调制阵列将 B向量的 m个值 … 作为输入信号施加到 第二调制阵列中的每一个第二调制微环上, 当第一激光器阵列和第二激光 器阵列发出的脉冲光分别经过第一调制器阵列和第二调制器阵列时, B向 量的 m个值 … 就被承载到 m个波长 Λ、 4··Λ的脉冲光上,即将 Α承 载到波长 Λ的脉冲光上, 将 承载到波长 ^的脉冲光上, 依此类推。 承载 B向量的 m个值 B2 -Bm的 m个波长 ^、 A2 - -Am的脉冲光通过第一波分复 用器合成一束,然后再利用第一分束器分成 m束并分别从第一开关阵列中 的不同行的入口输入, 其中每一束都含有 m个波长的脉冲光, 且 m个波 长的脉冲光共同承载 B向量, 同样地, 承载 B向量的 m个值 … 的 m个波长 Λ、 -Λ的脉冲光通过第二波分复用器合成一束,然后再利用第 二分束器分成 m束并分别从第二开关阵列中的不同行的入口输入,其中每 一束都含有 m个波长的脉冲光, 且 m个波长的脉冲光共同承载 B向量。 第一开关阵列和第二开关阵列中每一列中的第一开关微环和第二开关微 环响应相同波长的脉冲光, 不同列的第一开关微环和第二开关微环响应不 同波长的脉冲光, 即在第一开关微环阵列和第二开关微环阵列中施加控制 信号为 、 … ^的第一开关微环或者第二开关微环, 其只对波长为 ^的 脉冲光响应, 而对其他波长 ^… 的脉冲光不响应; 同样地, 第一开关微 环阵列和第二开关微环阵列中施加控制信号为 Λ ω、 Λ ω ···Λ,ω的第一开关 微环或者第二开关微环, 其只对波长为 4的脉冲光响应, 而对其他波长 ·· ^的脉冲光不响应, 其中™ = 1· · ·∞, m可以取任意正整数。
根据上述实施例对本发明光比较器实现的逻辑运算功能的介绍, 本实 施例的光比较器可以输出矩阵 C, 其中, 矩阵 C与矩阵 A和矩阵 B之间 的关系如下式:
4:
Figure imgf000017_0001
根据输出矩阵 C中哪一个值为 0,从而确定 A矩阵对应 C向量中值为 0的行和 B向量相等, 通过输出结果即可查找出矩阵中和向量相等的对应 行。
图 7为本发明光比较器实施例三的结构示意图, 其中本实施例的光比 较器是在上述实施例中对 k和 m分别取值为 k=4, m=4时, 对上述实施例 的技术方案作具体举例说明。
当 k=4, m=4时, 该光比较器是一个 4 X 4矩阵和一个 4维列向量的 比较器, 可以实现查找 4 X 4矩阵中哪一行和该 4维列向量相等的功能, 其中, 4 X 4矩阵和列向量的值均为二进制数 1或 0 ,
1 0 1 0
1
具体地, 以在矩阵 = 中查找向量 B= 作举例说明。
0
0
光比较器的第一激光器阵列和第二激光器阵列分别发出四个波长 ΛΛΛ,^的脉冲光, 通过将 Β向量的四个值 1、 0、 1、 0作为输入信号施 加到第一调制器阵列和第二调制器阵列上, 当脉冲光经过第一调制器阵列 和第二调制器阵列时, 1、 0、 1、 0 四个输入信号就被承载到四个波长 ΑΛ,^Α脉冲光上。承载 Β向量四个值 1、 0、 1、 0的四个波长 ^Λ,^Α脉 冲光通过第一波分复用器合成一束, 然后再利用第一分束器分成 4束, 并 分别从第一开关阵列中的不同行入口输入, 其中每一束都含有四个波长, 且四个波长共同承载 Β向量; 同样地, 承载 Β向量四个值 1、 0、 1、 0的 四个波长 Λ,^,Λ,Α脉冲光通过第二波分复用器合成一束, 然后再利用第二 分束器分成 4束, 并分别从第二开关阵列中的不同行入口输入, 其中每一 束都含有四个波长, 且四个波长共同承载 Β向量。第一开关阵列和第二开 关阵列中每一列中开关微环响应相同波长, 不同列开关微环响应不同波 长, 例如, „、 Λ、 Λ、 对应的微环只对波长 4响应, 对其他波长 不响应。
将 Α矩阵 4行 4列的每个值作为控制信号施加到第一开关阵列和第二开 关阵列中相应的开关微环上, 当承载 B向量的每束光信号输入到横向波导 并向前传输, 利用光比较器基本结构一和光比较器基本结构二的工作原 理, 例如, = 1表示有控制信号施加到第一开关阵列和第二开关阵列中 对应的开关微环上, 则第一开关阵列中 对应的第一开关微环处于对 波长 Λ谐振状态, 第二开关阵列中 对应的第二开关微环处于对波长 ^不 谐振状态,由于第一开关微环和第一调制微环的微环尺寸存在上述公式(1 ) 的关系, 第二开关微环和第二调制微环的微环尺寸存在上述公式 (2 ) 的 关系, 从而当 B1=l时, 第一调制阵列中^对应的第一调制微环处于不谐振 状态, 第二调制阵列中 ^对应的第二调制微环处于谐振状态, 即通过第一 调制阵列的波长 Λ的光信号输出波长 Λ的有光信号到第一波分复用器, 通过 第二调制阵列的波长 Λ的光信号输出无光信号到第二波分复用器。 波长 4的 有光信号到第一波分复用器后通过第一分束器进入第一开关阵列中第一行的 横向波导, 由于 对应的第一开关微环处于对波长 ^谐振状态, 则波长 4的 有光信号会被 对应的第一开关微环谐振导入到纵向波导并向下传输, 被 光吸收单元吸收掉; 通过第二调制阵列的波长 Λ的光信号被第二调制微环 谐振消耗掉, 则没有光信号进入第一开关阵列中的相应行的横向波导, 进而 由于施加相同控制信号的第一开关阵列和第二开关阵列中的相应行连接 同一光强探测器, 所以连接 、 Λ、 : 对应的开关阵列的光强探测器感 测不到 ^的光强。 通过上述方式, 有的波长的脉冲光信号会被第一开关阵 列和第二开关阵列中相应的开关微环谐振导入到纵向波导上并向下传 输, 被光吸收单元吸收掉, 而未被第一开关阵列和第二开关阵列中开关 微环谐振的脉冲光信号会沿着横向波导传输, 并被光强探测器阵列中相 应的光强探测器感测到, 每一个光强探测器会根据能否感测到光强输出 电信号 1或 0。 根据上述光比较器所能实现的逻辑运算功能, 可以得出如下 结果:
A B C
Figure imgf000019_0001
根据上述分析最终光强探测器阵列输出 4个电信号(^=0、 C2=l、
C3=l、 C4=l, 因^=0即可判断出 A矩阵第一行向量和 B向量相等。
将上述实施例中的光比较器应用于高速缓冲存储器与主存储器之间 地址映射中的全相联映射, 即主存储器中每一字块可以映射到高速缓冲存 储器中的任何一个位置, 在高速缓冲存储器中查找 CPU所需数据的位置时 使用上述实施例中的光比较器。
图 8为本发明利用上述光比较器实现高速缓冲存储器与主存储器的映 射查找方法实施例一的流程图, 如图 8所示, 本实施例的方法可以包括: 歩骤 801 : 高速缓冲存储器将所述高速缓冲存储器中的各数据存储单 元对应的主存字块标记组成控制信号阵列, 将所述控制信号阵列作为所述 光比较器的所述控制信号。
歩骤 802: 接收中央处理器 CPU发送的预取数据的主存地址, 所述预 取数据的主存地址包含预取数据的主存字块标记, 将所述预取数据的主存 字块标记作为所述光比较器的所述输入信号, 输入到所述第一调制器阵列 和所述第二调制器阵列。
歩骤 803 : 根据所述光比较器的所述第三部分输出的电信号阵列, 将 所述高速缓冲存储器中对应位置的数据存储单元中的数据发送给 CPU。
其中, 所述根据所述光比较器的所述第三部分输出的电信号阵列, 将 所述高速缓冲存储器中对应位置的数据存储单元中的数据发送给 CPU,具 体可以为: 将所述电信号阵列中 0位置对应的数据存储单元中的数据发送 给 CPU。
进一歩地, 若所述电信号阵列中的各元素均为非 0元素, 则高速缓冲 存储器根据预取数据的主存地址从主存中获取对应的数据发送给 CPU,同 时更新所述所述控制信号阵列。
本实施例的方法, 通过将所述高速缓冲存储器中的各数据存储单元对 应的主存字块标记组成控制信号阵列, 将所述控制信号阵列作为所述光比 较器的控制信号, 接收中央处理器 CPU发送的预取数据的主存地址, 所 述预取数据的主存地址包含预取数据的主存字块标记, 将所述预取数据的 主存字块标记作为所述光比较器的输入信号, 输入到第一调制器阵列和第 二调制器阵列, 根据光比较器的第三部分输出的电信号阵列, 将高速缓冲 存储器中对应位置的数据存储单元中的数据发送给 CPU, 即通过将高速缓 冲存储器中的各数据存储单元对应的主存字块标记组成控制信号阵列施加到 光比较器的开关阵列上,将 CPU发送的预取数据的主存地址作为光比较器的 输入信号, 从而利用光比较器所能实现的异或逻辑运算, 实现在高速缓冲存 储器中查找 CPU所需数据, 其中, 由于光比较器是利用微环尺寸关系实现光 域上的取反, 其具有并行性运算、 延迟小的特点, 能快速查找到所需数据, 并且当比较位数较多时, 该光比较器的逻辑电路相对于现有技术中的比较电 路结构简单。
下面采用一个具体的实施例对图 8所述实施例作具体说明。
图 9为本发明利用上述光比较器实现高速缓冲存储器与主存储器的映 射查找方法实施例二的示意图, 如图 9所示, 按照图 9中箭头所示的对应 关系, 将 CPU所需数据的 4位主存字块标记作为 B向量 4个值并作为输 入信号施加到光比较器的调制器阵列, 这里的主存字块标记为 4位是举例 说明, 本实施并不仅限于此, 将高速缓冲存储器 4个 4位标记作为 A矩阵 4行 4列并作为控制信号施加到开关阵列, 通过光比较器的逻辑运算, 最 终输出 C向量 4个值, 依据 C向量哪一个值为 0, 从而迅速判断出 CPU 所需数据在高速缓冲存储器的哪一个字块中。 如 d=0, CPU所需数据即 在高速缓冲存储器的第 1个字块中。 若 C向量 4个值均不为 0, 说明 CPU 所需数据不在 Cache中, 需要去主存储器中取数据。
上述实施例中提出的光比较器中的光强探测器无需太高精度, 仅需能 否感测到光强即可, 无需对波长区分感测。
进一歩地, 本发明的光比较器不仅适用于高速缓冲存储器与主存储器 之间地址映射方式中的全相联映射, 还适用于其他地址映射方式, 如直接 映射和组相联映射。
在本发明所提供的几个实施例中, 应该理解到, 所揭露的装置和方法, 可以通过其它的方式实现。例如, 以上所描述的装置实施例仅仅是示意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可以有另外 的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个系统, 或 一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或 直接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合或通信连 接, 可以是电性, 机械或其它的形式。
所述该作为分离部件说明的单元可以是或者也可以不是物理上分开的, 作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一个单 元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用硬件加软件 功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元, 可以存储在一个计算机 可读取存储介质中。 上述软件功能单元存储在一个存储介质中, 包括若干指 令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等) 或处理器 (processor) 执行本发明各个实施例所述方法的部分歩骤。 而前述 的存储介质包括: U盘、移动硬盘、只读存储器(Read-Only Memory, ROM)、 随机存取存储器(Random Access Memory, RAM) 、 磁碟或者光盘等各种可 以存储程序代码的介质。
本领域技术人员可以清楚地了解到, 为描述的方便和简洁, 仅以上述各 功能模块的划分进行举例说明, 实际应用中, 可以根据需要而将上述功能分 配由不同的功能模块完成, 即将装置的内部结构划分成不同的功能模块, 以 完成以上描述的全部或者部分功能。 上述描述的装置的具体工作过程, 可以 参考前述方法实施例中的对应过程, 在此不再赘述。
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要 求 书
1、 一种光比较器, 其特征在于, 包括:
第一部分, 所述第一部分包括第一激光器阵列、 第一调制器阵列、 第一 波分复用器、 第一分束器和第一开关阵列; 其中, 所述第一激光器阵列用于 输出不同波长的脉冲光; 所述第一调制器阵列包括至少一个形成一列的第一 调制微环, 所述第一调制微环的数量与所述第一开关阵列的列数相同, 在所 述第一调制器阵列上施加输入信号, 所述第一调制微环的数量与所述输入信 号的数量相同, 所述第一调制器阵列用于接收所述不同波长的脉冲光, 并将 各输入信号分别调制到各脉冲光上以获取至少一个第一调制脉冲光; 所述第 一波分复用器用于合成接收到的所述至少一个第一调制脉冲光以获得第一合 波调制脉冲光, 并通过横向波导发送给所述第一分束器; 所述第一分束器用 于根据所述第一合波调制脉冲光获得至少一个第一分束调制脉冲光, 所述第 一分束调制脉冲光的数量与所述第一开关阵列的行数相同; 所述第一开关阵 列用于将接收到的各第一分束调制脉冲光分别发送到所述第一开关阵列中每 —行所包括的至少一个第一开关微环中; 所述第一开关阵列中每一行所包括 的至少一个第一开关微环根据控制信号对所述第一分束调制脉冲光进行谐波 处理, 获取第一输出光信号; 其中, 所述第一调制微环的半径 R 与所述第一 开关微环的半径^^的关系为 R^. = RM]1 ,其中, Λ为第 1个脉冲光的波长, η为光的折射率, Γ为圆周率;
第二部分, 所述第二部分包括第二激光器阵列、 第二调制器阵列、 第二 波分复用器、 第二分束器和第二开关阵列; 其中, 所述第二激光器阵列用于 输出不同波长的脉冲光; 所述第二调制器阵列包括至少一个形成一列的第二 调制微环, 所述第二调制微环的数量与所述第二开关阵列的列数相同, 在所 述第二调制器阵列上施加输入信号, 所述第二调制器微环的数量与所述输入 信号的数量相同, 所述第二调制器阵列用于接收所述不同波长的脉冲光, 并 将各输入信号分别调制到各脉冲光上以获取至少一个第二调制脉冲光; 所述 第二波分复用器用于合成接收到的所述至少一个第二调制脉冲光以获得第二 合波调制脉冲光, 并通过横向波导发送给所述第二分束器; 所述第二分束器 用于根据所述第二合波调制脉冲光获得至少一个第二分束调制脉冲光, 所述 第二分束脉冲光的数量与所述第二开关阵列的行数相同; 所述第二开关阵列 用于将接收到的各第一分束调制脉冲光分别发送到所述第一开关阵列中每一 行所包括的至少一个第二开关微环中; 所述第二开关阵列中每一行所包括的 至少一个第二开关微环根据所述控制信号对所述第二分束调制脉冲光进行谐 波处理, 获取第二输出光信号; 其中, 所述第二调制微环的半径 R 与所述第 二开关微环的半径 ¾^的关系为 = + , 其中, ^为第 1个脉冲光的波 长, η为光的折射率, Γ为圆周率; 所述第一部分输出的所述第一输出光信号与所述第二部分输出的所述第 二输出光信号通过横向波导传输到第三部分, 所述第三部分包含至少一个光 强探测器, 所述光强探测器的数量与所述第一开关阵列的行数相同; 所述第 三部分根据输入的所述第一输出光信号和所述第二输出光信号输出电信号。
2、 根据权利要求 1所述的光比较器, 其特征在于, 还包括:
纵向波导, 以及至少一个光吸收单元;
所述纵向波导设置在所述第一开关阵列中相邻两行中对应位置上的两个 第一开关微环之间, 以及所述第二开关阵列中相邻两行中对应位置上的两个 第二开关微环之间;
所述第一开关阵列和所述第二开关阵列中每一行均设置有一个对应的所 述光吸收单元。
3、 根据权利要求 1所述的光比较器, 其特征在于, 还包括:
纵向波导, 以及至少一个光吸收单元;
所述纵向波导设置在所述第一开关阵列中相邻两行中对应位置上的两个 第一开关微环之间, 以及所述第二开关阵列中相邻两行中对应位置上的两个 第二开关微环之间;
所述第一开关阵列和所述第二开关阵列中相邻两行之间设置有一个对应 的所述光吸收单元。
4、 一种利用如权利要求 1或 2或 3所述的光比较器实现高速缓冲存储 器与主存储器的映射查找方法, 其特征在于, 包括:
高速缓冲存储器将所述高速缓冲存储器中的各数据存储单元对应的 主存字块标记组成控制信号阵列, 将所述控制信号阵列作为所述光比较器 的所述控制信号;
接收中央处理器 CPU发送的预取数据的主存地址, 所述预取数据的 主存地址包含预取数据的主存字块标记, 将所述预取数据的主存字块标记 作为所述光比较器的所述输入信号, 输入到所述第一调制器阵列和所述第 二调制器阵列;
根据所述光比较器的所述第三部分输出的电信号阵列, 将所述高速缓 冲存储器中对应位置的数据存储单元中的数据发送给 CPU。
5、 根据权利要求 4所述的方法, 其特征在于, 所述根据所述光比较 器的所述第三部分输出的电信号阵列, 将所述高速缓冲存储器中对应位置 的数据存储单元中的数据发送给 CPU, 包括:
将所述电信号阵列中 0 位置对应的数据存储单元中的数据发送给 CPU。
6、 根据权利要求 5所述的方法, 其特征在于, 所述方法还包括: 若所述电信号阵列中的各元素均为非 0元素, 则高速缓冲存储器根据 预取数据的主存地址从主存中获取对应的数据发送给 CPU,同时更新所述 所述控制信号阵列。
PCT/CN2014/079400 2014-06-06 2014-06-06 高速缓冲存储器与主存储器的映射查找方法和装置 WO2015184646A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480038272.9A CN105474215B (zh) 2014-06-06 2014-06-06 高速缓冲存储器与主存储器的映射查找方法和装置
PCT/CN2014/079400 WO2015184646A1 (zh) 2014-06-06 2014-06-06 高速缓冲存储器与主存储器的映射查找方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/079400 WO2015184646A1 (zh) 2014-06-06 2014-06-06 高速缓冲存储器与主存储器的映射查找方法和装置

Publications (1)

Publication Number Publication Date
WO2015184646A1 true WO2015184646A1 (zh) 2015-12-10

Family

ID=54765980

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/079400 WO2015184646A1 (zh) 2014-06-06 2014-06-06 高速缓冲存储器与主存储器的映射查找方法和装置

Country Status (2)

Country Link
CN (1) CN105474215B (zh)
WO (1) WO2015184646A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107037662A (zh) * 2017-04-21 2017-08-11 太原理工大学 基于并行交叉相位调制效应的全光比较器

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107870455A (zh) * 2016-09-28 2018-04-03 华为技术有限公司 一种微环调制器、超宽带调制器以及调制系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526716A (zh) * 2008-03-04 2009-09-09 电子科技大学 全光比较器
US20110229149A1 (en) * 2010-03-22 2011-09-22 Infinera Corporation Optical transmitter supplying optical signals having multiple modulation formats
CN103678258A (zh) * 2013-12-25 2014-03-26 中国科学院半导体研究所 一种提高硅基光学矩阵处理器数据分辨率的方法及处理器

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526716A (zh) * 2008-03-04 2009-09-09 电子科技大学 全光比较器
US20110229149A1 (en) * 2010-03-22 2011-09-22 Infinera Corporation Optical transmitter supplying optical signals having multiple modulation formats
CN103678258A (zh) * 2013-12-25 2014-03-26 中国科学院半导体研究所 一种提高硅基光学矩阵处理器数据分辨率的方法及处理器

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107037662A (zh) * 2017-04-21 2017-08-11 太原理工大学 基于并行交叉相位调制效应的全光比较器

Also Published As

Publication number Publication date
CN105474215B (zh) 2019-03-26
CN105474215A (zh) 2016-04-06

Similar Documents

Publication Publication Date Title
CN109783013B (zh) 配置和访问可扩展对象存储的方法和系统
CN113159304A (zh) 光电计算装置
US9207171B2 (en) Methods for increasing transmission through scattering random media
US9915850B2 (en) Optical beams
Psota et al. ATAC: Improving performance and programmability with on-chip optical networks
CN112912900A (zh) 光电计算系统
ES2533757A1 (es) Operaciones criptográficas
KR102063282B1 (ko) 온-칩 광학적 상호연결 구조 및 네트워크
Le Beux et al. Reduction methods for adapting optical network on chip topologies to 3D architectures
CN113496281A (zh) 光电计算系统
CN107430550A (zh) 非对称集组合的高速缓存
WO2015184646A1 (zh) 高速缓冲存储器与主存储器的映射查找方法和装置
US9390016B2 (en) Accessing an off-chip cache via silicon photonic waveguides
Vagionas et al. Integrated optical content addressable memories (CAM) and optical random access memories (RAM) for ultra-fast address look-up operations
CN103903295B (zh) 一种基于InfiniBand实时调度海量高精度三维场景数据的方法
Kolasinski et al. Fast data transmission from serial data acquisition for the GEM detector system
Ishii et al. Toward exa-scale optical circuit switch interconnect networks for future datacenter/HPC
Liu et al. EncSIM: An encrypted similarity search service for distributed high-dimensional datasets
Brunina et al. Building data centers with optically connected memory
Zhang et al. Ohm-gpu: Integrating new optical network and heterogeneous memory into gpu multi-processors
Maniotis et al. An optically-enabled chip–multiprocessor architecture using a single-level shared optical cache memory
US10649968B2 (en) Smaller proximate search index
US20100262804A1 (en) Effective Memory Clustering to Minimize Page Fault and Optimize Memory Utilization
CN109324981A (zh) 高速缓存管理系统和方法
Xu et al. BandArb: Mitigating the effects of thermal and process variations in silicon-photonic network

Legal Events

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

Ref document number: 201480038272.9

Country of ref document: CN

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

Ref document number: 14894137

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: 14894137

Country of ref document: EP

Kind code of ref document: A1