There is disclosed, a high speed comparator with bit-wise masking takes advantage of early availability of the reference word and mask word to generate conditional select signals, thereby minimizing the time required to generate a comparator output once the input word to be compared is available.

Patent
   5977864
Priority
May 15 1998
Filed
May 15 1998
Issued
Nov 02 1999
Expiry
May 15 2018
Assg.orig
Entity
Large
3
2
all paid
17. A comparator for comparing two n-bit words, comprising:
a plurality of n selector circuits, each of the selector circuits adapted to receive as first, second, and third inputs a fixed state, an input bit and an inverse of the input bit, each of the selector circuits adapted to receive first, second and third select inputs, the first select input being a mask bit, the second and third select inputs being a logical combination of the mask bit and a bit of one of the two n-bit words, each selector circuit adapted to select one of the inputs as an output depending upon which select input is active.
1. A comparator for comparing two multiple-bit words, comprising:
at least one selector circuit, the at least one selector circuit adapted to receive as first, second and third inputs a fixed state, an input bit and an inverse of the input bit, the at least one selector circuit adapted to receive first, second and third select inputs, the first select input being a mask bit, the second and third select inputs being a logical combination of the mask bit and a bit of one of the multiple-bit words, the at least one selector circuit adapted to select one of the inputs as an output depending upon which select input is active.
29. A method of comparing two n-bit words in a masked comparator, comprising the steps of:
providing a fixed state as a first input to a selector circuit;
providing a bit and a logical inverse of the bit of a first one of the two n-bit words as second and third inputs to the selector circuit;
providing a mask bit as a first select input to the selector circuit;
providing a first logical combination of the mask bit and a bit of a second one of the two n-bit words as a second select input to the selector circuit;
providing a second logical combination of the mask bit and the bit of the second one of the two n-bit words as a third select input to the selector circuit; and
selecting one of the inputs as an output of the selector circuit depending upon which select input is active.
32. A method of comparing two n-bit words in a masked comparator, comprising the steps of:
providing a fixed state as a first input to each of n selector circuits;
providing a bit and a logical inverse of the bit of a first one of the two n-bit words as second and third inputs to each of the respective n selector circuits;
providing one of n mask bits as a first select input to each of the respective n selector circuits;
providing a first logical combination of the nth mask bit and an nth bit of a second one of the two n-bit words as a second select input to each of the respective n selector circuits;
providing a second logical combination of the nth mask bit and the nth bit of the second one of the two n-bit words as a third select input to each of the respective n selector circuits; and
selecting one of the inputs of each of the n selector circuits as an output of each of the respective n selector circuits depending on which select input to each of the respective n selector circuits is active.
2. A comparator as recited in claim 1, further comprising:
a logic circuit adapted to receive and logically combine outputs from each at least one selector circuit, the logic circuit adapted to provide an output indicative of a bit-by-bit comparison of the two multiple-bit words.
3. A comparator as recited in claim 1, wherein said at least one selector circuit is a multiplexer.
4. A comparator as recited in claim 1, wherein the fixed state is selected as the output when the first select input is active.
5. A comparator as recited in claim 1, wherein the second state is selected as the output when the second select input is active.
6. A comparator as recited in claim 1, wherein the third input is selected as the output when the third select input is active.
7. A comparator as recited in claim 2, wherein the logic circuit comprises a NAND gate.
8. A comparator as recited in claim 2, wherein the logic circuit comprises a NOR gate.
9. A comparator as recited in claim 1, wherein a select input is active when in a logic low state.
10. A comparator as recited in claim 1, wherein a select input is active when in a logic high state.
11. A comparator as recited in claim 1, further comprising a NOR gate, the NOR gate adapted to generate one of said first and second select inputs.
12. A comparator as recited in claim 11, further comprising:
an inverter, the inverter adapted to receive as an input a bit of one of the two multiple-bit words, the inverter adapted to produce an output, the inverter output coupled as an input to the NOR gate.
13. A comparator as recited in claim 1, wherein the comparator is fabricated in an integrated circuit.
14. A comparator as recited in claim 13, wherein the integrated circuit is a microprocessor.
15. A comparator as recited in claim 13, wherein the integrated circuit is a microcontroller.
16. A comparator as recited in claim 13, wherein the integrated circuit is a digital signal processor.
18. A comparator as recited in claim 17, further comprising:
a logic circuit adapted to receive and logically combine the outputs from each of the plurality of selector circuits, the logic circuit adapted to provide an output indicative of a bit-by-bit comparison of the two n-bit words.
19. A comparator as recited in claim 17, wherein each selector circuit is a multiplexer.
20. A comparator as recited in claim 17, wherein the fixed state is selected as the output when the first select input is active.
21. A comparator as recited in claim 17, wherein the second input is selected as the output when the second select input is active.
22. A comparator as recited in claim 17, wherein the third input is selected as the output when the third select input is active.
23. A comparator as recited in claim 18, wherein the logic circuit comprises a NAND gate.
24. A comparator as recited in claim 18, wherein the logic circuit comprises a NOR gate.
25. A comparator as recited in claim 20, wherein a select input is active when in a low state.
26. A comparator as recited in claim 20, wherein a select input is active when in a high state.
27. A comparator as recited in claim 17, further comprising a NOR gate, the NOR gate adapted to one of said first and second select inputs.
28. A comparator as recited in claim 17, further comprising an inverter, the inverter adapted to receive as input a bit of one of the two n-bit words, the inverter adapted to produce an output, the inverter output coupled as an input to the NOR gate.
30. The method of comparing two n-bit words as recited in claim 29, further comprising the step of:
providing the select inputs and the fixed state to the selector circuit prior to providing the second and third inputs to the selector circuit.
31. The method of comparing two n-bit words as recited in claim 30, further comprising the step of acquiring the first one of the two n-bit words from a bus.
33. The method of comparing two n-bit words as recited in claim 32, further comprising the steps of
providing the select inputs and fixed state to each of the n selector circuits prior to providing the second and third inputs to each of the n selector circuits.
34. The method of comparing two n-bit words as recited in claim 33, further comprising the step of acquiring the first one of the two n-bit words from a bus.
35. The method of comparing two n-bit words as recited in claims 32, further comprising the step of:
logically combining the outputs from each of the n selector circuits to produce a comparison signal.
36. The method of comparing two n-bit words as recited in claim 35, wherein the logical combination is a logical AND.
37. The method of comparing two n-bit words as recited in claim 35, wherein the logical combination is a logical NOR.

This invention relates to comparators and in particular to high speed digital comparators where individual bits may be masked from comparison.

Comparators compare each bit of two words, an input word and a reference word, to determine whether the two words are identical, that is to determine whether each bit of the two words are identical or match. A masked comparator, with masking of individual bits, compares bits of the input word and reference words that are not masked to determine whether the unmasked bits of the two words are identical. A signal is generated indicating a match when the bits that are not masked in the input word and reference words match, without regard to whether the masked bits match. Otherwise a signal is generated indicating a match has not occurred.

One technique to compare the bits of an input word and a reference word in a masked comparator is disclosed in U.S. Pat. No. 4,958,140, the disclosure of which is incorporated by reference. This technique employs a two stage circuit. In the first stage a linear array of identical cells, one for each bit position in the words being compared, operates on one bit of each of the input word, the reference word and a mask word to determine whether there is a match for that bit position and to generate a comparison signal. The second stage combines the comparison signals from each cell in the first stage. The second stage can be realized using either a single logic gate with as many inputs as there are comparison signals from the first stage, or an inverted tree of logic gates. The output from the second stage is a match or no-match signal for the comparison of the input word and a reference word.

Specifically, for each bit position, a bit of the input word is combined with a bit of the reference word to produce an intermediate first stage output for that bit position. The intermediate first stage output for that bit position is then combined with the mask bit of the corresponding bit position to produce an output for each cell. As a result, the critical path from the input of bits of the input word, reference word, and mask word, to the output of the first stage of cells includes at least two gate delays, and the time required to obtain a final determination of the comparison even longer since the intermediate outputs from the first stage provide the inputs to the second stage.

While the known comparator technique achieves the desired result very rapidly, there remains a need to reach the final comparison result more quickly.

In accordance with the invention, a high speed comparator with bit-wise masking takes advantage of early availability of the reference word and mask word to generate conditional select signals, thereby minimizing the time required to generate a comparator output once the input word to be compared is available.

FIG. 1 is a simplified schematic diagram of a high speed digital comparator in accordance with the present invention;

FIG. 2 is a simplified schematic diagram of a bit-level comparator for use in the comparator of FIG. 1; and

FIG. 3 is a simplified schematic diagram of an alternative embodiment bit-level comparator that is a dual of the bit-level comparator of FIG. 2, also for use in the comparator of FIG. 1.

A high speed comparator with bit-wise masking takes advantage of early availability of the reference word and mask word to generate conditional select signals, thereby minimizing the time required to generate a comparator output once the input word to be compared is available. A mask provides the flexibility to compare all bits or selected bits of an input word with a reference word. With a dynamic mask that can change between comparison operations, the selected portions of a word that can be compared need not be predetermined, but can be determined during runtime.

Masked comparators are utilized in several applications in microprocessors, microcontrollers, and digital signal processors. Masked comparators may be used in any application where a determination of whether two words are the same or different is required. One application employs a masked comparator monitoring an address on an address bus of a processor. The comparator compares the address on the address bus to a known address so as to determine which memory array data should be read from or written to.

A digital comparator with bit-wise masking computes:

E=(m1 +x1 •r1)•(m2 x2 •r2)•. . . •(mn +xn •rn) (1)

where: X(x1, x2, . . . xn) is an n-bit input word;

R=(r1, r2, . . . rn) is an n-bit reference word;

M=(m1, m2, . . . mn) is an n-bit mask word; and

n is an integer indicating the number of bits.

Rewriting equation (1), redefining terms on the right side of the equation results

E=e1 •e2 • . . . en

where: ej =mj xj •rj

When E is a logic high, the bits in the input word, X, match the corresponding bits in the reference word, R, without regard to the logic state of the bits being masked by the mask word, M. A bit-level comparator circuit 10 for use in a high speed digital comparator 12 is shown in the simplified schematic diagram of FIG. 2. In FIG. 2, j is a subscript ranging up to n denoting the jth bit of each of the input word, reference word, and mask word.

Although each of the reference word, mask word and input word must be available before a comparison can be made, the reference word and mask word are typically available before the input word is available. Since the reference word and mask word are typically available before the input word, they may be used to set up selection of bits such that when the input word becomes available, the bit comparison can be completed.

As shown in FIG. 2, a selector circuit such as multiplexer 20 selects one of three inputs 22, 24, and 26 as its output 28 based on the logic state of three select inputs, 30, 32, and 34. Output 28 of multiplexer 20, denoted also as ej, is a bit level comparison of the jth mask bit, the jth input bit, and the jth reference bit, and may take on either logic state to indicate a comparison.

Only one of the three select inputs 30, 32, and 34 will be a logic high at any time due to the logic state of the three inputs 22, 24 and 26. When select input 30 is high, input 22 is selected as output 28 of multiplexer 20. Select input 30 is the mask bit mj. When select input 32 is high, input 24 is selected as output 28 of multiplexer 20. Select input 32 is a logic combination of the mask bit mj and the reference bit rj. NOR gate 36 combines mask bit mj with reference bit rj to generate an output that is select input 32. When select input 34 is high, input 26 is selected as output 28 of multiplexer 20. Select input 34 is also a logic combination of the mask bit mj and the reference bit rj. NOR gate 38 combines mask bit mj with the inverse of the reference bit rj output from inverter 40 to generate an output that is select input 34.

A high speed comparator 12 for comparing two n-bit words is shown in FIG. 1. High speed comparator 12 includes a plurality of n bit-level comparators 10, one for each bit in the words being compared. A subscript has been added to reference numeral 10 in FIG. 1 to denote the bit position being compared by each bit-level comparator 10.

The reference word R is illustrated as being retained in a register 50, but the invention is not limited thereto. Mask word M is illustrated as being retained in register 52, but the invention is not limited thereto. Input word X is illustrated as being provided by bus 54 such as an address bus, but could also be provided from a register. The result of the bit level comparisons, e0 through en, are combined in logic 56 to determine whether there is a match of all of the unmasked bits. Logic 56 produces a match comparison signal 58. Comparison signal 58, also denoted as E in equation (1), may take on a first logic state, such as a logic high, to indicate all of the unmasked bits match, and a second logic state, such as a logic low, to indicate not all of the unmasked bits match.

Logic 56 may be a multiple input gate such as an AND or NOR gate. The logic 56 is dependent upon whether ej is generated, or ej, by bit-level comparators. When bit level comparator 10 of FIG. 2 is employed in comparator 12 of FIG. 1, each bit level comparator produces an ej and logic 56 is a multiple input NOR gate. When ej is generated, then logic 56 is a multiple input NOR gate wherein each input is bit level comparison ej. When bit level comparator 10' of FIG. 3 is employed in comparator 12 of FIG. 1, each bit level comparator produces an ej and logic 56 is a multiple input AND gate. When ej is generated, then logic 56 is a multiple input AND gate wherein each input is bit level comparison ej. The bit level comparators of FIGS. 2 and 3 are duals of each other. Equation 1 is implemented using the bit level comparator of FIG. 2. A dual of equation 1, not illustrated, results in the bit level comparator of FIG. 3. In the circuit of FIG. 3, like the circuit of FIG. 2, the mask bits are represented as being active high, although the invention is not limited thereto.

The bit-level comparator 10 of the present invention provides a single element delay from the input of multiplexer 20 to the determination of the bit level comparisons. Once the bits of the input word are available, they need only pass through one multiplexer to select the bit level comparison ej.

At each bit position, if the mask bit is set the bit position comparison for that bit position may be ignored. This is achieved by selecting as output ej the input 22. If the mask bit is not set, the input bit and reference bit are compared and the output ej is selected as either the input bit or its inverse. If all of the unmasked individual bits of the input word and the reference word match on a bit-by-bit basis, then the input word and reference word match.

While an illustrative embodiment of the invention has been described in which each of the input word, reference word, and mask word have the same number of bits, the invention is not limited thereto. Furthermore, while an illustrative embodiment of the invention has been described as providing a mask bit that takes on a logic state that is a logic high when the bit is masked, one skilled in the art could design a circuit in which a mask bit takes on a logic state that is a logic low when the bit is masked.

While the illustrative embodiment has used the descriptive terms input word, reference word, and mask word, any of the descriptors may be used to describe any of the three words being compared.

Kolagotla, Ravi Kumar, Mo, Jiancheng, Buonpane, Michael S.

Patent Priority Assignee Title
6992943, May 07 2001 Samsung Electronics Co., Ltd. System and method for performing partial array self-refresh operation in a semiconductor memory device
7137046, Aug 12 2003 AVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD High speed comparator for 10G SERDES
9779526, Nov 27 2012 Canon Kabushiki Kaisha Method, system and apparatus for determining area of a pixel covered by a scalable definition for a character
Patent Priority Assignee Title
4958140, Mar 18 1988 NEC Electronics Corporation Comparator unit for data discrimination
5880671, Oct 31 1996 Hewlett Packard Enterprise Development LP Flexible circuitry and method for detecting signal patterns on a bus
///////////////
Executed onAssignorAssigneeConveyanceFrameReelDoc
May 13 1998BUONPANE, MICHAEL S Lucent Technologies IncASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0091950856 pdf
May 13 1998MO, JIANCHENGLucent Technologies IncASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0091950856 pdf
May 13 1998KOLAGOTLA, RAVI KUMARLucent Technologies IncASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0091950856 pdf
May 15 1998Lucent Technologies Inc.(assignment on the face of the patent)
May 06 2014Agere Systems LLCDEUTSCHE BANK AG NEW YORK BRANCH, AS COLLATERAL AGENTPATENT SECURITY AGREEMENT0328560031 pdf
May 06 2014LSI CorporationDEUTSCHE BANK AG NEW YORK BRANCH, AS COLLATERAL AGENTPATENT SECURITY AGREEMENT0328560031 pdf
Aug 04 2014Agere Systems LLCAVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0353650634 pdf
Feb 01 2016DEUTSCHE BANK AG NEW YORK BRANCH, AS COLLATERAL AGENTLSI CorporationTERMINATION AND RELEASE OF SECURITY INTEREST IN PATENT RIGHTS RELEASES RF 032856-0031 0376840039 pdf
Feb 01 2016AVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD BANK OF AMERICA, N A , AS COLLATERAL AGENTPATENT SECURITY AGREEMENT0378080001 pdf
Feb 01 2016DEUTSCHE BANK AG NEW YORK BRANCH, AS COLLATERAL AGENTAgere Systems LLCTERMINATION AND RELEASE OF SECURITY INTEREST IN PATENT RIGHTS RELEASES RF 032856-0031 0376840039 pdf
Jan 19 2017BANK OF AMERICA, N A , AS COLLATERAL AGENTAVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENTS0417100001 pdf
May 09 2018AVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE LIMITEDASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0470220620 pdf
May 09 2018AVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE LIMITEDCORRECTIVE ASSIGNMENT TO CORRECT THE NATURE OF CONVEYANCE AND EFFECTIVE DATE PREVIOUSLY RECORDED ON REEL 047022 FRAME 0620 ASSIGNOR S HEREBY CONFIRMS THE MERGER 0471850643 pdf
Sep 05 2018AVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE LIMITEDCORRECTIVE ASSIGNMENT TO CORRECT THE EFFECTIVE DATE PREVIOUSLY RECORDED ON REEL 047185 FRAME 0643 ASSIGNOR S HEREBY CONFIRMS THE MERGER 0474760845 pdf
Sep 05 2018AVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD AVAGO TECHNOLOGIES INTERNATIONAL SALES PTE LIMITEDCORRECTIVE ASSIGNMENT TO CORRECT THE EFFECTIVE DATE OF MERGER PREVIOUSLY RECORDED AT REEL: 047185 FRAME: 0643 ASSIGNOR S HEREBY CONFIRMS THE CORRECTIVE MERGER 0479590296 pdf
Date Maintenance Fee Events
Feb 25 2000ASPN: Payor Number Assigned.
May 02 2003M1551: Payment of Maintenance Fee, 4th Year, Large Entity.
May 21 2003ASPN: Payor Number Assigned.
May 21 2003REM: Maintenance Fee Reminder Mailed.
May 21 2003RMPN: Payer Number De-assigned.
Apr 26 2007M1552: Payment of Maintenance Fee, 8th Year, Large Entity.
Apr 27 2011M1553: Payment of Maintenance Fee, 12th Year, Large Entity.


Date Maintenance Schedule
Nov 02 20024 years fee payment window open
May 02 20036 months grace period start (w surcharge)
Nov 02 2003patent expiry (for year 4)
Nov 02 20052 years to revive unintentionally abandoned end. (for year 4)
Nov 02 20068 years fee payment window open
May 02 20076 months grace period start (w surcharge)
Nov 02 2007patent expiry (for year 8)
Nov 02 20092 years to revive unintentionally abandoned end. (for year 8)
Nov 02 201012 years fee payment window open
May 02 20116 months grace period start (w surcharge)
Nov 02 2011patent expiry (for year 12)
Nov 02 20132 years to revive unintentionally abandoned end. (for year 12)