A Hamming distance, and/or other code comparison value, is used in a variety of fields including binary code corrections, noisy channel correction, information theory, coding theory, cryptography, telecommunications, etc. A Hamming distance is a number of positions at which two strings of equal position correspond to differing symbols. The Hamming distance corresponds to a minimum number of substitutions required to change one string into the other (e.g., the minimum number of errors that could have transformed one string to another). For example, the Hamming distance between “tomato” and “potato” is two because the first position (e.g., ‘t’ in “tomato” and ‘p’ in “potato”) and third position (e.g., ‘m’ “tomato” and ‘t’ in “potato”) of the two strings are different, while the rest of the positions of the two strings are the same.
The figures are not to scale. In general, the same reference numbers will be used throughout the drawing(s) and accompanying written description to refer to the same or like parts.
Computer processing units (CPUs) or other digital circuits have been used to determine Hamming distance and/or other code comparisons/verifications by creating a sequence of Boolean values (e.g., digital values) indicating mismatches and matches between corresponding positions (e.g., values or parts) in two inputs. Conventional techniques for implementing a code comparator include complicated and/or expensive circuitry. Accordingly, conventional techniques correspond to low efficiency and high power consumed by a CPU digital circuit. Examples disclosed herein include a code comparator circuit with a smaller foot print, faster speed, and lower power consumption than conventional techniques by taking advantage of equal-potential isolation properties of a capacitor.
A capacitor is a passive two-terminal electrical component that stores potential energy in an electric field. In many examples, one terminal (e.g., end) of a capacitor is coupled to ground and the other terminal is coupled to a voltage supply. When there is a voltage differential across the terminals of the capacitor, the capacitor stores a charge corresponding to the voltage differential (e.g., stored charge (Q) is equal to the voltage differential (V=V1−V2) times the capacitance (C) of the capacitor, Q=V*C). In this manner, a capacitor may be used in electronics to store charge from a battery and discharge when the stored charge is needed to power part of a circuit. Equal-potential isolation is a property of a capacitor where, when the voltage at the two terminals of a capacitor are the same, the capacitor does not store charge (e.g., zero voltage differential corresponds to zero charge). Typically, equal-potential isolation is utilized by grounding both terminals of a capacitor (e.g., applying zero Volts to both terminals of the capacitor, Q=C*V=C*0=0). However, examples disclosed herein utilize equal-potential isolation of two voltages, that may or may not be ground, as a comparison for determining a Hamming distance.
Examples disclosed herein control switches to couple a first input to a second input via a capacitor and determine a Hamming distance, and/or other comparison data, based on whether or not the capacitor stored charged when the first input and the second input were coupled. For example, if a first input is a binary string corresponding to ‘110’ and a second input is a binary string corresponding to ‘100,’ examples disclosed herein utilize three capacitors to couple each part/position of the first input to the corresponding part/position of the second input to determine the Hamming distance. In such an example, a first capacitor may be used to couple the first position, ‘1’, of the first input to the first position, ‘1’, of the second input; a second capacitor may be used to couple the second position, ‘1’, of the first input to the second position, ‘0’, of the second input; and a third capacitor may be used to couple the third position, ‘0’, of the first input to the third position, ‘0’, of the second input, where each ‘1’ corresponds to a high voltage (e.g., 5 V) and each ‘0’ corresponds to a low voltage (e.g., 0 V). Accordingly, the first and third capacitors do not store charge because the voltage applied to both terminals of the first and third capacitors are the same when the first input is coupled to the second input via the capacitors. However, because the voltage applied to the terminals of the second capacitor are different, the second capacitor stores some charge (e.g., an amount of charge corresponding to the amount of voltage differential between the terminals). Examples disclosed herein include control switches to discharge all three capacitors and determine a Hamming distance between the two inputs based on the number of capacitors that discharge after the first and second inputs were coupled via the capacitors.
Using examples disclosed herein, a Hamming distance can be determined using minimal components and minimal power. Additionally, examples disclosed herein compare inputs faster than conventional code comparator techniques. Additionally, because any voltage can be applied to a capacitor, examples disclosed herein may be utilized for code comparisons with analog inputs without the need for an analog-to-digital converter, thereby further reducing the cost, speed, complexity, and size needed for code comparison.
The example first input 102 and the example second input 104 of
The example switches 106a-n, 108a-n of
The example capacitors 110a-n of
The example current senses 114a-n of
The example Hamming distance determiner 116 of
Once the example capacitors 110a-n have had sufficient time to charge, the example Hamming distance determiner 116 applies a control signal or multiple control signals to the example switches 106a-n to open and applies a control signal or multiple control signals to the example switches 108a-n to close to ground. In this manner, if any of the example capacitors 110a-n stored charge, the now grounded capacitors 110a-n discharge, causing current to flow to/from the respective example loads 112a-n. As disclosed above, the example current senses 114a-n sense any current and transmit a voltage representative of a discharging capacitor to the example Hamming distance determiner 116. The example Hamming distance determiner 116 determines a Hamming distance based on the output of the example current senses 114a-n. For example, if the example current senses 114a-b each sense a current and outputs a corresponding voltage to the example Hamming distance determiner 116 and the remaining current sensors do not measure current and do not output a voltage to the Hamming distance determiner 116, the example Hamming distance determiner 116 determines the Hamming distance to be ‘2’ (e.g., corresponding to the current discharged from the first and second capacitors 110a-b). In some examples, the Hamming distance determiner 116 may determine additional information from the output of the example current senses 114a-n. For example, the Hamming distance determiner 116 may be able to determine which parts of the first input 102 are larger or smaller than respective parts of the second input 104 based on the direction of the sensed current (e.g., corresponding to a negative voltage output by a current sensor) and/or the amount of different between parts of the first input 102 and respective parts of the second input 104 (e.g., based on the amount of voltage output by a current sensor). The example Hamming distance determiner 116 generates and outputs a Hamming distance report based on the determined Hamming distance and/or other determined data.
The example Rsense 200 of
The example switch driver 300 of
The example current sense interface 302 of
The example summer/counter 304 of
When the example inputs 102, 104 are digital inputs, the summer/counter 304 of
The example input comparator 306 of
The example timer 308 of
The example reporter 310 of
While an example manner of implementing the example Hamming distance determiner 116 of
Flowcharts representative of example hardware logic, machine readable instructions, hardware implemented state machines, and/or any combination thereof for implementing the Hamming distance determiner 116 of
As disclosed above, the example processes of
“Including” and “comprising” (and all forms and tenses thereof) are used herein to be open ended terms. Thus, whenever a claim employs any form of “include” or “comprise” (e.g., comprises, includes, comprising, including, having, etc.) as a preamble or within a claim recitation of any kind, it is to be understood that additional elements, terms, etc. may be present without falling outside the scope of the corresponding claim or recitation. As used herein, when the phrase “at least” is used as the transition term in, for example, a preamble of a claim, it is open-ended in the same manner as the term “comprising” and “including” are open ended. The term “and/or” when used, for example, in a form such as A, B, and/or C refers to any combination or subset of A, B, C such as (1) A alone, (2) B alone, (3) C alone, (4) A with B, (5) A with C, (6) B with C, and (7) A with B and with C.
At block 402, the example switch driver 300 resets the example capacitors 110a-n. The example switch driver 300 may reset the example capacitors 110a-n by sending control signal(s) to the example switches 106a-n and/or 108a-n to close to ground (e.g., grounding the capacitors 110a-n to remove previously stored charge). At block 404, the example timer 308 determines if sufficient time has passed to reset the capacitor(s) 110a-n. For example, the timer 308 may track the amount of time since the capacitor(s) 110a-n were reset and determines that the capacitors 110a-n have been reset based on the setting time of the capacitors 110a-n. If the example timer 308 determines that the capacitor(s) 110a-n have not had enough time to reset (block 404: NO), the process returns to block 404 until the capacitors 110a-n have had enough time to reset.
If the example timer 308 determines that the capacitor(s) 110a-n have had enough time to reset (block 404: YES), the example switch driver 300 couples the first input value(s) (e.g., of the first input 102) to the corresponding second input value(s) (e.g., of the second input 104) via the example capacitors 110a-n (block 406). The example switch driver 300 may couple the first input values to the second input values by sending control signal(s) to the example switches 106a-n and 108a-n to close the switches 106a-n to the first input 102 and close the switches 108a-n to the second input 104. Accordingly, the parts of the first input 102 are coupled to one end/terminal of the example capacitors 110a-n and the parts of the second input 104 are coupled to the other end/terminal of the example capacitors 110a-n. In this manner, if there is a difference between parts of the first input 102 and respective parts of the second input 104, the corresponding capacitors 110a-n store charge based on the difference.
At block 408, the example timer 308 determines the settling time has passed to sufficiently store charge in the capacitor(s) 110a-n. For example, the timer 308 may track the amount of time since the first input 102 and the second input 104 have been coupled via the capacitor(s) 110a-n based on the setting time of the capacitors 110a-n. If the example timer 308 determines that the settling time has not been passed (block 408: NO), the process returns to block 408 until the settling time passes. If the example timer 308 determines that the capacitor(s) 110a-n have had enough time to reset (block 408: YES), the example switch driver 300 grounds the example capacitors 110a-n (block 410). The example switch driver 300 may ground the example capacitors 110a-n by opening the example switches 106a-n and closing the example switches 108a-n to ground. As disclosed above, grounding the capacitors 110a-n allows the capacitors 110a-n to discharge if the capacitors 110a-n have stored charged (e.g., at block 406). For each capacitor of the capacitors 110a-n (block 412-block 414), the example current summer/counter 304 determines if the capacitor has discharged (block 418). The example summer/counter 304 determines if the capacitor (e.g., one of the example capacitors 110a-n or multiple of the example capacitors 110a-n) discharges if the corresponding current sensor outputs a voltage above a threshold amount of voltage. The voltage output by the corresponding current sensor is received by the example current sense interface 302.
If the example summer/counter 304 determines that the corresponding capacitor has not discharged (block 414: NO), the example summer/counter 304 does not increment a count (e.g., corresponding to the Hamming distance) and the process continues for the remaining capacitor. If the example summer/counter 304 determines that the corresponding capacitor has discharged (block 414: YES), the example summer/counter 304 increments the count (e.g., corresponding to Hamming distance) (block 416). Once the example Hamming distance determiner 116 determines if each capacitor of the capacitors 110a-n has been discharged, the example summer/counter 304 determines the Hamming distance based on the count (block 420). In some examples, the input comparator 306 may process the voltages received from the example current senses 114a-n (e.g., via the example current sense interface 302) to determine more detailed information corresponding to the Hamming distance (e.g., which inputs are greater/smaller, the amount of difference between inputs, etc.). At block 422, the example reporter 310 generates and outputs a Hamming distance report based on the determined Hamming distance. In some examples, the reporter 310 may include the additional information determined by the example input comparator 306 in the Hamming distance report. As disclosed above in conjunction with
At block 502, the example switch driver 300 resets the example capacitors 110a-n. The example switch driver 300 may reset the example capacitors 110a-n by sending control signal(s) to the example switches 106a-n and/or 108a-n to close to ground (e.g., grounding the capacitors 110a-n to remove previously stored charge). At block 504, the example timer 308 determines if sufficient time has passed to reset the capacitor(s) 110a-n. For example, the timer 308 may track the amount of time since the capacitor(s) 110a-n were reset and determines that the capacitors 110a-n have been reset based on the setting time of the capacitors 110a-n. If the example timer 308 determines that the capacitor(s) 110a-n have not had enough time to reset (block 504: NO), the process returns to block 504 until the capacitors 110a-n have had enough time to reset.
If the example timer 308 determines that the capacitor(s) 110a-n have had enough time to reset (block 504: YES), the example switch driver 300 couples the first input value(s) (e.g., of the first input 102) to the corresponding second input value(s) (e.g., of the second input 104) via the example capacitors 110a-n (block 506). The example switch driver 300 may couple the first input values to the second input values by sending control signal(s) to the example switches 106a-n and 108a-n to close the switches 106a-n to the first input 102 and close the switches 108a-n to the second input 104. Accordingly, the parts of the first input 102 are coupled to one end/terminal of the example capacitors 110a-n and the parts of the second input 104 are coupled to the other end/terminal of the example capacitors 110a-n. In this manner, if there is a difference between parts of the first input 102 and respective parts of the second input 104, the corresponding capacitors 110a-n store charge based on the difference.
At block 508, the example timer 308 determines the settling time has passed to sufficiently store charge in the capacitor(s) 110a-n. For example, the timer 308 may track the amount of time since the first input 102 and the second input 104 have been coupled via the capacitor(s) 110a-n based on the setting time of the capacitors 110a-n. If the example timer 308 determines that the settling time has not been passed (block 508: NO), the process returns to block 508 until the settling time passes. If the example timer 308 determines that the capacitor(s) 110a-n have had enough time to reset (block 508: YES), the example switch driver 300 grounds the example capacitors 110a-n (block 510). The example switch driver 300 may ground the example capacitors 110a-n by opening the example switches 106a-n and closing the example switches 108a-n to ground. As disclosed above, grounding the capacitors 110a-n allows the capacitors 110a-n to discharge if the capacitors 110a-n have stored charged (e.g., at block 506).
At block 512, the example current sense interface 302 receives the outputs of the current sense(s) 114a-n (e.g., voltages representative of discharging current). At block 514, the example summer/counter 304 sums the received current sense outputs. In some examples, the summer/counter 304 takes the absolute value of the current sense outputs before summing. In some examples, the summer/counter 304 converts the received current sense outputs into a digital value corresponding to a sum of the currents. As described above, because the comparison corresponds to a digital comparison, if the respective parts of the inputs 102, 104 are the same a preset current will be discharged from each capacitor 110a-n storing charge. Accordingly, the sum of the received current sense outputs corresponds to the Hamming distance.
At block 516, the example summer/counter 304 determines the Hamming distance based on the sum of the outputs of the current senses 114a-n. For example, if the sum of the current senses 114a-n (e.g., a digital value representative of the sum of the current senses 114a-n) is 30V and the voltage corresponding to a difference between two respective parts of the inputs 102, 104 is 3 V, the summer/counter 304 determines the Hamming distance to be 10 based on the digital representations of the sum and the voltage differential of two different respective parts (e.g., 30 V/3 V=10). In some examples, the input comparator 306 may process the voltages received from the example current senses 114a-n (e.g., via the example current sense interface 302) to determine more detailed information corresponding to the Hamming distance (e.g., which inputs are greater/smaller, the amount of difference between inputs, etc.). At block 518, the example reporter 310 generates and outputs a Hamming distance report based on the determined Hamming distance. In some examples, the reporter 310 may include the additional information determined by the example input comparator 306 in the Hamming distance report. As disclosed above in conjunction with
The processor platform 600 of the illustrated example includes a processor 612. The processor 612 of the illustrated example is hardware. For example, the processor 612 can be implemented by one or more integrated circuits, logic circuits, microprocessors, GPUs, DSPs, or controllers from any desired family or manufacturer. The hardware processor may be a semiconductor based (e.g., silicon based) device. In this example, the processor implements the example switch driver 300, the example current sense interface 302, the example summer/counter 304, the example input comparator 306, the example timer 308 and/or the example reporter 310.
The processor 612 of the illustrated example includes a local memory 613 (e.g., a cache). The processor 612 of the illustrated example is in communication with a main memory including a volatile memory 614 and a non-volatile memory 616 via a bus 618. The volatile memory 614 may be implemented by Synchronous Dynamic Random Access Memory (SDRAM), Dynamic Random Access Memory (DRAM), RAMBUS® Dynamic Random Access Memory (RDRAM®) and/or any other type of random access memory device. The non-volatile memory 616 may be implemented by flash memory and/or any other desired type of memory device. Access to the main memory 614, 616 is controlled by a memory controller.
The processor platform 600 of the illustrated example also includes an interface circuit 620. The interface circuit 620 may be implemented by any type of interface standard, such as an Ethernet interface, a universal serial bus (USB), a Bluetooth® interface, a near field communication (NFC) interface, and/or a PCI express interface.
In the illustrated example, an input device 622 or multiple input devices 622 are connected to the interface circuit 620. The input device(s) 622 permit(s) a user to enter data and/or commands into the processor 612. The input device(s) can be implemented by, for example, an audio sensor, a microphone, a camera (still or video), a keyboard, a button, a mouse, a touchscreen, a track-pad, a trackball, isopoint and/or a voice recognition system.
An output devices 624 or multiple output devices 624 are also connected to the interface circuit 620 of the illustrated example. The output devices 624 can be implemented, for example, by display devices (e.g., a light emitting diode (LED), an organic light emitting diode (OLED), a liquid crystal display (LCD), a cathode ray tube display (CRT), an in-place switching (IPS) display, a touchscreen, etc.), a tactile output device, a printer and/or speaker. The interface circuit 620 of the illustrated example, thus, typically includes a graphics driver card, a graphics driver chip and/or a graphics driver processor.
The interface circuit 620 of the illustrated example also includes a communication device such as a transmitter, a receiver, a transceiver, a modem, a residential gateway, a wireless access point, and/or a network interface to facilitate exchange of data with external machines (e.g., computing devices of any kind) via a network 626. The communication can be via, for example, an Ethernet connection, a digital subscriber line (DSL) connection, a telephone line connection, a coaxial cable system, a satellite system, a line-of-site wireless system, a cellular telephone system, etc.
The processor platform 600 of the illustrated example also includes a mass storage devices 628 or multiple mass storage devices 628 for storing software and/or data. Examples of such mass storage devices 628 include floppy disk drives, hard drive disks, compact disk drives, Blu-ray disk drives, redundant array of independent disks (RAID) systems, and digital versatile disk (DVD) drives.
The machine executable instructions 632 of
From the foregoing, it will be appreciated that example methods, apparatus and articles of manufacture have been disclosed that facilitate capacitive code comparing. Using examples disclosed herein, a Hamming distance can be determined using minimal components and minimal power. Additionally, examples disclosed herein are faster than conventional code comparator techniques. Additionally, because any voltage can be applied to a capacitor, examples disclosed herein may be utilized for code comparisons for analog inputs without the need for an analog-to-digital converter, thereby further reducing the cost, speed, complexity, and size needed for code comparison.
An apparatus for capacitive code comparing is disclosed. In some examples, the apparatus includes a comparator to receive a first portion of a first input and a second portion of a second input, the comparator including a capacitor; a peripheral determination circuit to cause the capacitor to couple the first portion to the second portion; in response to coupling the first portion to the second portion, ground the capacitor; sense a current discharged by the grounded capacitor; and determine a Hamming distance of the first input and the second input based on the sensed current discharged by the capacitor.
In some examples, the apparatus further includes first and second switches, the peripheral determination circuit to couple the first portion to the second portion and to ground the capacitor by controlling the first and second switches.
In some examples, the peripheral determination circuit is to cause the capacitor to couple the first portion to the second portion by applying a control signal to couple the first portion to a first terminal of the capacitor and couple the second portion to a second terminal of the capacitor.
In some examples, the peripheral determination circuit includes a processor; and a trans-impedance amplifier to sense the current discharged by the grounded capacitor.
In some examples, the processor is to increment a count if the trans-impedance amplifier senses the current, the count corresponding to the Hamming distance.
In some examples, the capacitor is a first capacitor, wherein the comparator to receive a third portion of the first input and a fourth portion of the second input, the comparator including a second capacitor; and the processor to cause the second capacitor to couple the third portion to the fourth portion; and in response to coupling the third portion to the fourth portion, ground the second capacitor.
In some examples, the trans-impedance amplifier is a first trans-impedance amplifier and the current is a first current, further including a second trans-impedance amplifier to sense whether a second current has been discharged by the second grounded capacitor, the processor to determine the Hamming distance of the first input and the second input based on whether the second trans-impedance amplifier senses the second current.
In some examples, the processor is to sum the first current and the second current, the sum corresponding to the Hamming distance.
In some examples, the peripheral determination circuit is to determine whether the first portion is larger or smaller than the second portion based on an output of the trans-impedance amplifier.
In some examples, the peripheral determination circuit is to determine a distance between the first portion and the second portion based on an output of the trans-impedance amplifier.
In some examples, when the first portion is the same as the second portion, no current is discharged by the grounded capacitor and, when the first portion is different than the second portion, a current is discharged by the grounded capacitor.
An example tangible computer readable storage medium is disclosed comprising instructions which, when executed, cause a processor to at least: cause a capacitor to couple a first portion of a first input to a second portion of a second input; and in response to coupling the first portion to the second portion, transmit a control signal to ground the capacitor; and in response to transmitting the control signal, determine a Hamming distance of the first input and the second input based on an amount of current discharged by the capacitor.
In some examples, the amount of current being discharged by the capacitor is determined by an amplifier and converted into a voltage, the instructions to cause the processor to determine the Hamming distance based on the voltage.
In some examples, the instructions cause the processor to cause the capacitor to couple the first portion to the second portion by applying a second control signal to a switch, the second control signal causing the first portion to couple to a first terminal of the capacitor and the second portion to couple to a second terminal of the capacitor.
In some examples, the instructions cause the processor to ground the capacitor by transmitting the control signal to cause a switch to close to a grounded node.
In some examples, the instructions cause the processor to increment a count if the discharged current is above a threshold.
In some examples, the instructions cause the processor to: cause a second capacitor to couple a third portion of the first input to a fourth portion of the second input; in response to coupling the third portion to the fourth portion, transmit the control signal to ground the second capacitor; and, in response to transmitting the control signal, determine the Hamming distance of the first and the second input based on a second amount of current discharged by the second capacitor.
In some examples, the instructions cause the processor to determine whether the first portion is larger or smaller than the second portion based on the amount of current.
In some examples, the instructions cause the processor to determine a distance between the first portion and the second portion based on the amount of current.
In some examples, when the first portion is the same as the second portion, no current is discharged by the grounded capacitor and, when the first portion is different than the second portion, a current is discharged by the grounded capacitor.
An example method for capacitive code comparing is disclosed. The example method includes coupling a first portion of a first input to a first terminal of a capacitor and coupling a second portion of a second input to a second terminal of the capacitor; in response to coupling the first portion to the second portion via the capacitor, grounding the capacitor; and in response to grounding the capacitor, determining, by executing an instruction using a processor, a Hamming distance of the first input and the second input based on an amount of current discharged by the grounded capacitor.
In some examples, the determining of the Hamming distance is based on a voltage corresponding to the amount of current discharged by the capacitor.
Although certain example methods, apparatus and articles of manufacture have been disclosed herein, the scope of coverage of this patent is not limited thereto. On the contrary, this patent covers all methods, apparatus and articles of manufacture fairly falling within the scope of the claims of this patent.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US2018/039336 | 6/25/2018 | WO | 00 |