WO2024040892A1 - Apparatus for converting binary code into thermometer code, and electronic device - Google Patents

Apparatus for converting binary code into thermometer code, and electronic device Download PDF

Info

Publication number
WO2024040892A1
WO2024040892A1 PCT/CN2023/077541 CN2023077541W WO2024040892A1 WO 2024040892 A1 WO2024040892 A1 WO 2024040892A1 CN 2023077541 W CN2023077541 W CN 2023077541W WO 2024040892 A1 WO2024040892 A1 WO 2024040892A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
circuit
order
bit
low
Prior art date
Application number
PCT/CN2023/077541
Other languages
French (fr)
Chinese (zh)
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 深圳市汇顶科技股份有限公司
Publication of WO2024040892A1 publication Critical patent/WO2024040892A1/en

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • H03M7/14Conversion to or from non-weighted codes
    • H03M7/16Conversion to or from unit-distance codes, e.g. Gray code, reflected binary code
    • H03M7/165Conversion to or from thermometric code

Definitions

  • the present application relates to the field of electronic technology, and more specifically, to a device and electronic equipment for converting a binary code into a thermometer code.
  • Binary code is the most commonly used digital code in digital circuits. It uses 2 as the base for counting and is commonly represented by symbols 0 and 1. Each symbol occupies 1 bit. In digital circuits, the implementation of logic gates directly uses binary, so modern computers and computer-dependent devices all use binary.
  • Thermometer Code is a digital code with consistent weights for each bit. It is also composed of symbols 0 and 1, but the number of symbols 1 in the thermometer code corresponds to a decimal value, so it has good linearity and monotonicity. sex.
  • thermometer code Since the thermometer code is long in length, consumes a lot of power and requires a large amount of memory, the thermometer code is inconvenient to calculate. Therefore, in some implementations, binary codes are used for calculation and then converted into Thermometer code is used. In this process, the conversion of binary code to thermometer code is very important.
  • This application provides a device and electronic equipment for converting a binary code into a thermometer code, which has better performance.
  • a device for converting a binary code into a thermometer code including: a decoding module for converting the upper n/2-bit high-order binary code of the n-bit binary code into a 2 n/2 -bit high-order binary code, and converting The low n/2 bits of the low binary code in the n-bit binary code are converted into 2 n/2 bits of low bit code.
  • the number of target symbols in the high bit code is related to the value of the high bit binary code.
  • the number of target symbols in the low bit code is Quantity and The value of the low-order binary code is related, the target symbol is 0 or 1, and n is a positive even number;
  • the combinational logic module includes multiple logical sub-modules, the delays of the multiple logical sub-modules are the same, and the multiple logical sub-modules are used to
  • the code elements in the high-bit code are combined with the code elements in the low-bit code to obtain the thermometer code corresponding to the n-bit binary code.
  • a device for converting a binary code to a thermometer code including a decoding module and a combinational logic module.
  • the decoding module not only can the n-bit binary code be split into two parts, respectively Processing is carried out in order to improve the processing efficiency of the high-bit code and low-bit code corresponding to the binary code by the subsequent combinational logic module.
  • the value of the high-bit code and the low-bit code can also be reflected in the high-bit code and the low-bit code respectively through the number of target code elements. code value, thus facilitating the logical design of subsequent combinational logic modules.
  • the combinational logic module which is formed by multiple logic sub-modules with the same delay, the overall complexity of the combinational logic module can be reduced, and it has good adaptability and accuracy for the conversion of high-digit binary codes to thermometer codes. It is scalable and can ensure the synchronous output of each code element in the thermometer code, which will not cause logical errors in subsequent circuits, and comprehensively guarantees the performance of the device for converting binary codes to thermometer codes.
  • the number of target code elements in the above-mentioned high-bit code is related to the value of the high-bit binary code, including: the 0th to u-th bits in the high-bit code are the target code elements, and the high-bit code except the 0th bit Bits other than the u-th bit are non-target code elements, where u is the value of the high-order binary code, 0 ⁇ u ⁇ 2 n/2 -1; the number of target code elements in the above-mentioned low-order code and the value of the low-order binary code Related include: the 0th to vth bits in the low-order code are target code elements, and the other bits in the low-order code except the 0th to v-th bits are non-target code elements, where v is the value of the low-order binary code , 0 ⁇ v ⁇ 2 n/2 -1; when the target symbol is 1, the non-target symbol is 0, or, when the target symbol is 0, the non-target symbol is 1.
  • the decoding module includes multiple identical decoding sub-modules, and the multiple identical decoding sub-modules are used to convert high-bit binary codes and low-bit binary codes to obtain high-bit codes and low-bit codes.
  • the decoding module includes two identical decoding sub-modules.
  • the first decoding sub-module of the two identical decoding sub-modules is used to convert the high-order binary code to obtain the high-order code.
  • the second decoding sub-module among the same decoding sub-modules is used to convert the low-order binary code to obtain the low-order code.
  • the multiple logical sub-modules include: 2 n -1 first logical sub-modules and a second logical sub-module, and a second logical sub-module is used to convert the 0th bit in the thermometer code
  • the code element output is the preset code element
  • the 2 n -1 first logic sub-modules are the same, and are used to combine the code elements in the high-order code and the code elements in the low-order code to output the first code element in the thermometer code to The 2 n -1 bit code element.
  • the 2 n -1 first logical sub-modules include 2 n/2 groups of first logical sub-modules, wherein each first logical sub-module in the i-th group of first logical sub-modules is Multiple intermediate results are obtained based on the i-th code element in the high-bit code and multi-bit code elements in the low-bit code, and multiple intermediate results in the thermometer code are obtained based on the multiple intermediate results and the i+1-th code element in the high-bit code.
  • Bit symbol where 0 ⁇ i ⁇ 2 n/2 -1, i is an integer.
  • the target symbol is 1, the non-target symbol is 0, and the j-th first logical sub-module is used to combine the i-th symbol in the high-order code with the j-th code in the low-order code.
  • the element executes AND logic to obtain the jth intermediate result, and performs OR logic between the jth intermediate result and the i+1th bit symbol in the high-order code to obtain the (i*2 n/2 +j)th bit in the thermometer code. code element.
  • the target symbol is 0, the non-target symbol is 1, and the j-th first logical sub-module is used to combine the i-th symbol in the high-order code with the j-th code in the low-order code.
  • the element performs OR logic to obtain the jth intermediate result, and performs NAND logic on the jth intermediate result and the i+1th bit symbol in the high-order code to obtain the (i*2 n/2 +j)th (i*2 n/2 +j) in the thermometer code. bit code element.
  • the decoding module and/or the combinational logic module is a logic circuit including logic gates.
  • the decoding module includes a decoder circuit, and the number of logic gates between any input terminal in the decoder circuit and any output terminal connected to the input terminal is the same.
  • the decoding module includes two decoder circuits with the same structure.
  • the decoder circuit includes two circuit input terminals and four circuit output terminals.
  • the two circuits The input terminal is used to input a 2-bit high-order binary code or a low-order binary code, and the four circuit output terminals are used to output a 4-digit high-order binary code or low-order code; among the four circuit output terminals, the first circuit output terminal is connected to the buffer gate, with The zeroth preset symbol in the output high-order code or low-order code; the input terminal of the two circuits
  • the first circuit input terminal and the second circuit input terminal are connected to the input terminal of the NOR gate, the output terminal of the NOR gate is connected to the input terminal of the first NOT gate, and the output terminal of the first NOT gate is connected to the four circuit output terminals.
  • the second circuit output terminal is used to output the first symbol of the high-order code or the low-order code;
  • the second circuit input terminal of the two circuit input terminals is connected to the input terminal of the second NOT gate, and the second circuit input terminal of the second NOT gate
  • the output terminal is connected to the input terminal of the third NOT gate, and the output terminal of the third NOT gate is connected to the third circuit output terminal among the four circuit output terminals for outputting the second code element of the high-order code or the low-order code;
  • two The first circuit input terminal and the second circuit input terminal among the circuit input terminals are connected to the input terminal of the NAND gate, the output terminal of the NAND gate is connected to the input terminal of the fourth NOT gate, and the output terminal of the fourth NOT gate is connected to The fourth circuit output terminal among the four circuit output terminals is used to output the third code element of the high-order code or the low-order code.
  • the combinational logic module includes: a combinational logic circuit, the combinational logic circuit includes 2 n -1 first logic subcircuits and a second logic subcircuit, and a second logic subcircuit is used to combine the thermometer
  • the 0th code element in the code is output as a preset code element.
  • the circuits of the 2 n -1 first logic sub-circuits are the same and are used to combine the code elements in the high-bit code and the code elements in the low-bit code to output the thermometer.
  • the 1st code element to the 2n -1th code element in the code is
  • the delay of any one of the 2 n -1 first logic sub-circuits is the same as the delay of a second logic sub-circuit.
  • the first logic sub-circuit includes three circuit input terminals and one circuit output terminal, and the first circuit input terminal and the second circuit input terminal among the three circuit input terminals are used to input high-order binary codes. 2 symbols, the third circuit input terminal among the three circuit input terminals is used to input 1 symbol in the low-order binary code, and the circuit output terminal is used to output 1 symbol in the thermometer code; in the target symbol When it is 1, the first circuit input terminal and the third circuit input terminal are connected to the input terminal of the AND gate, the output terminal of the AND gate and the second circuit input terminal are connected to the input terminal of the OR gate, and the output terminal of the OR gate is connected to at the output end of the circuit, or, when the target symbol is 0, the first circuit input end and the third circuit input end are connected to the input end of the OR gate, and the output end of the OR gate and the second circuit input end are connected to the AND The input terminal of the NOT gate and the output terminal of the NAND gate are connected to the output terminal of the circuit.
  • the decoding module and/or the combinational logic module are functional modules in a digital chip.
  • thermometer code is used to input the control module, so that the control module implements the control function according to the thermometer code.
  • an electronic device including: a control module, and the device in the first aspect or any possible implementation manner in the first aspect, the device is used to convert a 2 n- bit binary code into a According to the thermometer code, the control module is used to receive the thermometer code and implement the control function according to the thermometer code.
  • the electronic device includes an LC oscillation circuit
  • the LC oscillation circuit includes 2 n capacitors with the same capacitance value
  • the control module includes a switch array composed of 2 n switches, and each switch in the switch array is connected Based on a capacitor, the switch array is used to receive the thermometer code and control the number of working capacitors in the LC oscillation circuit according to the thermometer code.
  • Figure 1 is a schematic diagram of a binary code to thermometer code conversion circuit provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of another binary code to thermometer code conversion circuit provided by an embodiment of the present application.
  • Figure 3 is a schematic structural block diagram of a device for converting a binary code into a thermometer code provided by an embodiment of the present application.
  • Figure 4 is a schematic structural block diagram of a decoding module provided by an embodiment of the present application.
  • FIG. 5 is a schematic logic circuit diagram of a 2-line to 4-line decoder circuit provided by an embodiment of the present application.
  • Figure 6 is a schematic structural block diagram of a combinational logic module provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural block diagram of another combinational logic module provided by an embodiment of the present application.
  • Figure 8 is a schematic structural block diagram of the i-th group of first logical sub-modules provided by the embodiment of the present application.
  • Figure 9 is a schematic structural block diagram of another combinational logic module provided by an embodiment of the present application.
  • Figure 10 is a schematic logic circuit diagram of a first logic sub-module provided by an embodiment of the present application.
  • Figure 11 is a schematic logic circuit diagram of another first logic sub-module provided by an embodiment of the present application.
  • Figure 12 is a schematic structural block diagram of another device for converting a binary code into a thermometer code provided by an embodiment of the present application.
  • FIG. 1 shows a schematic diagram of a binary code to thermometer code conversion circuit 100 provided by an embodiment of the present application.
  • the binary code to thermometer code conversion circuit includes three input terminals and seven output terminals.
  • the three input terminals are used to receive the three code elements B 0 to B 2 of the binary code respectively.
  • the seven output terminals The terminal is used to output the seven code elements T 1 to T 7 of the thermometer code respectively.
  • the circuit shown in Figure 1 can also be called a 3-line to 7-line binary code to thermometer code circuit.
  • Table 1 shows the truth table of decimal, binary code and thermometer code.
  • the outputs from B 0 to B 2 to T 3 and T 5 need to pass through four-level logic gates, while the outputs from B 0 to B 2 only need to go through two-level logic gates. Therefore, the The output of T3 and T5 has a large delay, which not only limits the conversion rate of the thermometer code, but the difference in delay between T3 and T5 and other signals will also cause logic errors in subsequent circuits.
  • the logic gate circuit is relatively complex and there are many wire crossings, which results in higher power consumption, more complex layout design and higher process cost of the circuit. As the number of binary code bits increases, the above problems such as delay, power consumption, and cost will become more serious.
  • the present application provides a new binary code to thermometer code conversion device, which has better performance than the above-mentioned binary code to thermometer code conversion circuits 100 and 200 .
  • FIG. 3 shows a schematic structural block diagram of a device 300 for converting a binary code into a thermometer code provided by an embodiment of the present application.
  • the device 300 for converting binary codes to thermometer codes includes: a decoding module 310 and a combinational logic module 320 .
  • the decoding module 310 is used to convert the upper n/2-bit high-order binary code of the n-bit binary code into a 2 n/2- bit high-order binary code, and convert the low-order n/2 bits of the n-bit binary code into the low-order binary code.
  • the code is converted into a low-bit code of 2 n/2 bits.
  • the number of target code elements in the high-bit code is related to the value of the high-bit binary code.
  • the number of target code elements in the low-bit code is related to the value of the low-bit binary code.
  • n is a positive even number. .
  • the combinational logic module 320 includes multiple logical sub-modules, and the multiple logical sub-modules have the same delay. And the plurality of logic sub-modules are used to combine the code elements in the above-mentioned high-order code and the code elements in the low-order code to obtain the thermometer code corresponding to the n-bit binary code.
  • a device 300 for converting a binary code into a thermometer code including a decoding module 310 and a combinational logic module 320 is provided.
  • the decoding module 310 not only the n-bit binary code can be split It is divided into two parts and processed separately, so as to improve the processing efficiency of the high-bit code and low-bit code corresponding to the binary code by the subsequent combination logic module 320.
  • the high-bit code can also be reflected in the high-bit code and the low-bit code by the number of target symbols. and the value of the low-order binary code, thus facilitating the subsequent logic design of the combinational logic module 320.
  • the combinational logic module 320 which is formed by multiple logic sub-modules with the same delay, the overall complexity of the combinational logic module can be reduced, and it has good adaptability for the conversion of high-digit binary codes to thermometer codes. and scalability, and can ensure the synchronous output of each symbol in the thermometer code, without causing logical errors in subsequent circuits, and comprehensively guarantee the performance of the device 300 for converting binary codes to thermometer codes.
  • the decoding module 310 and/or the combinational logic module 320 may be a logic circuit including logic gates.
  • the decoding module 310 may be a decoder logic circuit including at least one logic gate
  • the combinational logic module 320 may be a combinational logic circuit including at least one logic gate.
  • the logic gates include but are not limited to: AND gate, OR gate, NOT gate, NAND gate, NOR gate, XOR gate or XOR gate, etc.
  • the decoding module 310 and/or the combinational logic module 320 can also be a functional module in a digital chip.
  • the functional module can include a software module and a hardware module in the digital chip, and the two cooperate with each other to achieve Implement the logical functions of the decoding module 310 and/or the combinational logic module 320.
  • the hardware module can be an integrated circuit in a digital chip, and the software module can be a program code, which can be stored in the digital chip, or can be stored outside the digital chip.
  • the digital chip includes Field Programmable Gate Array (FPGA) chip, Complex Programmable Logic Device (CPLD) chip, etc.
  • the logic program code in the digital chip can be written through the verilog hardware description language (Hardware Description Language, HDL) to write.
  • HDL Verilog hardware description language
  • this application mainly uses the decoding module 310 and the combinational logic module 320 as logic circuits for detailed description.
  • the logic program code can be used to cooperate with the integrated circuit.
  • this application does not limit the specific implementation method of the logic program code.
  • the decoding module 310 it can be used to receive n-bit binary codes, where n is a positive even number, The highest bit of the even-digit binary code may be "0".
  • a processing module eg, a digital chip
  • the processing module may provide an n-bit binary code to the decoding module 310.
  • the processing module may generate an n-bit binary code at the end of the actual binary code.
  • the highest bit is filled with "0" to form an even-numbered binary code. For example, if the actual binary code is 111, the processing module can add "0" before "111" to form an even-numbered binary code "0111". The process of filling the highest bit with "0” will not affect the actual value of the binary code, and is also beneficial to the processing of the binary code in the decoding module 310.
  • the decoding module 310 is used to decode the high-order n/2 bits of the n-bit binary code into a 2 n/2- bit high-order binary code, and convert the n-bit binary code to the low n/2 bits.
  • the 2-bit low-order binary code is decoded to form a 2 n/2- bit low-order code.
  • the number of target code elements in the high-bit code can reflect the value of the high-bit binary code
  • the number of target code elements in the low-bit code can reflect the value of the low-bit binary code.
  • the target code element can be 1 or 0.
  • the n-bit binary code be split into two parts for processing respectively, so as to improve the conversion efficiency of the binary code by subsequent modules, but also the target symbol can be passed through the high-bit code and low-bit code.
  • the quantities respectively reflect the value of the high-order binary code and the value of the low-order binary code, which is beneficial to the logic design of the subsequent module and facilitates the subsequent module to convert the binary code into a thermometer code based on the code elements of the high-order code and low-order code.
  • the combinational logic module 320 includes multiple logic sub-modules with the same delay.
  • the thermometer code corresponding to the n-bit binary code can be obtained by combining the symbols in the high-order code and the symbols in the low-order code decoded by the above-mentioned decoding module 310 through the multiple logical sub-modules.
  • the delay may be the time required for a signal to be transmitted from the input end of the logic sub-module to the output end.
  • the combinational logic module 320 may include multiple logic sub-modules.
  • the structure of each logic sub-module is easy to implement simply and clearly, and has good adaptability and scalability for converting high-digit binary codes to thermometer codes.
  • the multiple logic sub-modules have the same delay, thereby ensuring the synchronous output of each symbol in the thermometer code, without causing logical errors in subsequent circuits, and ensuring the performance of the device 300 for converting binary codes to thermometer codes.
  • Figure 4 shows a schematic structural block diagram of a decoding module 310 provided by an embodiment of the present application.
  • the decoding module 310 includes two identical first decoding sub-modules 311 and second decoding sub-modules 312, where the first decoding sub-module 311 is used to convert the n-bit binary code into high n
  • the /2-bit high-order binary code is converted into a 2 n/2- bit high-order code.
  • the second decoding submodule 312 is used to convert the low-order n/2-bit low-order binary code of the n-bit binary code into a 2 n/2 -bit high-order binary code. Low code.
  • the lower n/2 bits in the n-bit binary code are represented as B 0 to B n/2-1 respectively, and the B 0 to B n/2-1 form an n/2-bit Low binary code.
  • the n/2-bit low-order binary code is converted by the second decoding sub-module 312 to form a low-order code Low ⁇ 2 n/2 -1:0>.
  • the low-order code Low ⁇ 2 n/2 -1:0> includes 2 n/2 bits, the lowest bit can be expressed as Low 0 and the highest bit can be expressed as Low 2 n/2 -1 .
  • the low code Low ⁇ 2 n/2 -1:0> from the 0th bit Low 0 to the vth bit Low v are the target code elements, and the low code Low ⁇ 2 n/2 -1:0>
  • the other bits except the 0th bit Low 0 to the vth bit Low v are non-target code elements, where v can be the value of the low-order binary code, 0 ⁇ v ⁇ 2 n/2 -1 .
  • the target symbol is "1" and the non-target symbol is "0"
  • the value of the low-order binary code is 1, and the second decoding sub-module 312
  • the low-order code Low ⁇ 3:0> obtained after converting the low-order binary code 01 can be 0011.
  • the 0th to 1st bits of the low-order code 0011 are the target code element "1”
  • the 2nd and 3rd bits are the non-target code element "0”.
  • the target code element "1" in the low-order code 0011 is It can reflect the value of low-order binary code 01.
  • the target symbol is "0" and the non-target symbol is "1"
  • the value of the low-order binary code is 3, and the second decoding sub-module 312 will
  • the low code Low ⁇ 3:0> obtained after code 11 is converted can be 0000.
  • the 0th to 3rd bits of the low-order code 0000 are all target code elements "0”
  • the target code element "0" in the low-order code 0000 can reflect the value of the low-order binary code 11.
  • the upper n/2 bits in the n-bit binary code are represented as B n/2 to B n-1 respectively, and the B n/2 to B n-1 form the upper binary code.
  • the n/2-bit high-order binary code is converted by the first decoding sub-module 311 to form a high-order code High ⁇ 2 n/2 -1:0>.
  • the high-order code High ⁇ 2 n/2 -1:0> includes 2 n/2 bits, the lowest bit can be expressed as High 0 , and the highest bit can be expressed as High 2 n/2 -1 .
  • the high-bit code High ⁇ 2 n/2 -1:0> from the 0th bit High 0 to the u-th bit High u are the target code elements, and the high-bit code High ⁇ 2 n/2
  • the other bits in -1:0> except the 0th bit High 0 to the u-th bit High u are non-target code elements, where u can be the value of the high-order binary code, 0 ⁇ u ⁇ 2 n/2 -1.
  • the target symbol is "1" and the non-target symbol is "0"
  • the high-order binary code is 10
  • the value of the high-order binary code is 2
  • the first decoding sub-module 311 The high-bit code High ⁇ 3:0> obtained after converting the high-bit binary code 10 can be 0111.
  • the high-digit code 0111 is Bits 0 to 2 are all target code elements "1"
  • bit 3 is the non-target code element "0”.
  • the target code element "1" in the high-order code 0111 can reflect the value of the high-order binary code 10.
  • the target symbol is "0" and the non-target symbol is "1"
  • the high-order binary code is 10
  • the value of the high-order binary code is 2, and the first decoding sub-module 311
  • the high bit code High ⁇ 3:0> obtained after code 10 is converted can be 1000.
  • the 0th to 2nd bits of the high-bit code 1000 are all target code elements "0”
  • the 3rd bit is the non-target code element "1”.
  • the target code element "0" in the high-bit code 1000 can reflect the high-bit code The value of binary code 10.
  • the decoding module 310 uses two identical decoding sub-modules (the first decoding sub-module 311 and the second decoding sub-module 312) to respectively decode the upper n/2 bits of the n-bit binary code.
  • the high-bit binary code and the low n/2-bit low-bit binary code are converted into 2 n/2- bit high-bit code and low-bit code.
  • the logical structure of each decoding sub-module can be relatively simple, which can reduce the overall cost of the decoding module 310.
  • the design complexity is high, and the same decoding sub-module has the same delay, so as to ensure that the high-order code and the low-order code can be output synchronously to ensure the normal operation of subsequent modules.
  • the target symbols are continuously arranged in the low-order bits.
  • the number of the low-order target symbols can respectively represent the values of the high-order binary code and the low-order binary code, so that This further facilitates the subsequent logical design of the combinational logic module 320 and ensures the generation of thermometer codes.
  • the high-order binary code or the low-order binary code input by the decoding sub-module may be 2 bits, and The high-order code or low-order code output by the decoding sub-module is 4 bits.
  • the decoding sub-module may be a 2-line to 4-line decoder circuit.
  • FIG. 5 shows a schematic logic circuit diagram of a 2-line to 4-line decoder circuit 400 provided by an embodiment of the present application.
  • the 2-line to 4-line decoder circuit 400 may be suitable for the above-mentioned first decoding sub-module 311 and/or the second decoding sub-module 312.
  • the 2-wire to 4-wire decoder circuit 400 includes: two circuit input terminals in0 and in1, and four circuit output terminals out0 to out3.
  • the two circuit input terminals in0 and in1 can be used to input a 2-bit binary code
  • the four circuit output terminals out0 to out3 can be used to output a 4-bit high-order code or a low-order code.
  • the two circuit input terminals in0 and in1 are used to respectively input the low and high bits of the 2-bit binary code
  • the four circuit output terminals out0 to out3 are used to respectively output the 4-bit high-bit code from the low to the high bits. or low code.
  • the gate circuit can include four types of logic gates: NOT gate inv, NOR gate nor, AND gate nand, and buffer gate buffer.
  • the first circuit output terminal out0 among the four circuit output terminals can be connected to the buffer gate buffer and is used to output the zeroth preset symbol in the high-order code or the low-order code.
  • the zeroth preset symbol may be a target symbol.
  • the decoder circuit 400 can generate a signal "0" internally, and the signal "0" passes through the fifth inverter gate inv5 and the buffer gate buffer and outputs the zeroth preset symbol as "1".
  • the first circuit input terminal in0 and the second circuit input terminal in1 are connected to the input terminal of the NOR gate nor, and the output terminal of the NOR gate nor is connected to the input terminal of the first NOT gate inv1.
  • the output terminal of a NOT gate inv1 is connected to the second circuit output terminal out1 among the four circuit output terminals, and is used to output the first symbol of the high-order code or the low-order code.
  • the second circuit input terminal in1 of the two circuit input terminals is connected to the input terminal of the second invertor inv2, and the output terminal of the second invertor inv2 is connected to the input terminal of the third invertor inv3.
  • the output terminal is connected to the third output terminal out2 among the four output terminals, and is used to output the second code element of the high-order code or the low-order code.
  • the first circuit input terminal in0 and the second circuit input terminal in1 are connected to the input terminal of the NAND gate nand, and the output terminal of the NAND gate nand is connected to the input terminal of the fourth invert gate inv4.
  • the output terminal of the four-NOT gate inv4 is connected to the fourth output terminal out3 among the four output terminals, and is used to output the third code element of the high-order code or the low-order code.
  • the 2-bit binary code can be converted into a 4-bit high-order code or a low-order code.
  • the high-order code or low-order code starts from the 0th bit to
  • the k-th bits are all target symbols "1", where k can represent the value of a 2-bit binary code, 0 ⁇ k ⁇ 2 n/2 .
  • the above-described decoder circuit 400 can be understood as a shift decoder circuit.
  • the default output of the shift decoder circuit is 1, that is, regardless of the input What is the value of the binary code?
  • the lowest bit of the output of the shift decoder circuit is 1 by default.
  • the value of the input binary code is x
  • the lowest bit "1” is copied and moved to the left by output.
  • the 2-line to 4-line decoder circuit 400 when the value of the input binary code is 0, the lowest bit "1” is copied and moved to the left by 0 bits and the high bit is filled with "0", that is, to the left Carry 0 "1”s and fill the high bits with "0", and output 0001.
  • the default output of the shift decoder circuit is 0, that is, no matter what the value of the input binary code is, the lowest bit of the output of the shift decoder circuit defaults to is 0.
  • the value of the input binary code is x
  • the lowest bit "0” is copied and moved to the left by x bits and the high bit is supplemented with "1”, thus forming the final output of the shift decoder circuit.
  • the 2-line to 4-line decoder circuit 400 when the value of the input binary code is 0, the lowest bit "0” is copied and moved to the left by 0 bits and the high bit is supplemented with "1", and 1110 is output.
  • the circuit implementation is relatively simple, and the delay of each output end is the same, thereby ensuring that the high-order code and the low-order code can be output synchronously to ensure the normal operation of subsequent modules.
  • FIG. 5 is only an example and not a limitation, introducing the circuit structure of a 2-line to 4-line decoder circuit 400.
  • the 2-line to 4-line decoder circuit 400 can also be configured through other circuits.
  • the structure (for example: other types of logic gates) implements the decoding function so that the number of target symbols in the 4-bit decoding output by the decoder circuit 400 can represent the value of the 2-bit binary code.
  • This application The embodiment does not limit the specific circuit structure of the 2-line to 4-line decoder circuit 400.
  • the decoder circuit can also be based on the above 2 lines to 4 lines.
  • the design principles of the decoder circuit 400 are used to carry out corresponding circuit design.
  • the circuit structure of the decoder circuit with 3 lines to 8 lines, 4 lines to 16 lines or other more input lines to output lines is no longer required. Be specific.
  • the decoder circuit 400 can ensure the synchronous output of each symbol without causing logical errors in the subsequent module, that is, the combinational logic module 320, and comprehensively ensure the performance of the device 300 for converting binary codes to thermometer codes.
  • the decoding module 310 may include two identical decoding sub-modules 311 and 312.
  • the first decoding sub-module 311 of the two decoding sub-modules is used to decode high-order binary data.
  • the code is converted to obtain a high-bit code
  • the second decoding sub-module 312 is used to convert the low-bit binary code to obtain a low-bit code.
  • the logical structures of the first decoding sub-module 311 and the second decoding sub-module 312 can be relatively simple, reducing the overall design complexity of the decoding module 310, and decoding sub-modules with the same structure have The same delay ensures that the high-bit code and the low-bit code can be output synchronously to ensure the normal operation of subsequent modules.
  • the decoding module 310 may also include other numbers of multiple identical decoding sub-modules, which are used to convert the high-order binary code and the low-order binary code to obtain the high-order binary code. code and low-order code, the embodiment of the present application does not limit the specific number of sub-modules of the decoding module 310.
  • decoding module 310 provided by the embodiment of the present application has been described above with reference to Figures 4 and 5.
  • the combinational logic module 320 provided by the embodiment of the present application will be described below with reference to Figures 6 to 10.
  • Figure 6 shows a schematic structural block diagram of a combinational logic module 320 provided by the embodiment of the present application.
  • the multiple logical sub-modules include: 2n -1 first logical sub-modules 321 and one second logical sub-module 322.
  • the multiple The logical sub-module is composed of 2 n -1 first logical sub-modules 321 and one second logical sub-module 322 .
  • the second logical sub-module 322 is used to output the 0th symbol en ⁇ 0> in the thermometer code as a preset symbol.
  • the 2 n -1 first logical sub-modules 321 are the same and are used to convert the above-mentioned translation
  • the code elements in the converted high-order code and the code elements in the low-order code are combined by the code module 310 to output the 1st to 2n -1th code elements en ⁇ 2n -1:1> in the thermometer code.
  • the combinational logic module 320 Through the combinational logic module 320, a 2 n- bit thermometer code corresponding to the n-bit binary code can be obtained.
  • the preset symbol output by the second logic sub-module 322 may be “0”.
  • the combinational logic module 320 combining the 2 n -1 first logic sub-modules 321 and one second logic sub-module 322 can ensure the conversion accuracy of the combinational logic module 320 in converting high-order codes and low-order codes into thermometer codes.
  • first logic sub-modules 321 combine the symbols in the high-order code and the symbols in the low-order code to output other symbols of the thermometer code except the 0th bit symbol.
  • the 2 n -1 The first logic sub-module 321 is used to analyze the target symbols in the high-order code and the low-order code, so as to convert the accurate thermometer code.
  • thermometer code by combining 2 n -1 first logic sub-modules 321 and one second logic sub-module 322 in the logic module 320, a complete and accurate thermometer code can be converted, The performance of the device 300 for converting binary codes to thermometer codes is comprehensively guaranteed.
  • each first logic sub-module 321 in the 2 n -1 first logic sub-modules 321 in the embodiment shown in Figure 6 The terminals are connected to the output terminal of the first decoding sub-module 311 and the output terminal of the second decoding sub-module 312, so that each first logical sub-module 321 can receive the high-order code output by the first decoding sub-module 311. and the low-order code output by the second decoding sub-module 312.
  • FIG. 7 shows a schematic structural block diagram of another combinational logic module 320 provided by an embodiment of the present application.
  • the above-mentioned 2 n -1 first logical sub-modules 321 include 2 n/2 groups of first logical sub-modules.
  • the 2 n -1 first logical sub-modules 321 consists of 2 n/2 groups of first logical sub-modules.
  • each first logical sub-module 321 in the i-th group of first logical sub-modules is used to obtain multiple intermediate results based on the i-th symbol in the above-mentioned high-bit code and the multi-bit symbols in the above-mentioned low-bit code, and
  • the multi-bit code elements in the thermometer code are obtained based on the multiple intermediate results and the i+1th code element in the high-order code, where 0 ⁇ i ⁇ 2 n/2 -1 and i is an integer.
  • Each group of first logic sub-modules among the 2 n/2 groups of first logic sub-modules can be used to output a group of code elements of the thermometer code.
  • the i-th group of first logical sub-modules can be used to output the i-th group of symbols en i of the thermometer code.
  • Each code element in the i-th group of code elements en i can be determined according to the i-th code element High i, the i+1-th code element High i+ 1 and the high-order code High ⁇ 2 n/ 2 -1:0 >.
  • One symbol in the low code Low ⁇ 2 n/2 -1:0> is obtained.
  • the code elements en 0 to en 2 n/ 2 -1 output by the 2 n/2 groups of first logic submodules in the embodiment shown in Figure 7 are connected in sequence from low bits to high bits to form the final output thermometer code.
  • the i-th group of first logical sub-modules includes 2 n/ 2 first logical sub-modules 321.
  • the i-th group of first logical sub-modules includes 2 n/2 -1 first logical sub-modules 321.
  • the 0th group of first logical submodules does not include the 0th first logical submodule 321, and the 0th group of first logical submodules includes the 1st to 2n /2-1th first logical submodules 321.
  • each first logical submodule in the first group When 0 ⁇ i ⁇ 2 n/2 -1, 0 ⁇ j ⁇ 2 n/2 -1, that is, each of the first logical submodule in the first group to the first logical submodule in the 2nd n/2 -1 group
  • the group of first logical sub-modules includes the 0th to 2 n/2 -1th first logical sub-modules 321 .
  • each first logical sub-module 321 can be used to output one symbol of the thermometer code. As an example, as shown in FIG.
  • the j-th first logic sub-module 321 may be used to output the j-th symbol en i ⁇ j> in the i-th group of symbols en i of the thermometer code.
  • the j-th code element en i ⁇ j> can be based on the i-th code element High i , the i+1-th code element High i+1 and the low-bit code in the high code High ⁇ 2 n/2 -1 :0>
  • the j-th symbol Low j in Low ⁇ 2 n/2 -1:0> is obtained.
  • the j-th symbol en i ⁇ j> in the i-th group of symbols en i may be the (i*2 n/2 +j)-th symbol in the thermometer code.
  • the 2 n/2- bit high-bit code High ⁇ 2 n/2 -1:0> is selected from the 0th-bit code
  • the element High 0 to the u-th code element High u is the target code element, and the u+1th code element High u to the 2 n/2 -1 bit code in the high code High ⁇ 2 n/2 -1:0>
  • the element High 2 n/2 -1 is a non-target code element
  • u can be the value of the high-bit binary code
  • the low-bit code Low ⁇ 2 n/2 -1:0> is from the 0th code element Low 0 to the v-th bit
  • the code element Low v is the target code element, and in the low code Low ⁇ 2 n/2 -1:0>, the v+1th code element Low v to the 2 n/2 -1th code element Low 2 n/2 - 1 is a non-target code element, and
  • the j-th first logical sub-module 321 in the i-th group of first logical sub-modules is used to set the high-order code High ⁇ 2 n/
  • the i-th code element High i in 2 -1:0> and the j-th code element Low j in low code Low ⁇ 2 n/2 -1:0> perform AND logic to obtain an intermediate result, and the intermediate result is Perform OR logic with the i+1th bit symbol High i +1 in the high bit code High ⁇ 2 n/2 -1:0> to obtain the (i*2 n/2 +j)th bit symbol en in the thermometer code. i ⁇ j>.
  • the i-th group of code elements en i where the code element en i ⁇ j> is located can be calculated by the following formula (2):
  • the "+” operation represents “OR logic”
  • the "*” operation represents “AND logic”.
  • the j-th first logical sub-module 321 in the i-th group of first logical sub-modules is used to set the high-order code High ⁇ 2 n/2 -1
  • the i-th symbol High i in :0> and the j-th symbol Low j in the low code Low ⁇ 2 n/2 -1:0> perform OR logic to obtain an intermediate result, and combine the intermediate result with the high code
  • the i+1th code element High i+1 in High ⁇ 2 n/2 -1:0> performs NAND logic to obtain the (i*2 n/2 +j)th code element en i ⁇ in the thermometer code. j>.
  • the i-th group of code elements en i where the code element en i ⁇ j> is located can be calculated by the following formula (4):
  • the "+” operation represents “OR logic”
  • the "*” operation represents “AND logic”
  • the "'” operation represents non-logic.
  • thermometer code when the target symbol is "1" and the non-target symbol is "0", the high-order code and the low-order code can be negated through non-logical negation, and the above formula ( 3) and formula (4) are converted to obtain the thermometer code, or, when the target code element is "0" and the non-target code element is "1", the high-order code and the low-order code can be negated through non-logic, and through the above Formula (1) and formula (2) are converted to obtain the thermometer code.
  • thermometer code can be obtained through combined conversion with the code elements in the low-order code, and at the same time, the conversion efficiency can be improved, so that the thermometer code can be output quickly.
  • FIG. 9 shows a schematic structural block diagram of a combinational logic module 320 provided by the embodiment of the present application.
  • the combinational logic module 320 is used to receive the 4-bit high-order code High ⁇ 3:0> and the 4-bit low-order code Low ⁇ 3:0>, and output the 16-bit thermometer code en ⁇ 15:0>.
  • the combinational logic module 320 includes 4 ⁇ 4, that is, 16 logic sub-modules, and the 16 logic sub-modules are composed of 15 first logic sub-modules 321 and 1 second logic sub-module 322.
  • the first logic sub-module 321 and the second logic sub-module 322 may be logic sub-circuits, the circuit structures of the 15 first logic sub-circuits may be the same, and each first logic sub-circuit may include three inputs. Terminals High a , High b , Low a and an output terminal en.
  • a second logic sub-circuit can be a buffer gate (buffer), used to output the preset symbol "0" as the 0th bit symbol en 0 ⁇ 0> of the thermometer code en ⁇ 15:0>.
  • the bottom three first logical sub-modules 321 may be the 0th group of first logical sub-modules in the above embodiment, which are used to receive High 0 and High 1 , And receive Low 1 to Low 3 respectively to output the first code element en 0 ⁇ 1> to the third code element en 0 ⁇ 3> of the thermometer code en ⁇ 15:0>.
  • the four first logical sub-modules 321 in the penultimate row may be the first group of first logical sub-modules in the above embodiment, which are used to receive High 1 and High 2 and receive Low 0 to Low respectively.
  • the four first logic sub-modules 321 in the second row can be the second group of first logic sub-modules in the above embodiment, which are used to receive High 2 and High 3 and receive Low 0 to Low 3 respectively to output The 8th code element en 2 ⁇ 0> of the thermometer code en ⁇ 15:0> to the 11th code element en 2 ⁇ 3>.
  • the four first logical sub-modules 321 in the first row may be the third group of first logical sub-modules in the above embodiment, which are used to receive High 3 and High 4 and receive Low 0 to Low 3 respectively to output
  • the 12th code element en 3 ⁇ 0> of the thermometer code en ⁇ 15:0> to the 15th code element en 3 ⁇ 3>, where High 4 0.
  • Figure 10 shows a schematic logic circuit diagram of the first logic sub-module 321.
  • the first logic sub-module 321 The sub-module 321 can also be called the first logic sub-circuit.
  • the first logic sub-circuit includes three circuit input terminals and one circuit output terminal, in which the first circuit input terminal High a and the second circuit input terminal High b are used to input high-bit binary codes 2 symbols in , the third circuit input terminal Low a is used to input 1 symbol in the low binary code, and the circuit output terminal en is used to output 1 symbol in the thermometer code.
  • the first circuit input terminal High a and the third circuit input terminal Low a are connected to the AND gate and.
  • the output terminal of the AND gate and and the second circuit input terminal High b are connected to the input terminal of the OR gate or.
  • the output of the OR gate or The terminal is connected to the circuit output terminal en.
  • Figure 11 shows a schematic logic circuit diagram of another first logic sub-module 321.
  • the first logic sub-module 321 The sub-module 321 can also be called the first logic sub-circuit.
  • the first circuit input terminal High a and the third circuit input terminal Low a are connected to the OR gate or, and the output terminal of the OR gate or and the second circuit input terminal High b is connected to the input terminal of the NAND gate nand, and the output terminal of the NOT gate nand is connected to the circuit output terminal en.
  • the first logic sub-circuit may also include: a buffer gate buffer.
  • the output terminal of the OR gate or can be connected to the circuit output terminal en through the buffer gate buffer. That is, the output terminal of the OR gate or is connected to the input terminal of the buffer gate buffer.
  • the output terminal of the door punch buffer is connected to the circuit output terminal en.
  • the output terminal of the NAND gate nand can be connected to the circuit output terminal en through the buffer gate buffer. That is, the output terminal of the NAND gate nand is connected to the input terminal of the buffer gate buffer, and the output terminal of the buffer gate buffer is connected to the circuit output terminal en.
  • the first logic subcircuit is the jth first logic subcircuit in the ith group of first logic subcircuits among the 2n -1 first logic subcircuits
  • the first circuit input terminal High a is used to input the i-th symbol in the high-order binary code
  • the second circuit input terminal High b is used to input the i+1-th symbol in the high-order binary code
  • the third circuit input The terminal Low a is used to input the i-th code element in the low-order binary code
  • the circuit output terminal en is used to output the (i*2 n/2 +j)-th code element in the thermometer code.
  • FIG. 10 and FIG. 11 are only schematic diagrams of the logic circuits of the two first logic sub-circuits provided by the embodiments of the present application.
  • the first The logic subcircuit can also be implemented through other circuit structures (such as other types of logic gates), and is intended to convert the high-order code and low-order code corresponding to the binary code into a thermometer code.
  • the AND logic, OR logic and NAND logic of the code element can also be implemented by other types of logic gates.
  • This application does not limit the specific circuit structure of the first logic sub-circuit.
  • the delay of the second logic sub-circuit shown in FIG. 9 may be consistent with the delay of the first logic sub-circuit.
  • the time delay of the second logic sub-circuit may be the time required for the signal to be transmitted from the input end of the second logic sub-module to the output end.
  • the time delay of the first logic sub-circuit may be the time required for the signal to be transmitted from the input end of the second logic sub-module to the output end. The time required to transmit from the input terminal of a logic submodule to the output terminal.
  • the second logic sub-circuit may include a buffer gate buffer, so that the delay of the 0th-bit thermometer code output by the second logic sub-circuit is consistent with that of other bit thermometer codes output by the first logic sub-circuit, thereby ensuring The conversion performance of the device for converting binary code to thermometer code.
  • the number of buffer gate buffers in the second logic subcircuit may be greater than the number of buffer gate buffers in the second logic subcircuit.
  • the number of buffer gate buffers in a logical subcircuit, or, in the case where both the first logical subcircuit and the second logical subcircuit have a buffer gate the delay time caused by the buffer gate of the second logical subcircuit is longer than that of the second logical subcircuit.
  • the buffer gate of a logic subcircuit introduces a longer delay time.
  • Figure 12 shows another binary system provided by the embodiment of the present application.
  • the relevant technical solution of the decoding module 310 can be the same as the technical solution of the embodiment shown in Figure 4 above, and will not be described again here.
  • the combinational logic module 320 includes 2 n/2 groups of first logic sub-modules and one second logic sub-module 322 .
  • each other group of first logical sub-modules includes 2 n/2 first logical sub-modules 321, and the 0th group of first logical sub-modules
  • a logical sub-module includes 2 n/2 -1 first logical sub-modules 321 .
  • the second logic sub-module 322 is used to output the 0th thermometer code en 0 ⁇ 0>.
  • the first logical submodule of group 0 is used to output the thermometer code of group 0 en 0 ⁇ 2 n/2 -1:1>
  • the first logical submodule of group 1 is used to output the thermometer code of group 1 en 1 ⁇ 2 n /2 -1:0>
  • the 2 n/2 -1 group of first logical submodules are used to output the 2 n/2 -1 group of thermometer codes en 2 n/ 2 -1 ⁇ 2 n/2 - 1:0>.
  • thermometer codes Arrange the multiple groups of thermometer codes from the 0th group to the 2n /2 -1 group in sequence, and combine them with the 0th thermometer code en 0 ⁇ 0> to obtain a 2 n -digit thermometer code en ⁇ 2 n -1 :0>.
  • the decoding module 310 is used to input a 4-bit binary code. After conversion by the decoding module 310, a 4-bit high-order code and a 4-bit low-order code are obtained respectively. The high-order code and the low-order code are obtained respectively. After the code is converted by the combinational logic module 320, a 16-bit thermometer code is obtained.
  • Table 2 shows a device 300 according to the embodiment of the present application.
  • the implemented truth table from 4-bit binary code (B ⁇ 3:0>) to 16-bit thermometer code (en ⁇ 15:0>), where Dec represents the decimal code.
  • a device 300 for converting a binary code into a thermometer code is provided.
  • the circuit structure of the device 300 is simple and clear, and the power consumption is low.
  • the device 300 can achieve a consistent and short delay time for each symbol, thereby ensuring synchronous and correct reception of data transmission during high-speed data transmission.
  • the transmission speed of the binary code is fast, the device 300 can quickly and accurately convert the binary code into a thermometer code for use, and the conversion speed can track the speed of the input binary code.
  • the simple circuit structure of the device 300 in the embodiment of the present application it only includes two layers of logic circuits, the decoding module and the combinational logic module. When drawing the layout, complex layout wiring (such as avoiding cross wiring) can be avoided. At the same time, It also reduces parasitism and area.
  • thermometer code converted by the device 300 can be used to input the control module, so that the control module implements the control function according to the thermometer code.
  • control module may include a switch array, and each symbol in the thermometer code may be used to control a switch in the switch array.
  • the weight of the unit controlled by each switch is consistent. For example, the symbol “1" can indicate that the switch is on, and the symbol "0" can indicate that the switch is off.
  • the number of open switches in the switch array can be controlled only by controlling the number of code elements "1" in the thermometer code.
  • thermometer code control module it not only ensures the convenient and accurate implementation of the control method, but also achieves control and adjustment functions with excellent linearity and monotonicity.
  • the electronic device may include the above control module and the device 300 for converting a binary code to a thermometer code as in any of the above embodiments.
  • the device 300 is used to convert an n-bit binary code into a corresponding thermometer code.
  • the control module is used to receive the thermometer code and implement control functions based on the thermometer code.
  • the electronic device may include an LC oscillation circuit.
  • the control module includes a switch array composed of 2 n switches. Each switch in the switch array is connected to a capacitor in the LC oscillation circuit.
  • the switch array is used to receive a thermometer. The code controls the number of working capacitors in the LC oscillation circuit according to the thermometer code.
  • the LC oscillation circuit may include 2 n capacitors, the 2 n capacitors have the same capacitance value, and the 2 n capacitors correspond to the 2 n capacitors in the switch array in a one-to-one manner.
  • Each code element in the thermometer code is used to control a switch in the switch array.
  • the switch When the switch is closed, the capacitor connected to the switch is connected to the LC oscillation circuit, which acts as a working capacitor to generate oscillation.
  • the switch is open, the capacitor connected to the switch is connected to the LC oscillation circuit.
  • the capacitor connected to the switch is disconnected from the LC oscillation circuit and does not serve as the working capacitor of the LC oscillation circuit.
  • the cooperation between the control module and the device 300 for converting binary codes to thermometer codes can realize linear and monotonic control of the capacitance in the LC oscillation circuit, thereby ensuring the linearity of the gain of the LC oscillation circuit to improve Overall performance of LC oscillator circuit.
  • control module and the device 300 for converting binary codes to thermometer codes provided by the embodiments of the present application can also be applied to other control scenarios applicable to thermometer codes, which are not specifically limited in the embodiments of the present application.
  • any combination of various embodiments of the present application can be carried out. As long as they do not violate the idea of the present application, they should also be regarded as the contents disclosed in the present application.
  • the disclosed systems and devices can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be indirect coupling or communication connection through some interfaces, devices or modules, or may be electrical, mechanical or other forms of connection.

Abstract

The present application provides an apparatus for converting a binary code into a thermometer code, and an electronic device, having good performance. The apparatus for converting a binary code into a thermometer code comprises: a decoding module, used for converting a high-bit binary code of high n/2 bits in an n-bit binary code into a high-bit code of 2n/2 bits, and converting a low-bit binary code of low n/2 bits in the n-bit binary code into a low-bit code of 2n/2 bits, wherein the number of target code elements in the high-bit code is related to the value of the high-bit binary code, the number of target code elements in the low-bit code is related to the value of the low-bit binary code, the target code elements are 0 or 1, and n is a positive even number; and a combinatorial logic module, comprising multiple logic sub-modules, the multiple logic sub-modules having the same delay, and the multiple logic sub-modules being used for combining the code elements in the high-bit code and the code elements in the low-bit code to obtain a thermometer code corresponding to the n-bit binary code.

Description

二进制码转温度计码的装置和电子设备Devices and electronic equipment for converting binary codes into thermometer codes
本申请要求2022年8月26日提交中国专利局、申请号为202211032712.2、发明名称为“二进制码转温度计码的装置和电子设备”的中国发明申请的优先权,其全部内容通过应用结合在本申请中。This application claims the priority of the Chinese invention application submitted to the China Patent Office on August 26, 2022, with the application number 202211032712.2 and the invention name "Device and Electronic Equipment for Converting Binary Codes to Thermometer Codes", the entire content of which is incorporated into this document by application. Applying.
技术领域Technical field
本申请涉及电子技术领域,并且更具体地,涉及一种二进制码转温度计码的装置和电子设备。The present application relates to the field of electronic technology, and more specifically, to a device and electronic equipment for converting a binary code into a thermometer code.
背景技术Background technique
二进制码(Binary Code)是数字电路中最常用的数字码,其以2为基数用于记数,且常用符号0和1来表示,每个符号占用1个比特(bit)位。数字电路中,逻辑门的实现直接应用了二进制,因此现代的计算机和依赖计算机的设备里都用到二进制。温度计码(Thermometer Code)是一种各比特位的权重一致的数字码,其同样由符号0和1组成,但该温度计码中符号1的数量对应十进制数值,因此具有较好的线性度和单调性。Binary code is the most commonly used digital code in digital circuits. It uses 2 as the base for counting and is commonly represented by symbols 0 and 1. Each symbol occupies 1 bit. In digital circuits, the implementation of logic gates directly uses binary, so modern computers and computer-dependent devices all use binary. Thermometer Code is a digital code with consistent weights for each bit. It is also composed of symbols 0 and 1, but the number of symbols 1 in the thermometer code corresponds to a decimal value, so it has good linearity and monotonicity. sex.
由于温度计码的长度较长,所消耗的功耗大且需占用较大的内存,所以温度计码不便于进行计算,因此,在一些实施方式下,使用二进制码来进行计算,再将其转换为温度计码来使用,在该过程中,二进制码到温度计码的转换十分重要。Since the thermometer code is long in length, consumes a lot of power and requires a large amount of memory, the thermometer code is inconvenient to calculate. Therefore, in some implementations, binary codes are used for calculation and then converted into Thermometer code is used. In this process, the conversion of binary code to thermometer code is very important.
鉴于此,如何提供一种性能较佳的二进制码转温度计码的装置,是一项亟待解决的技术问题。In view of this, how to provide a device for converting binary codes to thermometer codes with better performance is an urgent technical problem to be solved.
发明内容Contents of the invention
本申请提供了一种二进制码转温度计码的装置和电子设备,具有较佳的性能。This application provides a device and electronic equipment for converting a binary code into a thermometer code, which has better performance.
第一方面,提供一种二进制码转温度计码的装置,包括:译码模块,用于将n位二进制码中高n/2位的高位二进制码转换为2n/2位的高位码,且将n位二进制码中低n/2位的低位二进制码转换为2n/2位的低位码,其中,高位码中目标码元的数量与高位二进制码的值相关,低位码中目标码元的数量与 低位二进制码的值相关,目标码元为0或1,n为正偶数;组合逻辑模块,包括多个逻辑子模块,多个逻辑子模块的时延相同,且多个逻辑子模块用于将高位码中的码元和低位码中的码元组合,以得到n位二进制码对应的温度计码。In a first aspect, a device for converting a binary code into a thermometer code is provided, including: a decoding module for converting the upper n/2-bit high-order binary code of the n-bit binary code into a 2 n/2 -bit high-order binary code, and converting The low n/2 bits of the low binary code in the n-bit binary code are converted into 2 n/2 bits of low bit code. Among them, the number of target symbols in the high bit code is related to the value of the high bit binary code. The number of target symbols in the low bit code is Quantity and The value of the low-order binary code is related, the target symbol is 0 or 1, and n is a positive even number; the combinational logic module includes multiple logical sub-modules, the delays of the multiple logical sub-modules are the same, and the multiple logical sub-modules are used to The code elements in the high-bit code are combined with the code elements in the low-bit code to obtain the thermometer code corresponding to the n-bit binary code.
通过本申请实施例的技术方案,提供了一种包括译码模块和组合逻辑模块的二进制码转温度计码的装置,通过该译码模块,不仅可以将n位的二进制码拆分成两部分分别进行处理,以便于提高后续组合逻辑模块对该二进制码对应的高位码和低位码的处理效率,还可以在高位码和低位码中通过目标码元的数量分别体现高位二进制码的值和低位二进制码的值,从而有利于后续组合逻辑模块的逻辑设计。进一步地,通过该组合逻辑模块,其由多个时延相同的逻辑子模块形成,能够降低组合逻辑模块整体的复杂度,针对于高位数的二进制码至温度计码的转换具有良好的适应性和扩展性,且能够保证温度计码中每个码元的同步输出,不会导致后续电路的逻辑错误,综合保证该二进制码转温度计码的装置的性能。Through the technical solution of the embodiment of the present application, a device for converting a binary code to a thermometer code including a decoding module and a combinational logic module is provided. Through the decoding module, not only can the n-bit binary code be split into two parts, respectively Processing is carried out in order to improve the processing efficiency of the high-bit code and low-bit code corresponding to the binary code by the subsequent combinational logic module. The value of the high-bit code and the low-bit code can also be reflected in the high-bit code and the low-bit code respectively through the number of target code elements. code value, thus facilitating the logical design of subsequent combinational logic modules. Furthermore, through the combinational logic module, which is formed by multiple logic sub-modules with the same delay, the overall complexity of the combinational logic module can be reduced, and it has good adaptability and accuracy for the conversion of high-digit binary codes to thermometer codes. It is scalable and can ensure the synchronous output of each code element in the thermometer code, which will not cause logical errors in subsequent circuits, and comprehensively guarantees the performance of the device for converting binary codes to thermometer codes.
在一些可能的实施方式中,上述高位码中目标码元的数量与高位二进制码的值相关包括:高位码中第0位至第u位为目标码元,高位码中除所述第0位至第u位以外的其它位为非目标码元,其中,u为高位二进制码的值,0≤u≤2n/2-1;上述低位码中目标码元的数量与低位二进制码的值相关包括:低位码中第0位至第v位为目标码元,低位码中除所述第0位至第v位以外的其它位为非目标码元,其中,v为低位二进制码的值,0≤v≤2n/2-1;在目标码元为1时,非目标码元为0,或者,在目标码元为0时,非目标码元为1。In some possible implementations, the number of target code elements in the above-mentioned high-bit code is related to the value of the high-bit binary code, including: the 0th to u-th bits in the high-bit code are the target code elements, and the high-bit code except the 0th bit Bits other than the u-th bit are non-target code elements, where u is the value of the high-order binary code, 0≤u≤2 n/2 -1; the number of target code elements in the above-mentioned low-order code and the value of the low-order binary code Related include: the 0th to vth bits in the low-order code are target code elements, and the other bits in the low-order code except the 0th to v-th bits are non-target code elements, where v is the value of the low-order binary code , 0≤v≤2 n/2 -1; when the target symbol is 1, the non-target symbol is 0, or, when the target symbol is 0, the non-target symbol is 1.
在一些可能的实施方式中,译码模块包括多个相同的译码子模块,多个相同的译码子模块用于对高位二进制码和低位二进制码进行转换以得到高位码和低位码。In some possible implementations, the decoding module includes multiple identical decoding sub-modules, and the multiple identical decoding sub-modules are used to convert high-bit binary codes and low-bit binary codes to obtain high-bit codes and low-bit codes.
在一些可能的实施方式中,译码模块包括两个相同的译码子模块,两个相同的译码子模块中第一译码子模块用于对高位二进制码进行转换以得到高位码,两个相同的译码子模块中第二译码子模块用于对低位二进制码进行转换以得到低位码。In some possible implementations, the decoding module includes two identical decoding sub-modules. The first decoding sub-module of the two identical decoding sub-modules is used to convert the high-order binary code to obtain the high-order code. The second decoding sub-module among the same decoding sub-modules is used to convert the low-order binary code to obtain the low-order code.
在一些可能的实施方式中,多个逻辑子模块包括:2n-1个第一逻辑子模块和一个第二逻辑子模块,一个第二逻辑子模块用于将温度计码中的第0位 码元输出为预设码元,2n-1个第一逻辑子模块相同,且用于将高位码中的码元和低位码中的码元组合以输出温度计码中第1位码元至第2n-1位码元。In some possible implementations, the multiple logical sub-modules include: 2 n -1 first logical sub-modules and a second logical sub-module, and a second logical sub-module is used to convert the 0th bit in the thermometer code The code element output is the preset code element, the 2 n -1 first logic sub-modules are the same, and are used to combine the code elements in the high-order code and the code elements in the low-order code to output the first code element in the thermometer code to The 2 n -1 bit code element.
在一些可能的实施方式中,2n-1个第一逻辑子模块包括2n/2组第一逻辑子模块,其中,第i组第一逻辑子模块中的每个第一逻辑子模块用于根据高位码中的第i位码元与低位码中的多位码元得到多个中间结果,且根据多个中间结果与高位码中的第i+1位码元得到温度计码中的多位码元,其中,0≤i≤2n/2-1,i为整数。In some possible implementations, the 2 n -1 first logical sub-modules include 2 n/2 groups of first logical sub-modules, wherein each first logical sub-module in the i-th group of first logical sub-modules is Multiple intermediate results are obtained based on the i-th code element in the high-bit code and multi-bit code elements in the low-bit code, and multiple intermediate results in the thermometer code are obtained based on the multiple intermediate results and the i+1-th code element in the high-bit code. Bit symbol, where 0≤i≤2 n/2 -1, i is an integer.
在一些可能的实施方式中,在0<i≤2n/2-1的情况下,第i组第一逻辑子模块包括2n/2个第一逻辑子模块,在i=0的情况下,所述第i组第一逻辑子模块包括2n/2-1个第一逻辑子模块,其中,第i组第一逻辑子模块中的第j个第一逻辑子模块用于根据高位码中的第i位码元与低位码中的第j位码元得到多个中间结果中的第j个中间结果,且根据第j个中间结果与高位码中的第i+1位码元得到温度计码中的第(i*2n/2+j)位码元,其中,在0<i≤2n/2-1的情况下,0≤j≤2n/2-1,在i=0的情况下,0<j≤2n/2-1,j为整数。In some possible implementations, when 0<i≤2 n/2 -1, the i-th group of first logical sub-modules includes 2 n/2 first logical sub-modules, and when i=0 , the i-th group of first logical sub-modules includes 2 n/2 -1 first logical sub-modules, wherein the j-th first logical sub-module in the i-th group of first logical sub-modules is used to generate data according to the high-order code The j-th intermediate result among multiple intermediate results is obtained from the i-th symbol in and the j-th symbol in the low-order code, and based on the j-th intermediate result and the i+1-th symbol in the high-order code, we obtain The (i*2 n/2 +j)th code element in the thermometer code, where, when 0<i≤2 n/2 -1, 0≤j≤2 n/2 -1, when i= In the case of 0, 0<j≤2 n/2 -1, and j is an integer.
在一些可能的实施方式中,目标码元为1,非目标码元为0,第j个第一逻辑子模块用于将高位码中的第i位码元与低位码中的第j位码元执行与逻辑得到第j个中间结果,且将第j个中间结果与高位码中的第i+1位码元执行或逻辑得到温度计码中的第(i*2n/2+j)位码元。In some possible implementations, the target symbol is 1, the non-target symbol is 0, and the j-th first logical sub-module is used to combine the i-th symbol in the high-order code with the j-th code in the low-order code. The element executes AND logic to obtain the jth intermediate result, and performs OR logic between the jth intermediate result and the i+1th bit symbol in the high-order code to obtain the (i*2 n/2 +j)th bit in the thermometer code. code element.
在一些可能的实施方式中,目标码元为0,非目标码元为1,第j个第一逻辑子模块用于将高位码中的第i位码元与低位码中的第j位码元执行或逻辑得到第j个中间结果,且将第j个中间结果与高位码中的第i+1位码元执行与非逻辑得到温度计码中的第(i*2n/2+j)位码元。In some possible implementations, the target symbol is 0, the non-target symbol is 1, and the j-th first logical sub-module is used to combine the i-th symbol in the high-order code with the j-th code in the low-order code. The element performs OR logic to obtain the jth intermediate result, and performs NAND logic on the jth intermediate result and the i+1th bit symbol in the high-order code to obtain the (i*2 n/2 +j)th (i*2 n/2 +j) in the thermometer code. bit code element.
在一些可能的实施方式中,译码模块和/或组合逻辑模块为包括逻辑门的逻辑电路。In some possible implementations, the decoding module and/or the combinational logic module is a logic circuit including logic gates.
在一些可能的实施方式中,译码模块包括译码器电路,译码器电路中任一输入端至与该输入端相连的任一输出端之间的逻辑门数量相同。In some possible implementations, the decoding module includes a decoder circuit, and the number of logic gates between any input terminal in the decoder circuit and any output terminal connected to the input terminal is the same.
在一些可能的实施方式中,译码模块包括两个结构相同的译码器电路,在n=4的情况下,译码器电路包括两个电路输入端和四个电路输出端,两个电路输入端用于输入2位的高位二进制码或低位二进制码,四个电路输出端用于输出4位的高位码或低位码;四个电路输出端中第一电路输出端连接于缓冲门,用于输出高位码或低位码中第零位预设码元;两个电路输入端中的 第一电路输入端和第二电路输入端连接于或非门的输入端,或非门的输出端连接于第一非门的输入端,第一非门的输出端连接于四个电路输出端中的第二电路输出端,用于输出高位码或低位码中第一位码元;两个电路输入端中的第二电路输入端连接于第二非门的输入端,第二非门的输出端连接于第三非门的输入端,第三非门的输出端连接于四个电路输出端中的第三电路输出端,用于输出高位码或低位码中第二位码元;两个电路输入端中的第一电路输入端和第二电路输入端连接于与非门的输入端,与非门的输出端连接于第四非门的输入端,第四非门的输出端连接于四个电路输出端中的第四电路输出端,用于输出高位码或低位码中第三位码元。In some possible implementations, the decoding module includes two decoder circuits with the same structure. When n=4, the decoder circuit includes two circuit input terminals and four circuit output terminals. The two circuits The input terminal is used to input a 2-bit high-order binary code or a low-order binary code, and the four circuit output terminals are used to output a 4-digit high-order binary code or low-order code; among the four circuit output terminals, the first circuit output terminal is connected to the buffer gate, with The zeroth preset symbol in the output high-order code or low-order code; the input terminal of the two circuits The first circuit input terminal and the second circuit input terminal are connected to the input terminal of the NOR gate, the output terminal of the NOR gate is connected to the input terminal of the first NOT gate, and the output terminal of the first NOT gate is connected to the four circuit output terminals. The second circuit output terminal is used to output the first symbol of the high-order code or the low-order code; the second circuit input terminal of the two circuit input terminals is connected to the input terminal of the second NOT gate, and the second circuit input terminal of the second NOT gate The output terminal is connected to the input terminal of the third NOT gate, and the output terminal of the third NOT gate is connected to the third circuit output terminal among the four circuit output terminals for outputting the second code element of the high-order code or the low-order code; two The first circuit input terminal and the second circuit input terminal among the circuit input terminals are connected to the input terminal of the NAND gate, the output terminal of the NAND gate is connected to the input terminal of the fourth NOT gate, and the output terminal of the fourth NOT gate is connected to The fourth circuit output terminal among the four circuit output terminals is used to output the third code element of the high-order code or the low-order code.
在一些可能的实施方式中,组合逻辑模块包括:组合逻辑电路,该组合逻辑电路包括2n-1个第一逻辑子电路和一个第二逻辑子电路,一个第二逻辑子电路用于将温度计码中的第0位码元输出为预设码元,2n-1个第一逻辑子电路的电路相同,且用于将高位码中的码元和低位码中的码元组合以输出温度计码中第1位码元至第2n-1位码元。In some possible implementations, the combinational logic module includes: a combinational logic circuit, the combinational logic circuit includes 2 n -1 first logic subcircuits and a second logic subcircuit, and a second logic subcircuit is used to combine the thermometer The 0th code element in the code is output as a preset code element. The circuits of the 2 n -1 first logic sub-circuits are the same and are used to combine the code elements in the high-bit code and the code elements in the low-bit code to output the thermometer. The 1st code element to the 2n -1th code element in the code.
在一些可能的实施方式中,2n-1个第一逻辑子电路中任一第一逻辑子电路的时延和一个第二逻辑子电路的时延相同。In some possible implementations, the delay of any one of the 2 n -1 first logic sub-circuits is the same as the delay of a second logic sub-circuit.
在一些可能的实施方式中,第一逻辑子电路包括三个电路输入端和一个电路输出端,三个电路输入端中的第一电路输入端和第二电路输入端用于输入高位二进制码中的2个码元,三个电路输入端中的第三电路输入端用于输入低位二进制码中的1个码元,电路输出端用于输出温度计码中的1个码元;在目标码元为1的情况下,第一电路输入端和第三电路输入端连接于与门的输入端,与门的输出端和第二电路输入端连接于或门的输入端,或门的输出端连接于电路输出端,或者,在目标码元为0的情况下,第一电路输入端和第三电路输入端连接于或门的输入端,或门的输出端和第二电路输入端连接于与非门的输入端,与非门的输出端连接于电路输出端。In some possible implementations, the first logic sub-circuit includes three circuit input terminals and one circuit output terminal, and the first circuit input terminal and the second circuit input terminal among the three circuit input terminals are used to input high-order binary codes. 2 symbols, the third circuit input terminal among the three circuit input terminals is used to input 1 symbol in the low-order binary code, and the circuit output terminal is used to output 1 symbol in the thermometer code; in the target symbol When it is 1, the first circuit input terminal and the third circuit input terminal are connected to the input terminal of the AND gate, the output terminal of the AND gate and the second circuit input terminal are connected to the input terminal of the OR gate, and the output terminal of the OR gate is connected to at the output end of the circuit, or, when the target symbol is 0, the first circuit input end and the third circuit input end are connected to the input end of the OR gate, and the output end of the OR gate and the second circuit input end are connected to the AND The input terminal of the NOT gate and the output terminal of the NAND gate are connected to the output terminal of the circuit.
在一些可能的实施方式中,译码模块和/或组合逻辑模块为数字芯片中的功能模块。In some possible implementations, the decoding module and/or the combinational logic module are functional modules in a digital chip.
在一些可能的实施方式中,温度计码用于输入控制模块,以使得控制模块根据温度计码实现控制功能。In some possible implementations, the thermometer code is used to input the control module, so that the control module implements the control function according to the thermometer code.
第二方面,提供一种电子设备,包括:控制模块,以及第一方面或第一方面中任一可能的实施方式中的装置,该装置用于将2n位二进制码转换为对 应的温度计码,控制模块用于接收温度计码且根据温度计码实现控制功能。In a second aspect, an electronic device is provided, including: a control module, and the device in the first aspect or any possible implementation manner in the first aspect, the device is used to convert a 2 n- bit binary code into a According to the thermometer code, the control module is used to receive the thermometer code and implement the control function according to the thermometer code.
在一些可能的实施方式中,电子设备包括LC振荡电路,该LC振荡电路包括2n个电容值相同的电容,控制模块包括由2n个开关组成的开关阵列,开关阵列中的每个开关连接于一个电容,开关阵列用于接收温度计码且根据温度计码控制LC振荡电路中处于工作状态的电容的数量。In some possible implementations, the electronic device includes an LC oscillation circuit, the LC oscillation circuit includes 2 n capacitors with the same capacitance value, the control module includes a switch array composed of 2 n switches, and each switch in the switch array is connected Based on a capacitor, the switch array is used to receive the thermometer code and control the number of working capacitors in the LC oscillation circuit according to the thermometer code.
附图说明Description of drawings
图1为本申请实施例提供的一种二进制码转温度计码电路的示意图。Figure 1 is a schematic diagram of a binary code to thermometer code conversion circuit provided by an embodiment of the present application.
图2为本申请实施例提供的另一二进制码转温度计码电路的示意图。FIG. 2 is a schematic diagram of another binary code to thermometer code conversion circuit provided by an embodiment of the present application.
图3为本申请实施例提供的一种二进制码转温度计码的装置的示意性结构框图。Figure 3 is a schematic structural block diagram of a device for converting a binary code into a thermometer code provided by an embodiment of the present application.
图4是本申请实施例提供的一种译码模块示意性结构框图。Figure 4 is a schematic structural block diagram of a decoding module provided by an embodiment of the present application.
图5是本申请实施例提供的一种2线-4线译码器电路的示意性逻辑电路图。FIG. 5 is a schematic logic circuit diagram of a 2-line to 4-line decoder circuit provided by an embodiment of the present application.
图6是本申请实施例提供的一种组合逻辑模块的示意性结构框图。Figure 6 is a schematic structural block diagram of a combinational logic module provided by an embodiment of the present application.
图7是本申请实施例提供的另一组合逻辑模块的示意性结构框图。FIG. 7 is a schematic structural block diagram of another combinational logic module provided by an embodiment of the present application.
图8是本申请实施例提供的第i组第一逻辑子模块的示意性结构框图。Figure 8 is a schematic structural block diagram of the i-th group of first logical sub-modules provided by the embodiment of the present application.
图9是本申请实施例提供的另一组合逻辑模块的示意性结构框图。Figure 9 is a schematic structural block diagram of another combinational logic module provided by an embodiment of the present application.
图10是本申请实施例提供的一种第一逻辑子模块的示意性逻辑电路图。Figure 10 is a schematic logic circuit diagram of a first logic sub-module provided by an embodiment of the present application.
图11是本申请实施例提供的另一第一逻辑子模块的示意性逻辑电路图。Figure 11 is a schematic logic circuit diagram of another first logic sub-module provided by an embodiment of the present application.
图12是本申请实施例提供的另一二进制码转温度计码的装置的示意性结构框图。Figure 12 is a schematic structural block diagram of another device for converting a binary code into a thermometer code provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in this application will be described below with reference to the accompanying drawings.
图1示出了本申请实施例提供的一种二进制码转温度计码电路100的示意图。FIG. 1 shows a schematic diagram of a binary code to thermometer code conversion circuit 100 provided by an embodiment of the present application.
如图1所示,该二进制码转温度计码电路包括三个输入端以及七个输出端,该三个输入端用于分别接收二进制码的三个码元B0至B2,该七个输出端用于分别输出温度计码的七个码元T1至T7。该图1所示的电路也可称为3线-7线二进制码转温度计码电路。 As shown in Figure 1, the binary code to thermometer code conversion circuit includes three input terminals and seven output terminals. The three input terminals are used to receive the three code elements B 0 to B 2 of the binary code respectively. The seven output terminals The terminal is used to output the seven code elements T 1 to T 7 of the thermometer code respectively. The circuit shown in Figure 1 can also be called a 3-line to 7-line binary code to thermometer code circuit.
通过该3线-7线二进制码转温度计码电路,下面表1示出了十进制、二进制码和温度计码的真值表。Through this 3-wire to 7-wire binary code to thermometer code conversion circuit, Table 1 below shows the truth table of decimal, binary code and thermometer code.
表1
Table 1
在该图1所示实施例中,B0至B2到T3和T5的输出需要通过四级逻辑门,而B0至B2到其它输出仅需要通过两级逻辑门,因此,该T3和T5的输出具有较大的延迟,这不仅限制了温度计码的转换速率,而且该T3和T5与其它信号在延迟上的差异也会导致后续电路的逻辑错误。In the embodiment shown in Figure 1, the outputs from B 0 to B 2 to T 3 and T 5 need to pass through four-level logic gates, while the outputs from B 0 to B 2 only need to go through two-level logic gates. Therefore, the The output of T3 and T5 has a large delay, which not only limits the conversion rate of the thermometer code, but the difference in delay between T3 and T5 and other signals will also cause logic errors in subsequent circuits.
另外,在该图1所示实施例中,逻辑门电路较为复杂,走线交叉较多,因而会造成该电路的功耗较高、版图设计较为复杂且工艺成本较高。随着二进制码的位数的提高,上述时延、功耗、成本等问题会更为严重。In addition, in the embodiment shown in FIG. 1 , the logic gate circuit is relatively complex and there are many wire crossings, which results in higher power consumption, more complex layout design and higher process cost of the circuit. As the number of binary code bits increases, the above problems such as delay, power consumption, and cost will become more serious.
除了上述图1所示的实施例以外,在一些其它二进制码转温度计码电路中,例如图2所示的2线-3线二进制码转温度计码电路200中,虽然晶体管Mn1、Mp1、Tg1、Tg2、Tg3以及INV的数量较少,但仍然会存在输入端(B0至B1)至输出端(T1至T3)的延迟不一致、电路较为复杂等问题,造成该图1和图2中所示的二进制码转温度计码电路的性能不佳。In addition to the above-mentioned embodiment shown in Figure 1, in some other binary code to thermometer code circuits, such as the 2-line to 3-line binary code to thermometer code circuit 200 shown in Figure 2, although the transistors Mn 1 , Mp 1 , The number of Tg 1 , Tg 2 , Tg 3 and INV is small, but there will still be problems such as inconsistent delays from the input end (B 0 to B 1 ) to the output end (T 1 to T 3 ) and more complex circuits, causing this The binary code to thermometer code circuit shown in Figures 1 and 2 does not perform well.
鉴于此,本申请提供一种新的二进制码转温度计码的装置,该装置相比于上述二进制码转温度计码电路100和200具有较佳的性能。In view of this, the present application provides a new binary code to thermometer code conversion device, which has better performance than the above-mentioned binary code to thermometer code conversion circuits 100 and 200 .
图3示出了本申请实施例提供的一种二进制码转温度计码的装置300的示意性结构框图。FIG. 3 shows a schematic structural block diagram of a device 300 for converting a binary code into a thermometer code provided by an embodiment of the present application.
如图3所示,该二进制码转温度计码的装置300包括:译码模块310和组合逻辑模块320。具体地,译码模块310用于将n位二进制码中高n/2位的高位二进制码转换为2n/2位的高位码,且将该n位二进制码中低n/2位的低位二进制码转换为2n/2位的低位码,其中,高位码中目标码元的数量与高位二进制码的值相关,低位码中目标码元的数量与低位二进制码的值相关,n为正偶数。As shown in FIG. 3 , the device 300 for converting binary codes to thermometer codes includes: a decoding module 310 and a combinational logic module 320 . Specifically, the decoding module 310 is used to convert the upper n/2-bit high-order binary code of the n-bit binary code into a 2 n/2- bit high-order binary code, and convert the low-order n/2 bits of the n-bit binary code into the low-order binary code. The code is converted into a low-bit code of 2 n/2 bits. Among them, the number of target code elements in the high-bit code is related to the value of the high-bit binary code. The number of target code elements in the low-bit code is related to the value of the low-bit binary code. n is a positive even number. .
组合逻辑模块320包括多个逻辑子模块,该多个逻辑子模块的时延相同, 且该多个逻辑子模块用于将上述高位码中的码元和低位码中的码元组合,以得到n位二进制码对应的温度计码。The combinational logic module 320 includes multiple logical sub-modules, and the multiple logical sub-modules have the same delay. And the plurality of logic sub-modules are used to combine the code elements in the above-mentioned high-order code and the code elements in the low-order code to obtain the thermometer code corresponding to the n-bit binary code.
通过本申请实施例的技术方案,提供了一种包括译码模块310和组合逻辑模块320的二进制码转温度计码的装置300,通过该译码模块310,不仅可以将n位的二进制码拆分成两部分分别进行处理,以便于提高后续组合逻辑模块320对该二进制码对应的高位码和低位码的处理效率,还可以在高位码和低位码中通过目标码元的数量分别体现高位二进制码的值和低位二进制码的值,从而有利于后续组合逻辑模块320的逻辑设计。进一步地,通过该组合逻辑模块320,其由多个时延相同的逻辑子模块形成,能够降低组合逻辑模块整体的复杂度,针对于高位数的二进制码至温度计码的转换具有良好的适应性和扩展性,且能够保证温度计码中每个码元的同步输出,不会导致后续电路的逻辑错误,综合保证该二进制码转温度计码的装置300的性能。Through the technical solution of the embodiment of the present application, a device 300 for converting a binary code into a thermometer code including a decoding module 310 and a combinational logic module 320 is provided. Through the decoding module 310, not only the n-bit binary code can be split It is divided into two parts and processed separately, so as to improve the processing efficiency of the high-bit code and low-bit code corresponding to the binary code by the subsequent combination logic module 320. The high-bit code can also be reflected in the high-bit code and the low-bit code by the number of target symbols. and the value of the low-order binary code, thus facilitating the subsequent logic design of the combinational logic module 320. Furthermore, through the combinational logic module 320, which is formed by multiple logic sub-modules with the same delay, the overall complexity of the combinational logic module can be reduced, and it has good adaptability for the conversion of high-digit binary codes to thermometer codes. and scalability, and can ensure the synchronous output of each symbol in the thermometer code, without causing logical errors in subsequent circuits, and comprehensively guarantee the performance of the device 300 for converting binary codes to thermometer codes.
可选地,在一些实施方式中,译码模块310和/或组合逻辑模块320可以为包括逻辑门的逻辑电路。具体地,译码模块310可以为包括至少一种逻辑门的译码器逻辑电路,组合逻辑模块320可以为包括至少一种逻辑门的组合逻辑电路。其中,该逻辑门包括但不限于是:与门、或门、非门、与非门、或非门、异或门或者同或门等等。Optionally, in some implementations, the decoding module 310 and/or the combinational logic module 320 may be a logic circuit including logic gates. Specifically, the decoding module 310 may be a decoder logic circuit including at least one logic gate, and the combinational logic module 320 may be a combinational logic circuit including at least one logic gate. The logic gates include but are not limited to: AND gate, OR gate, NOT gate, NAND gate, NOR gate, XOR gate or XOR gate, etc.
或者,在另一些实施方式中,译码模块310和/或组合逻辑模块320也可以为数字芯片中的功能模块,该功能模块可以包括数字芯片中的软件模块和硬件模块,两者相互配合以实现译码模块310和/或组合逻辑模块320的逻辑功能。其中,该硬件模块可以为数字芯片中的集成电路,该软件模块可以为程序代码,其可以存储于数字芯片中,或者也可以与存储于数字芯片外。该数字芯片包括现场可编程门阵列(Field Programmable Gate Array,FPGA)芯片、复杂可编程逻辑器件(Complex Programmable Logic Device,CPLD)芯片等等,该数字芯片中的逻辑程序代码可以通过verilog硬件描述语言(Hardware Description Language,HDL)来编写。Or, in other embodiments, the decoding module 310 and/or the combinational logic module 320 can also be a functional module in a digital chip. The functional module can include a software module and a hardware module in the digital chip, and the two cooperate with each other to achieve Implement the logical functions of the decoding module 310 and/or the combinational logic module 320. The hardware module can be an integrated circuit in a digital chip, and the software module can be a program code, which can be stored in the digital chip, or can be stored outside the digital chip. The digital chip includes Field Programmable Gate Array (FPGA) chip, Complex Programmable Logic Device (CPLD) chip, etc. The logic program code in the digital chip can be written through the verilog hardware description language (Hardware Description Language, HDL) to write.
作为示例,本申请主要以译码模块310和组合逻辑模块320为逻辑电路进行具体说明,当译码模块310和组合逻辑模块320为数字芯片中的功能模块时,可通过逻辑程序代码配合集成电路实现该逻辑电路的功能,本申请对该逻辑程序代码的具体实现方式不做限定。As an example, this application mainly uses the decoding module 310 and the combinational logic module 320 as logic circuits for detailed description. When the decoding module 310 and the combinational logic module 320 are functional modules in a digital chip, the logic program code can be used to cooperate with the integrated circuit. To realize the function of the logic circuit, this application does not limit the specific implementation method of the logic program code.
对于译码模块310,其可用于接收n位二进制码,其中,n为正偶数, 该偶数位二进制码的最高位可以为“0”。可选地,在一些实施方式中,处理模块(例如数字芯片)可向译码模块310提供n位二进制码,当实际的二进制码为奇数位时,该处理模块可在该实际的二进制码的最高位补“0”以形成偶数位的二进制码。例如,实际的二进制码为111,则处理模块可在“111”之前补“0”,形成偶数位的二进制码“0111”。该最高位补“0”的处理不会影响二进制码的实际值,也有利于该二进制码在译码模块310中的处理。For the decoding module 310, it can be used to receive n-bit binary codes, where n is a positive even number, The highest bit of the even-digit binary code may be "0". Optionally, in some implementations, a processing module (eg, a digital chip) may provide an n-bit binary code to the decoding module 310. When the actual binary code is an odd number of digits, the processing module may generate an n-bit binary code at the end of the actual binary code. The highest bit is filled with "0" to form an even-numbered binary code. For example, if the actual binary code is 111, the processing module can add "0" before "111" to form an even-numbered binary code "0111". The process of filling the highest bit with "0" will not affect the actual value of the binary code, and is also beneficial to the processing of the binary code in the decoding module 310.
具体地,该译码模块310用于将该n位二进制码中高n/2位的高位二进制码译码形成为一个2n/2位的高位码,且将该n位二进制码中低n/2位的低位二进制码译码形成为一个2n/2位的低位码。其中,高位码中目标码元的数量可以体现高位二进制码的值,低位码中目标码元的数量可以体现低位二进制码的值,该目标码元可以为1或者0。Specifically, the decoding module 310 is used to decode the high-order n/2 bits of the n-bit binary code into a 2 n/2- bit high-order binary code, and convert the n-bit binary code to the low n/2 bits. The 2-bit low-order binary code is decoded to form a 2 n/2- bit low-order code. Among them, the number of target code elements in the high-bit code can reflect the value of the high-bit binary code, and the number of target code elements in the low-bit code can reflect the value of the low-bit binary code. The target code element can be 1 or 0.
通过该译码过程,不仅可以将n位的二进制码拆分成两部分分别进行处理,以便于提高后续模块对该二进制码的转换效率,还可以在高位码和低位码中通过目标码元的数量分别体现高位二进制码的值和低位二进制码的值,从而有利于后续模块的逻辑设计,便于该后续模块根据高位码和低位码的码元将二进制码转换为温度计码。Through this decoding process, not only can the n-bit binary code be split into two parts for processing respectively, so as to improve the conversion efficiency of the binary code by subsequent modules, but also the target symbol can be passed through the high-bit code and low-bit code. The quantities respectively reflect the value of the high-order binary code and the value of the low-order binary code, which is beneficial to the logic design of the subsequent module and facilitates the subsequent module to convert the binary code into a thermometer code based on the code elements of the high-order code and low-order code.
进一步地,对于组合逻辑模块320,其包括多个时延相同的逻辑子模块。通过该多个逻辑子模块将上述译码模块310译码得到的高位码中的码元和低位码中的码元组合,可以得到n位二进制码对应的温度计码。具体地,对于每个逻辑子模块而言,其时延可以为信号由逻辑子模块的输入端传输至输出端所需要的时间。Further, the combinational logic module 320 includes multiple logic sub-modules with the same delay. The thermometer code corresponding to the n-bit binary code can be obtained by combining the symbols in the high-order code and the symbols in the low-order code decoded by the above-mentioned decoding module 310 through the multiple logical sub-modules. Specifically, for each logic sub-module, the delay may be the time required for a signal to be transmitted from the input end of the logic sub-module to the output end.
该组合逻辑模块320可包括多个逻辑子模块,每个逻辑子模块的结构易于简单清晰的实现,针对于高位数的二进制码至温度计码的转换具有良好的适应性和扩展性。且该多个逻辑子模块具有相同的时延,从而能够保证温度计码中每个码元的同步输出,不会导致后续电路的逻辑错误,保证该二进制码转温度计码的装置300的性能。The combinational logic module 320 may include multiple logic sub-modules. The structure of each logic sub-module is easy to implement simply and clearly, and has good adaptability and scalability for converting high-digit binary codes to thermometer codes. Moreover, the multiple logic sub-modules have the same delay, thereby ensuring the synchronous output of each symbol in the thermometer code, without causing logical errors in subsequent circuits, and ensuring the performance of the device 300 for converting binary codes to thermometer codes.
图4示出了本申请实施例提供的一种译码模块310的示意性结构框图。Figure 4 shows a schematic structural block diagram of a decoding module 310 provided by an embodiment of the present application.
如图4所示,该译码模块310包括两个相同的第一译码子模块311和第二译码子模块312,其中,第一译码子模块311用于将n位二进制码中高n/2位的高位二进制码转换为2n/2位的高位码,第二译码子模块312用于将n位二进制码中低n/2位的低位二进制码转换为2n/2位的低位码。 As shown in Figure 4, the decoding module 310 includes two identical first decoding sub-modules 311 and second decoding sub-modules 312, where the first decoding sub-module 311 is used to convert the n-bit binary code into high n The /2-bit high-order binary code is converted into a 2 n/2- bit high-order code. The second decoding submodule 312 is used to convert the low-order n/2-bit low-order binary code of the n-bit binary code into a 2 n/2 -bit high-order binary code. Low code.
作为示意,在图4中,n位二进制码中低n/2位的比特位分别表示为B0至Bn/2-1,该B0至Bn/2-1形成n/2位的低位二进制码。该n/2位的低位二进制码经过第二译码子模块312转换后形成低位码Low<2n/2-1:0>,该低位码Low<2n/2-1:0>包括2n/2个比特位,其最低位的比特位可表示为Low0,最高位的比特位可表示为Low2 n/2 -1As an illustration, in Figure 4, the lower n/2 bits in the n-bit binary code are represented as B 0 to B n/2-1 respectively, and the B 0 to B n/2-1 form an n/2-bit Low binary code. The n/2-bit low-order binary code is converted by the second decoding sub-module 312 to form a low-order code Low<2 n/2 -1:0>. The low-order code Low<2 n/2 -1:0> includes 2 n/2 bits, the lowest bit can be expressed as Low 0 and the highest bit can be expressed as Low 2 n/2 -1 .
可选地,在一些实施方式中,低位码Low<2n/2-1:0>中从第0位Low0至第v位Lowv为目标码元,而低位码Low<2n/2-1:0>中除该第0位Low0至第v位Lowv外的其它位为非目标码元,其中,v可以为低位二进制码的值,0≤v≤2n/2-1。Optionally, in some implementations, in the low code Low<2 n/2 -1:0>, from the 0th bit Low 0 to the vth bit Low v are the target code elements, and the low code Low<2 n/2 -1:0> The other bits except the 0th bit Low 0 to the vth bit Low v are non-target code elements, where v can be the value of the low-order binary code, 0≤v≤2 n/2 -1 .
举例而言,在目标码元为“1”,非目标码元为“0”的情况下,若低位二进制码为01,该低位二进制码的值为1,第二译码子模块312对该低位二进制码01转换后得到的低位码Low<3:0>可以为0011。其中,低位码0011的第0位至第1位为目标码元“1”,而第2位和第3位为非目标码元“0”,该低位码0011中目标码元“1”即可以体现低位二进制码01的值。For example, when the target symbol is "1" and the non-target symbol is "0", if the low-order binary code is 01, the value of the low-order binary code is 1, and the second decoding sub-module 312 The low-order code Low<3:0> obtained after converting the low-order binary code 01 can be 0011. Among them, the 0th to 1st bits of the low-order code 0011 are the target code element "1", and the 2nd and 3rd bits are the non-target code element "0". The target code element "1" in the low-order code 0011 is It can reflect the value of low-order binary code 01.
或者,在目标码元为“0”,非目标码元为“1”的情况下,若低位二进制码为11,该低位二进制码的值为3,第二译码子模块312对该低位二进制码11转换后得到的低位码Low<3:0>可以为0000。其中,低位码0000的第0位至第3位均为目标码元“0”,该低位码0000中目标码元“0”即可以体现低位二进制码11的值。Or, when the target symbol is "0" and the non-target symbol is "1", if the low-order binary code is 11, the value of the low-order binary code is 3, and the second decoding sub-module 312 will The low code Low<3:0> obtained after code 11 is converted can be 0000. Among them, the 0th to 3rd bits of the low-order code 0000 are all target code elements "0", and the target code element "0" in the low-order code 0000 can reflect the value of the low-order binary code 11.
类似地,在图4中,n位二进制码中高n/2位的比特位分别表示为Bn/2至Bn-1,该Bn/2至Bn-1形成高位二进制码。该n/2位的高位二进制码经过第一译码子模块311转换后形成高位码High<2n/2-1:0>,该高位码High<2n/2-1:0>包括2n/2个比特位,其最低位的比特位可表示为High0,最高位的比特位可表示为High2 n/2 -1Similarly, in Figure 4, the upper n/2 bits in the n-bit binary code are represented as B n/2 to B n-1 respectively, and the B n/2 to B n-1 form the upper binary code. The n/2-bit high-order binary code is converted by the first decoding sub-module 311 to form a high-order code High<2 n/2 -1:0>. The high-order code High<2 n/2 -1:0> includes 2 n/2 bits, the lowest bit can be expressed as High 0 , and the highest bit can be expressed as High 2 n/2 -1 .
可选地,在一些实施方式中,高位码High<2n/2-1:0>中从第0位High0至第u位Highu为目标码元,而高位码High<2n/2-1:0>中除第0位High0至第u位Highu以外的其它位为非目标码元,其中,u可以为高位二进制码的值,0≤u≤2n/2-1。Optionally, in some implementations, in the high-bit code High<2 n/2 -1:0>, from the 0th bit High 0 to the u-th bit High u are the target code elements, and the high-bit code High<2 n/2 The other bits in -1:0> except the 0th bit High 0 to the u-th bit High u are non-target code elements, where u can be the value of the high-order binary code, 0≤u≤2 n/2 -1.
举例而言,在目标码元为“1”,非目标码元为“0”的情况下,若高位二进制码为10,该高位二进制码的值为2,第一译码子模块311对该高位二进制码10转换后得到的高位码High<3:0>可以为0111。其中,高位码0111的第 0位至第2位均为目标码元“1”,而第3位为非目标码元“0”,该高位码0111中目标码元“1”即可以体现高位二进制码10的值。For example, when the target symbol is "1" and the non-target symbol is "0", if the high-order binary code is 10, the value of the high-order binary code is 2, and the first decoding sub-module 311 The high-bit code High<3:0> obtained after converting the high-bit binary code 10 can be 0111. Among them, the high-digit code 0111 is Bits 0 to 2 are all target code elements "1", while bit 3 is the non-target code element "0". The target code element "1" in the high-order code 0111 can reflect the value of the high-order binary code 10.
或者,在目标码元为“0”,非目标码元为“1”的情况下,若高位二进制码为10,该高位二进制码的值为2,第一译码子模块311对该高位二进制码10转换后得到的高位码High<3:0>可以为1000。其中,高位码1000的第0位至第2位均为目标码元“0”,而第3位为非目标码元“1”,该高位码1000中目标码元“0”即可以体现高位二进制码10的值。Or, when the target symbol is "0" and the non-target symbol is "1", if the high-order binary code is 10, the value of the high-order binary code is 2, and the first decoding sub-module 311 The high bit code High<3:0> obtained after code 10 is converted can be 1000. Among them, the 0th to 2nd bits of the high-bit code 1000 are all target code elements "0", and the 3rd bit is the non-target code element "1". The target code element "0" in the high-bit code 1000 can reflect the high-bit code The value of binary code 10.
通过本申请实施例的技术方案,译码模块310通过两个相同的译码子模块(第一译码子模块311和第二译码子模块312)分别将n位二进制码中高n/2位的高位二进制码和低n/2位的低位二进制码转换为2n/2比特位的高位码和低位码,每个译码子模块的逻辑结构可以较为简单,可以降低译码模块310的整体设计复杂度,且相同的译码子模块具有相同的时延,从而保证高位码和低位码能够同步输出,以保证后续模块的正常运行。Through the technical solution of the embodiment of the present application, the decoding module 310 uses two identical decoding sub-modules (the first decoding sub-module 311 and the second decoding sub-module 312) to respectively decode the upper n/2 bits of the n-bit binary code. The high-bit binary code and the low n/2-bit low-bit binary code are converted into 2 n/2- bit high-bit code and low-bit code. The logical structure of each decoding sub-module can be relatively simple, which can reduce the overall cost of the decoding module 310. The design complexity is high, and the same decoding sub-module has the same delay, so as to ensure that the high-order code and the low-order code can be output synchronously to ensure the normal operation of subsequent modules.
进一步地,两个译码子模块转换得到的高位码和低位码中,目标码元连续排布于低位,该低位目标码元的数量即可分别表征高位二进制码和低位二进制码的值,从而进一步便于后续组合逻辑模块320的逻辑设计,保证温度计码的生成。Furthermore, in the high-order code and low-order code converted by the two decoding sub-modules, the target symbols are continuously arranged in the low-order bits. The number of the low-order target symbols can respectively represent the values of the high-order binary code and the low-order binary code, so that This further facilitates the subsequent logical design of the combinational logic module 320 and ensures the generation of thermometer codes.
可选地,在上述实施例的举例中,译码子模块(第一译码子模块311或第二译码子模块312)输入的高位二进制码或低位二进码可为2比特位,且该译码子模块输出的高位码或低位码为4比特位。在该情况下,该译码子模块可以为2线-4线译码器电路。Optionally, in the example of the above embodiment, the high-order binary code or the low-order binary code input by the decoding sub-module (the first decoding sub-module 311 or the second decoding sub-module 312) may be 2 bits, and The high-order code or low-order code output by the decoding sub-module is 4 bits. In this case, the decoding sub-module may be a 2-line to 4-line decoder circuit.
作为示例,图5示出了本申请实施例提供的一种2线-4线译码器电路400的示意性逻辑电路图。该2线-4线译码器电路400可以适用于上述第一译码子模块311和/或第二译码子模块312。As an example, FIG. 5 shows a schematic logic circuit diagram of a 2-line to 4-line decoder circuit 400 provided by an embodiment of the present application. The 2-line to 4-line decoder circuit 400 may be suitable for the above-mentioned first decoding sub-module 311 and/or the second decoding sub-module 312.
如图5所示,该2线-4线译码器电路400包括:两个电路输入端in0和in1,四个电路输出端out0至out3。该两个电路输入端in0和in1可用于输入2比特位的二进制码,该四个电路输出端out0至out3可用于输出4比特位的高位码或低位码。具体地,该两个电路输入端in0和in1用于分别输入2比特位的二进制码的低位和高位,该四个电路输出端out0至out3用于由低位至高位分别输出4比特位的高位码或低位码。As shown in Figure 5, the 2-wire to 4-wire decoder circuit 400 includes: two circuit input terminals in0 and in1, and four circuit output terminals out0 to out3. The two circuit input terminals in0 and in1 can be used to input a 2-bit binary code, and the four circuit output terminals out0 to out3 can be used to output a 4-bit high-order code or a low-order code. Specifically, the two circuit input terminals in0 and in1 are used to respectively input the low and high bits of the 2-bit binary code, and the four circuit output terminals out0 to out3 are used to respectively output the 4-bit high-bit code from the low to the high bits. or low code.
可选地,该两个输入端in0和in1与四个输出端out0至out3之间的逻辑 门电路可以包括:非门inv、或非门nor、与门nand、以及缓冲门buffer四种类型的逻辑门。Optionally, the logic between the two input terminals in0 and in1 and the four output terminals out0 to out3 The gate circuit can include four types of logic gates: NOT gate inv, NOR gate nor, AND gate nand, and buffer gate buffer.
具体地,如图5所示,四个电路输出端中第一电路输出端out0可连接于缓冲门buffer,用于输出高位码或低位码中第零位预设码元。该第零位预设码元可以为目标码元。作为示例,译码器电路400内部可产生信号“0”,该信号“0”经过第五非门inv5和缓冲门buffer后输出第零位预设码元为“1”。Specifically, as shown in Figure 5, the first circuit output terminal out0 among the four circuit output terminals can be connected to the buffer gate buffer and is used to output the zeroth preset symbol in the high-order code or the low-order code. The zeroth preset symbol may be a target symbol. As an example, the decoder circuit 400 can generate a signal "0" internally, and the signal "0" passes through the fifth inverter gate inv5 and the buffer gate buffer and outputs the zeroth preset symbol as "1".
两个电路输入端中第一电路输入端in0和第二电路输入端in1连接于或非门nor的输入端,该或非门nor的输出端连接于第一非门inv1的输入端,该第一非门inv1的输出端连接于四个电路输出端中的第二电路输出端out1,用于输出高位码或低位码中第一位码元。Among the two circuit input terminals, the first circuit input terminal in0 and the second circuit input terminal in1 are connected to the input terminal of the NOR gate nor, and the output terminal of the NOR gate nor is connected to the input terminal of the first NOT gate inv1. The output terminal of a NOT gate inv1 is connected to the second circuit output terminal out1 among the four circuit output terminals, and is used to output the first symbol of the high-order code or the low-order code.
两个电路输入端中的第二电路输入端in1连接于第二非门inv2的输入端,该第二非门inv2的输出端连接于第三非门inv3的输入端,该第三非门inv3的输出端连接于四个输出端中的第三输出端out2,用于输出高位码或低位码中第二位码元。The second circuit input terminal in1 of the two circuit input terminals is connected to the input terminal of the second invertor inv2, and the output terminal of the second invertor inv2 is connected to the input terminal of the third invertor inv3. The output terminal is connected to the third output terminal out2 among the four output terminals, and is used to output the second code element of the high-order code or the low-order code.
两个电路输入端中第一电路输入端in0和第二电路输入端in1连接于与非门nand的输入端,该与非门nand的输出端连接于第四非门inv4的输入端,该第四非门inv4的输出端连接于四个输出端中的第四输出端out3,用于输出高位码或低位码中第三位码元。Among the two circuit input terminals, the first circuit input terminal in0 and the second circuit input terminal in1 are connected to the input terminal of the NAND gate nand, and the output terminal of the NAND gate nand is connected to the input terminal of the fourth invert gate inv4. The output terminal of the four-NOT gate inv4 is connected to the fourth output terminal out3 among the four output terminals, and is used to output the third code element of the high-order code or the low-order code.
通过该图5所示实施例中所示的译码器电路400,可以实现2比特位的二进制码转换为4比特位的高位码或低位码,该高位码或低位码从第0位开始至第k位均为目标码元“1”,其中,k可以表示2比特位二进制码的值,0<k<2n/2Through the decoder circuit 400 shown in the embodiment shown in FIG. 5, the 2-bit binary code can be converted into a 4-bit high-order code or a low-order code. The high-order code or low-order code starts from the 0th bit to The k-th bits are all target symbols "1", where k can represent the value of a 2-bit binary code, 0<k<2 n/2 .
可选地,上述译码器电路400可以理解为一种移位译码器电路,在目标码元为“1”的情况下,该移位译码器电路的默认输出为1,即无论输入的二进制码的值为多少,移位译码器电路的输出的最低位默认是1。当输入的二进制码的值为x时,最低位的“1”向左复制移动x位且高位补“0”,即向左进位x个“1”,从而形成移位译码器电路的最终输出。例如,对于该2线-4线译码器电路400而言,当输入的二进制码的值为0时,最低位的“1”向左复制移动0位且高位补“0”,即向左进位0个“1”且高位补“0”,输出0001,当输入的二进制码的值为1时,最低位的“1”向左复制移动1位且高位补“0”,即向左进位1个“1”且高位补“0”,输出0011,当输入的二进制码的值为 2时,最低位的“1”向左复制移动2位且高位补“0”,即向左进位2个“1”且高位补“0”,输出0111。Optionally, the above-described decoder circuit 400 can be understood as a shift decoder circuit. When the target symbol is "1", the default output of the shift decoder circuit is 1, that is, regardless of the input What is the value of the binary code? The lowest bit of the output of the shift decoder circuit is 1 by default. When the value of the input binary code is x, the lowest bit "1" is copied and moved to the left by output. For example, for the 2-line to 4-line decoder circuit 400, when the value of the input binary code is 0, the lowest bit "1" is copied and moved to the left by 0 bits and the high bit is filled with "0", that is, to the left Carry 0 "1"s and fill the high bits with "0", and output 0001. When the value of the input binary code is 1, the lowest bit "1" is copied and moved 1 bit to the left and the high bits are filled with "0", that is, carry to the left 1 "1" and the high bit is filled with "0", output 0011, when the value of the input binary code is 2, the lowest bit "1" is copied and moved 2 bits to the left and the high bit is filled with "0", that is, 2 "1"s are carried to the left and the high bit is filled with "0", and 0111 is output.
或者,在目标码元为“0”的情况下,该移位译码器电路的默认输出为0,即无论输入的二进制码的值为多少,移位译码器电路的输出的最低位默认是0。当输入的二进制码的值为x时,最低位的“0”向左复制移动x位且高位补“1”,从而形成移位译码器电路的最终输出。例如,对于2线-4线译码器电路400而言,当输入的二进制码的值为0时,最低位的“0”向左复制移动0位且高位补“1”,输出1110,当输入的二进制码的值为1时,最低位的“0”向左复制移动1位且高位补“1”,即向左进位1个“0”且高位补“1”,输出1100,当输入的二进制码的值为2时,最低位的“0”向左复制移动2位且高位补“1”,即向左进位2个“0”且高位补“1”,输出1000。Or, when the target symbol is "0", the default output of the shift decoder circuit is 0, that is, no matter what the value of the input binary code is, the lowest bit of the output of the shift decoder circuit defaults to is 0. When the value of the input binary code is x, the lowest bit "0" is copied and moved to the left by x bits and the high bit is supplemented with "1", thus forming the final output of the shift decoder circuit. For example, for the 2-line to 4-line decoder circuit 400, when the value of the input binary code is 0, the lowest bit "0" is copied and moved to the left by 0 bits and the high bit is supplemented with "1", and 1110 is output. When the value of the input binary code is 1, the lowest bit "0" is copied and moved 1 bit to the left and the high bit is filled with "1", that is, one "0" is carried to the left and the high bit is filled with "1", and 1100 is output. When input When the value of the binary code is 2, the lowest bit "0" is copied and moved 2 bits to the left and the high bit is filled with "1", that is, 2 "0"s are carried to the left and the high bit is filled with "1", and 1000 is output.
通过上文图5所示实施例的译码器电路400,其电路实现较为简单,且各输出端的时延相同,从而保证高位码和低位码能够同步输出,以保证后续模块的正常运行。Through the decoder circuit 400 in the embodiment shown in Figure 5 above, the circuit implementation is relatively simple, and the delay of each output end is the same, thereby ensuring that the high-order code and the low-order code can be output synchronously to ensure the normal operation of subsequent modules.
需要说明的是,上文图5仅作为示例而非限定,介绍了一种2线-4线译码器电路400的电路结构,该2线-4线译码器电路400还可以通过其它电路结构(例如:其它类型的逻辑门)实现译码功能,旨在使得译码器电路400输出的4比特位译码中目标码元的数量能够表征2比特位二进制码的值即可,本申请实施例对该2线-4线译码器电路400的具体电路结构不做限定。It should be noted that the above Figure 5 is only an example and not a limitation, introducing the circuit structure of a 2-line to 4-line decoder circuit 400. The 2-line to 4-line decoder circuit 400 can also be configured through other circuits. The structure (for example: other types of logic gates) implements the decoding function so that the number of target symbols in the 4-bit decoding output by the decoder circuit 400 can represent the value of the 2-bit binary code. This application The embodiment does not limit the specific circuit structure of the 2-line to 4-line decoder circuit 400.
另外,在译码器电路的输入-输出分别为3线-8线、4线-16线或者其它更多输入线-输出线数量时,该译码器电路也可以根据上述2线-4线译码器电路400的设计原理进行相应的电路设计,本申请实施例对该3线-8线、4线-16线或者其它更多输入线-输出线的译码器电路的电路结构不再做具体说明。In addition, when the input and output of the decoder circuit are respectively 3 lines to 8 lines, 4 lines to 16 lines, or other more input lines and output lines, the decoder circuit can also be based on the above 2 lines to 4 lines. The design principles of the decoder circuit 400 are used to carry out corresponding circuit design. In the embodiment of the present application, the circuit structure of the decoder circuit with 3 lines to 8 lines, 4 lines to 16 lines or other more input lines to output lines is no longer required. Be specific.
可选地,在图5所示实施例中,任一输入端至与该输入端相连的任一输出端之间的逻辑门数量相同,因此,该译码器电路400的任一输入端与该输入端相连的任一输出端之间具有相同的时延。通过该技术方案,该译码器电路400能够保证每个码元的同步输出,不会导致后续模块即组合逻辑模块320的逻辑错误,综合保证该二进制码转温度计码的装置300的性能。Optionally, in the embodiment shown in FIG. 5 , the number of logic gates between any input terminal and any output terminal connected to the input terminal is the same. Therefore, any input terminal of the decoder circuit 400 and Any output connected to this input has the same delay. Through this technical solution, the decoder circuit 400 can ensure the synchronous output of each symbol without causing logical errors in the subsequent module, that is, the combinational logic module 320, and comprehensively ensure the performance of the device 300 for converting binary codes to thermometer codes.
可选地,在上文实施例中,译码模块310可包括两个相同的译码子模块311和312,该两个译码子模块中的第一译码子模块311用于对高位二进制 码进行转换得到高位码,第二译码子模块312用于对低位二进制码进行转换得到低位码。通过该实施例的技术方案,第一译码子模块311和第二译码子模块312的逻辑结构可以较为简单,降低译码模块310的整体设计复杂度,且相同结构的译码子模块具有相同的时延,从而保证高位码和低位码能够同步输出,以保证后续模块的正常运行。Optionally, in the above embodiment, the decoding module 310 may include two identical decoding sub-modules 311 and 312. The first decoding sub-module 311 of the two decoding sub-modules is used to decode high-order binary data. The code is converted to obtain a high-bit code, and the second decoding sub-module 312 is used to convert the low-bit binary code to obtain a low-bit code. Through the technical solution of this embodiment, the logical structures of the first decoding sub-module 311 and the second decoding sub-module 312 can be relatively simple, reducing the overall design complexity of the decoding module 310, and decoding sub-modules with the same structure have The same delay ensures that the high-bit code and the low-bit code can be output synchronously to ensure the normal operation of subsequent modules.
在一些替代实施方式中,译码模块310还可以包括其它数量的多个相同的译码子模块,该多个相同的译码子模块用于对高位二进制码和低位二进制码进行转换以得到高位码和低位码,本申请实施例对该译码模块310的具体子模块数量不做限定。In some alternative implementations, the decoding module 310 may also include other numbers of multiple identical decoding sub-modules, which are used to convert the high-order binary code and the low-order binary code to obtain the high-order binary code. code and low-order code, the embodiment of the present application does not limit the specific number of sub-modules of the decoding module 310.
上文结合图4和图5说明了本申请实施例提供的译码模块310,下面结合图6至图10,说明本申请实施例提供的组合逻辑模块320。The decoding module 310 provided by the embodiment of the present application has been described above with reference to Figures 4 and 5. The combinational logic module 320 provided by the embodiment of the present application will be described below with reference to Figures 6 to 10.
图6示出了本申请实施例提供的一种组合逻辑模块320的示意性结构框图。Figure 6 shows a schematic structural block diagram of a combinational logic module 320 provided by the embodiment of the present application.
如图6所示,在该实施例的组合逻辑模块320中,多个逻辑子模块包括:2n-1个第一逻辑子模块321和一个第二逻辑子模块322,具体地,该多个逻辑子模块由2n-1个第一逻辑子模块321和一个第二逻辑子模块322组成。该一个第二逻辑子模块322用于将温度计码中的第0位码元en<0>输出为预设码元,2n-1个第一逻辑子模块321相同,且用于将上述译码模块310转换得到的高位码中的码元和低位码中的码元组合以输出温度计码中第1位码元至第2n-1位码元en<2n-1:1>。通过该组合逻辑模块320,可以得到n位二进制码对应的2n位的温度计码。As shown in Figure 6, in the combinational logic module 320 of this embodiment, the multiple logical sub-modules include: 2n -1 first logical sub-modules 321 and one second logical sub-module 322. Specifically, the multiple The logical sub-module is composed of 2 n -1 first logical sub-modules 321 and one second logical sub-module 322 . The second logical sub-module 322 is used to output the 0th symbol en<0> in the thermometer code as a preset symbol. The 2 n -1 first logical sub-modules 321 are the same and are used to convert the above-mentioned translation The code elements in the converted high-order code and the code elements in the low-order code are combined by the code module 310 to output the 1st to 2n -1th code elements en< 2n -1:1> in the thermometer code. Through the combinational logic module 320, a 2 n- bit thermometer code corresponding to the n-bit binary code can be obtained.
可选地,在本申请实施例中,该第二逻辑子模块322输出的预设码元可以为“0”。结合该2n-1个第一逻辑子模块321和一个第二逻辑子模块322的组合逻辑模块320,能够保证该组合逻辑模块320将高位码和低位码转换为温度计码的转换准确度。Optionally, in this embodiment of the present application, the preset symbol output by the second logic sub-module 322 may be “0”. The combinational logic module 320 combining the 2 n -1 first logic sub-modules 321 and one second logic sub-module 322 can ensure the conversion accuracy of the combinational logic module 320 in converting high-order codes and low-order codes into thermometer codes.
另外,2n-1个第一逻辑子模块321将高位码中的码元和低位码中的码元组合以输出温度计码除第0位码元以外的其它码元,该2n-1个第一逻辑子模块321用于分析高位码以及低位码中目标码元,从而转换得到准确的温度计码。In addition, 2 n -1 first logic sub-modules 321 combine the symbols in the high-order code and the symbols in the low-order code to output other symbols of the thermometer code except the 0th bit symbol. The 2 n -1 The first logic sub-module 321 is used to analyze the target symbols in the high-order code and the low-order code, so as to convert the accurate thermometer code.
综上,在本申请实施例中,通过组合逻辑模块320中2n-1个第一逻辑子模块321和一个第二逻辑子模块322,可以转换得到完整且准确的温度计码, 综合保证二进制码转温度计码的装置300的性能。To sum up, in the embodiment of the present application, by combining 2 n -1 first logic sub-modules 321 and one second logic sub-module 322 in the logic module 320, a complete and accurate thermometer code can be converted, The performance of the device 300 for converting binary codes to thermometer codes is comprehensively guaranteed.
将该图6所示实施例与上文图4所示实施例相结合,该图6所示实施例中2n-1个第一逻辑子模块321中每个第一逻辑子模块321的输入端均连接于第一译码子模块311的输出端和第二译码子模块312的输出端,以使得该每个第一逻辑子模块321能够接收第一译码子模块311输出的高位码以及第二译码子模块312输出的低位码。Combining the embodiment shown in Figure 6 with the embodiment shown in Figure 4 above, the input of each first logic sub-module 321 in the 2 n -1 first logic sub-modules 321 in the embodiment shown in Figure 6 The terminals are connected to the output terminal of the first decoding sub-module 311 and the output terminal of the second decoding sub-module 312, so that each first logical sub-module 321 can receive the high-order code output by the first decoding sub-module 311. and the low-order code output by the second decoding sub-module 312.
在上文图6所示实施例的基础上,图7示出了本申请实施例提供的另一组合逻辑模块320的示意性结构框图。Based on the embodiment shown in FIG. 6 above, FIG. 7 shows a schematic structural block diagram of another combinational logic module 320 provided by an embodiment of the present application.
如图7所示,在该实施例中,上述2n-1个第一逻辑子模块321包括2n/2组第一逻辑子模块,具体地,该2n-1个第一逻辑子模块321由2n/2组第一逻辑子模块组成。其中,第i组第一逻辑子模块中的每个第一逻辑子模块321用于根据上述高位码中的第i位码元与上述低位码中的多位码元得到多个中间结果,且根据该多个中间结果与高位码中的第i+1位码元得到温度计码中的多位码元,其中,0≤i≤2n/2-1,i为整数。As shown in Figure 7, in this embodiment, the above-mentioned 2 n -1 first logical sub-modules 321 include 2 n/2 groups of first logical sub-modules. Specifically, the 2 n -1 first logical sub-modules 321 consists of 2 n/2 groups of first logical sub-modules. Wherein, each first logical sub-module 321 in the i-th group of first logical sub-modules is used to obtain multiple intermediate results based on the i-th symbol in the above-mentioned high-bit code and the multi-bit symbols in the above-mentioned low-bit code, and The multi-bit code elements in the thermometer code are obtained based on the multiple intermediate results and the i+1th code element in the high-order code, where 0≤i≤2 n/2 -1 and i is an integer.
该2n/2组第一逻辑子模块中每组第一逻辑子模块可用于输出温度计码的一组码元。作为示例,如图7所示,第i组第一逻辑子模块可用于输出温度计码的第i组码元eni。该第i组码元eni中每个码元可根据高位码High<2n/2-1:0>中的第i位码元Highi、第i+1位码元Highi+1以及低位码Low<2n/2-1:0>中的一个码元得到。Each group of first logic sub-modules among the 2 n/2 groups of first logic sub-modules can be used to output a group of code elements of the thermometer code. As an example, as shown in Figure 7, the i-th group of first logical sub-modules can be used to output the i-th group of symbols en i of the thermometer code. Each code element in the i-th group of code elements en i can be determined according to the i-th code element High i, the i+1-th code element High i+ 1 and the high-order code High<2 n/ 2 -1:0 >. One symbol in the low code Low<2 n/2 -1:0> is obtained.
需要说明的是,在本申请实施例中,对于第2n/2-1组第一逻辑子模块,其需要接收High2 n/2 -1以及High2 n/2,其中,High2 n/2 -1为高位码中的最高位码元,而High2 n/2不是高位码中的码元,而可以为预设码元,例如,其可以为0。It should be noted that in the embodiment of the present application, for the 2 n/2 -1 group of first logical sub-modules, it needs to receive High 2 n/2 -1 and High 2 n/2 , where High 2 n/ 2 -1 is the highest code element in the high-bit code, and High 2 n/2 is not a code element in the high-bit code, but can be a preset code element, for example, it can be 0.
将图7所示实施例中2n/2组第一逻辑子模块输出的码元en0至en2 n/2 -1从低位到高位依次连接,以形成最终输出的温度计码。The code elements en 0 to en 2 n/ 2 -1 output by the 2 n/2 groups of first logic submodules in the embodiment shown in Figure 7 are connected in sequence from low bits to high bits to form the final output thermometer code.
可选地,在上述图7示出的2n/2组第一逻辑子模块中,在0<i≤2n/2-1的情况下,第i组第一逻辑子模块包括2n/2个第一逻辑子模块321,在i=0的情况下,第i组第一逻辑子模块(即第0组第一逻辑子模块)包括2n/2-1个第一逻辑子模块321。Optionally, in the 2 n/2 groups of first logical sub-modules shown in Figure 7 above, in the case of 0<i≤2 n/ 2-1, the i-th group of first logical sub-modules includes 2 n/ 2 first logical sub-modules 321. When i=0, the i-th group of first logical sub-modules (ie, the 0th group of first logical sub-modules) includes 2 n/2 -1 first logical sub-modules 321. .
具体地,第i组第一逻辑子模块中的第j个第一逻辑子模块321用于根据高位码中的第i位码元与低位码中的第j位码元得到中间结果,且根据该 中间结果与高位码中的第i+1位码元得到温度计码中的第(i*2n/2+j)位码元,其中,在0<i≤2n/2-1的情况下,0≤j≤2n/2-1,在i=0的情况下,0<j≤2n/2-1,j为整数。Specifically, the j-th first logical sub-module 321 in the i-th group of first logical sub-modules is used to obtain the intermediate result based on the i-th symbol in the high-order code and the j-th symbol in the low-order code, and according to Should The intermediate result is combined with the i+1th code element in the high-order code to obtain the (i*2 n/2 +j)th code element in the thermometer code, where, in the case of 0<i≤2 n/2 -1 , 0≤j≤2 n/2 -1, when i=0, 0<j≤2 n/2 -1, j is an integer.
换言之,在本申请实施例中,i=0时,j不等于0且0<j≤2n/2-1。第0组第一逻辑子模块中不包括第0个第一逻辑子模块321,该第0组第一逻辑子模块包括第1至第2n/2-1个第一逻辑子模块321。而0<i≤2n/2-1时,0≤j≤2n/2-1,即第1组第一逻辑子模块至第2n/2-1组第一逻辑子模块中每一组第一逻辑子模块包括第0至第2n/2-1个第一逻辑子模块321。在该第i组第一逻辑子模块中,每个第一逻辑子模块321可用于输出温度计码的一个码元。作为示例,如图8所示,第j个第一逻辑子模块321可用于输出温度计码的第i组码元eni中的第j个码元eni<j>。该第j个码元eni<j>可根据高位码High<2n/2-1:0>中的第i位码元Highi、第i+1位码元Highi+1以及低位码Low<2n/2-1:0>中的第j个码元Lowj得到。该第i组码元eni中的第j个码元eni<j>可以为温度计码中的第(i*2n/2+j)位码元。In other words, in the embodiment of the present application, when i=0, j is not equal to 0 and 0<j≤2 n/2 -1. The 0th group of first logical submodules does not include the 0th first logical submodule 321, and the 0th group of first logical submodules includes the 1st to 2n /2-1th first logical submodules 321. When 0<i≤2 n/2 -1, 0≤j≤2 n/2 -1, that is, each of the first logical submodule in the first group to the first logical submodule in the 2nd n/2 -1 group The group of first logical sub-modules includes the 0th to 2 n/2 -1th first logical sub-modules 321 . In the i-th group of first logical sub-modules, each first logical sub-module 321 can be used to output one symbol of the thermometer code. As an example, as shown in FIG. 8 , the j-th first logic sub-module 321 may be used to output the j-th symbol en i <j> in the i-th group of symbols en i of the thermometer code. The j-th code element en i <j> can be based on the i-th code element High i , the i+1-th code element High i+1 and the low-bit code in the high code High<2 n/2 -1 :0> The j-th symbol Low j in Low<2 n/2 -1:0> is obtained. The j-th symbol en i <j> in the i-th group of symbols en i may be the (i*2 n/2 +j)-th symbol in the thermometer code.
可选地,在一些实施方式中,根据上文高位码和低位码的相关技术方案,例如,2n/2位的高位码High<2n/2-1:0>中从第0位码元High0至第u位码元Highu为目标码元,而高位码High<2n/2-1:0>中第u+1位码元Highu至第2n/2-1位码元High2 n/2 -1为非目标码元,u可以为高位二进制码的值,且低位码Low<2n/2-1:0>中从第0位码元Low0至第v位码元Lowv为目标码元,而低位码Low<2n/2-1:0>中第v+1位码元Lowv至第2n/2-1位码元Low2 n/2 -1为非目标码元,v可以为低位二进制码的值。Optionally, in some implementations, according to the above related technical solutions of high-bit code and low-bit code, for example, the 2 n/2- bit high-bit code High<2 n/2 -1:0> is selected from the 0th-bit code The element High 0 to the u-th code element High u is the target code element, and the u+1th code element High u to the 2 n/2 -1 bit code in the high code High<2 n/2 -1:0> The element High 2 n/2 -1 is a non-target code element, u can be the value of the high-bit binary code, and the low-bit code Low<2 n/2 -1:0> is from the 0th code element Low 0 to the v-th bit The code element Low v is the target code element, and in the low code Low<2 n/2 -1:0>, the v+1th code element Low v to the 2 n/2 -1th code element Low 2 n/2 - 1 is a non-target code element, and v can be the value of the low-order binary code.
在该情况下,若目标码元为1,非目标码元为0,则上述第i组第一逻辑子模块中的第j个第一逻辑子模块321用于将高位码High<2n/2-1:0>中的第i位码元Highi与低位码Low<2n/2-1:0>中的第j位码元Lowj执行与逻辑得到中间结果,且将该中间结果与高位码High<2n/2-1:0>中的第i+1位码元Highi+1执行或逻辑得到温度计码中的第(i*2n/2+j)位码元eni<j>。In this case, if the target symbol is 1 and the non-target symbol is 0, then the j-th first logical sub-module 321 in the i-th group of first logical sub-modules is used to set the high-order code High<2 n/ The i-th code element High i in 2 -1:0> and the j-th code element Low j in low code Low<2 n/2 -1:0> perform AND logic to obtain an intermediate result, and the intermediate result is Perform OR logic with the i+1th bit symbol High i +1 in the high bit code High<2 n/2 -1:0> to obtain the (i*2 n/2 +j)th bit symbol en in the thermometer code. i <j>.
具体地,该码元eni<j>可以通过如下公式(1)计算得到:Specifically, the symbol en i <j> can be calculated by the following formula (1):
eni<j>=Highi+1+Lowj*Highi(1)。en i <j>=High i+1 +Low j *High i (1).
该码元eni<j>所在的第i组码元eni可以通过如下公式(2)计算得到:The i-th group of code elements en i where the code element en i <j> is located can be calculated by the following formula (2):
eni<2n/2-1:0>=Highi+1+Low<2n/2-1:0>*Highi(2)。en i <2 n/2 -1:0>=High i+1 +Low <2 n/2 -1:0>*High i (2).
其中,“+”运算表示“或逻辑”,“*”运算表示“与逻辑”。 Among them, the "+" operation represents "OR logic", and the "*" operation represents "AND logic".
或者,若目标码元为0,非目标码元为1,则上述第i组第一逻辑子模块中的第j个第一逻辑子模块321用于将高位码High<2n/2-1:0>中的第i位码元Highi与低位码Low<2n/2-1:0>中的第j位码元Lowj执行或逻辑得到中间结果,且将该中间结果与高位码High<2n/2-1:0>中的第i+1位码元Highi+1执行与非逻辑得到温度计码中的第(i*2n/2+j)位码元eni<j>。Or, if the target symbol is 0 and the non-target symbol is 1, then the j-th first logical sub-module 321 in the i-th group of first logical sub-modules is used to set the high-order code High<2 n/2 -1 The i-th symbol High i in :0> and the j-th symbol Low j in the low code Low<2 n/2 -1:0> perform OR logic to obtain an intermediate result, and combine the intermediate result with the high code The i+1th code element High i+1 in High<2 n/2 -1:0> performs NAND logic to obtain the (i*2 n/2 +j)th code element en i < in the thermometer code. j>.
具体地,该码元eni<j>可以通过如下公式(3)计算得到:Specifically, the symbol en i <j> can be calculated by the following formula (3):
eni<j>=(Highi+1*(Lowj+Highi))’(3)。en i <j>=(High i+1 *(Low j +High i ))'(3).
该码元eni<j>所在的第i组码元eni可以通过如下公式(4)计算得到:The i-th group of code elements en i where the code element en i <j> is located can be calculated by the following formula (4):
eni<2n/2-1:0>=(Highi+1*(Low<2n/2-1:0>+Highi))’(4)。en i <2 n/2 -1:0>=(High i+1 *(Low <2 n/2 -1:0>+High i ))'(4).
其中,“+”运算表示“或逻辑”,“*”运算表示“与逻辑”,“’”运算表示非逻辑。Among them, the "+" operation represents "OR logic", the "*" operation represents "AND logic", and the "'" operation represents non-logic.
可以理解的是,在一些替代实施方式中,在目标码元为“1”,非目标码元为“0”的情况下,高位码和低位码可以通过非逻辑取反后,通过上述公式(3)和公式(4)转换得到温度计码,或者,在目标码元为“0”,非目标码元为“1”的情况下,高位码和低位码可以通过非逻辑取反后,通过上述公式(1)和公式(2)转换得到温度计码。It can be understood that in some alternative implementations, when the target symbol is "1" and the non-target symbol is "0", the high-order code and the low-order code can be negated through non-logical negation, and the above formula ( 3) and formula (4) are converted to obtain the thermometer code, or, when the target code element is "0" and the non-target code element is "1", the high-order code and the low-order code can be negated through non-logic, and through the above Formula (1) and formula (2) are converted to obtain the thermometer code.
通过上述方案可知,该组合逻辑模块320中,2n-1个第一逻辑子模块321不仅可以结构相同,且该第一逻辑子模块321的逻辑实现也较为简单,在能够有效的对高位码和低位码中的码元进行组合转换得到温度计码的同时,还能够提高转换效率,从而使得温度计码能够快速输出。It can be seen from the above solution that in the combination logic module 320, the 2 n -1 first logic sub-modules 321 can not only have the same structure, but also the logic implementation of the first logic sub-module 321 is relatively simple, and can effectively deal with high-level codes. The thermometer code can be obtained through combined conversion with the code elements in the low-order code, and at the same time, the conversion efficiency can be improved, so that the thermometer code can be output quickly.
当n=4,即高位码与低位码的位数也均为4时,图9示出了本申请实施例提供的一种组合逻辑模块320的示意性结构框图。When n=4, that is, the number of bits of the high-order code and the low-order code is also 4, FIG. 9 shows a schematic structural block diagram of a combinational logic module 320 provided by the embodiment of the present application.
如图9所示,该组合逻辑模块320用于接收4位高位码High<3:0>以及4位低位码Low<3:0>,且输出16位的温度计码en<15:0>。As shown in FIG. 9 , the combinational logic module 320 is used to receive the 4-bit high-order code High<3:0> and the 4-bit low-order code Low<3:0>, and output the 16-bit thermometer code en<15:0>.
该组合逻辑模块320包括4×4,即16个逻辑子模块,该16个逻辑子模块由15个上述第一逻辑子模块321和1个第二逻辑子模块322组成。The combinational logic module 320 includes 4×4, that is, 16 logic sub-modules, and the 16 logic sub-modules are composed of 15 first logic sub-modules 321 and 1 second logic sub-module 322.
可选地,该第一逻辑子模块321和第二逻辑子模块322可以为逻辑子电路,该15个第一逻辑子电路的电路结构可相同,每个第一逻辑子电路可包括三个输入端Higha、Highb、Lowa以及一个输出端en。1个第二逻辑子电路可以为缓冲门(buffer),用于输出预设码元“0”作为温度计码en<15:0>的第0位码元en0<0>。 Optionally, the first logic sub-module 321 and the second logic sub-module 322 may be logic sub-circuits, the circuit structures of the 15 first logic sub-circuits may be the same, and each first logic sub-circuit may include three inputs. Terminals High a , High b , Low a and an output terminal en. A second logic sub-circuit can be a buffer gate (buffer), used to output the preset symbol "0" as the 0th bit symbol en 0 <0> of the thermometer code en<15:0>.
在15个第一逻辑子模块321中,最下排的3个第一逻辑子模块321可以为上文实施例中的第0组第一逻辑子模块,其用于接收High0和High1,且分别接收Low1至Low3,以输出温度计码en<15:0>的第1位码元en0<1>至第3位码元en0<3>。类似地,倒数第二排的4个第一逻辑子模块321可以为上文实施例中的第一组第一逻辑子模块,其用于接收High1和High2,且分别接收Low0至Low3,以输出温度计码en<15:0>的第4位码元en1<0>至第7位码元en1<3>。第二排的4个第一逻辑子模块321可以为上文实施例中的第二组第一逻辑子模块,其用于接收High2和High3,且分别接收Low0至Low3,以输出温度计码en<15:0>的第8位码元en2<0>至第11位码元en2<3>。第一排的4个第一逻辑子模块321可以为上文实施例中的第三组第一逻辑子模块,其用于接收High3和High4,且分别接收Low0至Low3,以输出温度计码en<15:0>的第12位码元en3<0>至第15位码元en3<3>,其中,High4=0。Among the 15 first logical sub-modules 321, the bottom three first logical sub-modules 321 may be the 0th group of first logical sub-modules in the above embodiment, which are used to receive High 0 and High 1 , And receive Low 1 to Low 3 respectively to output the first code element en 0 <1> to the third code element en 0 <3> of the thermometer code en<15:0>. Similarly, the four first logical sub-modules 321 in the penultimate row may be the first group of first logical sub-modules in the above embodiment, which are used to receive High 1 and High 2 and receive Low 0 to Low respectively. 3 , to output the 4th code element en 1 <0> to the 7th code element en 1 <3> of the thermometer code en<15:0>. The four first logic sub-modules 321 in the second row can be the second group of first logic sub-modules in the above embodiment, which are used to receive High 2 and High 3 and receive Low 0 to Low 3 respectively to output The 8th code element en 2 <0> of the thermometer code en<15:0> to the 11th code element en 2 <3>. The four first logical sub-modules 321 in the first row may be the third group of first logical sub-modules in the above embodiment, which are used to receive High 3 and High 4 and receive Low 0 to Low 3 respectively to output The 12th code element en 3 <0> of the thermometer code en<15:0> to the 15th code element en 3 <3>, where High 4 =0.
作为一种示例,当高位码和低位码中的目标码元为“1”时,图10示出了一种第一逻辑子模块321的示意性逻辑电路图,在该实施例中,第一逻辑子模块321也可以称之为第一逻辑子电路。As an example, when the target symbol in the high-order code and the low-order code is "1", Figure 10 shows a schematic logic circuit diagram of the first logic sub-module 321. In this embodiment, the first logic sub-module 321 The sub-module 321 can also be called the first logic sub-circuit.
如图10所示,在该第一逻辑子电路中,包括三个电路输入端和一个电路输出端,其中,第一电路输入端Higha和第二电路输入端Highb用于输入高位二进制码中的2个码元,第三电路输入端Lowa用于输入低位二进制码中的1个码元,电路输出端en用于输出温度计码中的1个码元。As shown in Figure 10, the first logic sub-circuit includes three circuit input terminals and one circuit output terminal, in which the first circuit input terminal High a and the second circuit input terminal High b are used to input high-bit binary codes 2 symbols in , the third circuit input terminal Low a is used to input 1 symbol in the low binary code, and the circuit output terminal en is used to output 1 symbol in the thermometer code.
第一电路输入端Higha和第三电路输入端Lowa连接于与门and,该与门and的输出端和第二电路输入端Highb连接于或门or输入端,该或门or的输出端连接于电路输出端en。The first circuit input terminal High a and the third circuit input terminal Low a are connected to the AND gate and. The output terminal of the AND gate and and the second circuit input terminal High b are connected to the input terminal of the OR gate or. The output of the OR gate or The terminal is connected to the circuit output terminal en.
作为另一示例,当高位码和低位码中的目标码元为“0”时,图11示出了另一第一逻辑子模块321的示意性逻辑电路图,在该实施例中,第一逻辑子模块321也可以称之为第一逻辑子电路。As another example, when the target symbol in the high-order code and the low-order code is "0", Figure 11 shows a schematic logic circuit diagram of another first logic sub-module 321. In this embodiment, the first logic sub-module 321 The sub-module 321 can also be called the first logic sub-circuit.
如图11所示,在该第一逻辑子电路中,第一电路输入端Higha和第三电路输入端Lowa连接于或门or,该或门or的输出端和第二电路输入端Highb连接于与非门nand的输入端,该非门nand的输出端连接于电路输出端en。As shown in Figure 11, in the first logic sub-circuit, the first circuit input terminal High a and the third circuit input terminal Low a are connected to the OR gate or, and the output terminal of the OR gate or and the second circuit input terminal High b is connected to the input terminal of the NAND gate nand, and the output terminal of the NOT gate nand is connected to the circuit output terminal en.
可选地,如图10和图11所示,该第一逻辑子电路还可以包括:缓冲门buffer。在图10所示实施例中,或门or的输出端可通过该缓冲门buffer连接于电路输出端en。即或门or的输出端连接于缓冲门buffer的输入端,该缓 冲门buffer的输出端连接于电路输出端en。在图11所示实施例中,与非门nand的输出端可通过该缓冲门buffer连接于电路输出端en。即与非门nand的输出端连接于缓冲门buffer的输入端,该缓冲门buffer的输出端连接于电路输出端en。Optionally, as shown in Figures 10 and 11, the first logic sub-circuit may also include: a buffer gate buffer. In the embodiment shown in Figure 10, the output terminal of the OR gate or can be connected to the circuit output terminal en through the buffer gate buffer. That is, the output terminal of the OR gate or is connected to the input terminal of the buffer gate buffer. The output terminal of the door punch buffer is connected to the circuit output terminal en. In the embodiment shown in FIG. 11, the output terminal of the NAND gate nand can be connected to the circuit output terminal en through the buffer gate buffer. That is, the output terminal of the NAND gate nand is connected to the input terminal of the buffer gate buffer, and the output terminal of the buffer gate buffer is connected to the circuit output terminal en.
在上述图10和图11所示实施例中,若该第一逻辑子电路为2n-1个第一逻辑子电路中第i组第一逻辑子电路中的第j个第一逻辑子电路,其第一电路输入端Higha用于输入高位二进制码中的第i位码元,第二电路输入端Highb用于输入高位二进制码中的第i+1位码元,第三电路输入端Lowa用于输入低位二进制码中的第i位码元,电路输出端en用于输出温度计码中的第(i*2n/2+j)位码元。In the above embodiments shown in Figures 10 and 11, if the first logic subcircuit is the jth first logic subcircuit in the ith group of first logic subcircuits among the 2n -1 first logic subcircuits , the first circuit input terminal High a is used to input the i-th symbol in the high-order binary code, the second circuit input terminal High b is used to input the i+1-th symbol in the high-order binary code, and the third circuit input The terminal Low a is used to input the i-th code element in the low-order binary code, and the circuit output terminal en is used to output the (i*2 n/2 +j)-th code element in the thermometer code.
需要说明的是,图10和图11仅作为示意而非限定示出了本申请实施例提供的两种第一逻辑子电路的逻辑电路示意图,除了该图10所示的技术方案以外,第一逻辑子电路还可以通过其它电路结构(例如其它类型的逻辑门)实现,旨在用于将二进制码对应的高位码和低位码转换为温度计码即可。另外,码元的与逻辑、或逻辑和与非逻辑除了直接利用上述图10和图11中所示的与门、或门和与非门以外,还可以通过其它类型的逻辑门实现,本申请实施例对该第一逻辑子电路的具体电路结构不做限定。It should be noted that FIG. 10 and FIG. 11 are only schematic diagrams of the logic circuits of the two first logic sub-circuits provided by the embodiments of the present application. In addition to the technical solution shown in FIG. 10, the first The logic subcircuit can also be implemented through other circuit structures (such as other types of logic gates), and is intended to convert the high-order code and low-order code corresponding to the binary code into a thermometer code. In addition, in addition to directly using the AND gate, OR gate and NAND gate shown in the above-mentioned Figure 10 and Figure 11, the AND logic, OR logic and NAND logic of the code element can also be implemented by other types of logic gates. This application The embodiment does not limit the specific circuit structure of the first logic sub-circuit.
可选地,上述图9中所示的第二逻辑子电路的时延可以与该第一逻辑子电路的时延保持一致。具体地,该第二逻辑子电路的时延可以为信号由第二逻辑子模块的输入端传输至输出端所需要的时间,类似地,该第一逻辑子电路的时延可以为信号由第一逻辑子模块的输入端传输至输出端所需要的时间。Optionally, the delay of the second logic sub-circuit shown in FIG. 9 may be consistent with the delay of the first logic sub-circuit. Specifically, the time delay of the second logic sub-circuit may be the time required for the signal to be transmitted from the input end of the second logic sub-module to the output end. Similarly, the time delay of the first logic sub-circuit may be the time required for the signal to be transmitted from the input end of the second logic sub-module to the output end. The time required to transmit from the input terminal of a logic submodule to the output terminal.
可选地,第二逻辑子电路可包括缓冲门buffer,以使得该第二逻辑子电路输出的第0位温度计码与第一逻辑子电路输出的其它位温度计码的时延保持一致,从而保证该二进制码转温度计码的装置的转换性能。Optionally, the second logic sub-circuit may include a buffer gate buffer, so that the delay of the 0th-bit thermometer code output by the second logic sub-circuit is consistent with that of other bit thermometer codes output by the first logic sub-circuit, thereby ensuring The conversion performance of the device for converting binary code to thermometer code.
可选地,在第一逻辑子电路和第二逻辑子电路均包括缓冲门buffer,且该缓冲门buffer的缓冲时间相同的情况下,该第二逻辑子电路中缓冲门buffer的数量可以大于第一逻辑子电路中缓冲门buffer的数量,或者,在第一逻辑子电路和第二逻辑子电路均有一个缓冲门的情况下,第二逻辑子电路的缓冲门带来的延时时间比第一逻辑子电路的缓冲门带来的延时时间更长。Optionally, in the case where both the first logic subcircuit and the second logic subcircuit include buffer gate buffers, and the buffering time of the buffer gate buffers is the same, the number of buffer gate buffers in the second logic subcircuit may be greater than the number of buffer gate buffers in the second logic subcircuit. The number of buffer gate buffers in a logical subcircuit, or, in the case where both the first logical subcircuit and the second logical subcircuit have a buffer gate, the delay time caused by the buffer gate of the second logical subcircuit is longer than that of the second logical subcircuit. The buffer gate of a logic subcircuit introduces a longer delay time.
在上文实施例的基础上,图12示出了本申请实施例提供的另一二进制 码转温度计码的装置300的示意性结构框图。Based on the above embodiments, Figure 12 shows another binary system provided by the embodiment of the present application. A schematic structural block diagram of a device 300 for converting thermometer codes.
如图12所示,在该装置300中,译码模块310的相关技术方案可以与上文图4所示实施例的技术方案相同,此处不做过多赘述。As shown in Figure 12, in the device 300, the relevant technical solution of the decoding module 310 can be the same as the technical solution of the embodiment shown in Figure 4 above, and will not be described again here.
组合逻辑模块320包括2n/2组第一逻辑子模块和一个第二逻辑子模块322。在该2n/2组第一逻辑子模块中,除第0组第一逻辑子模块以外,其它每组第一逻辑子模块包括2n/2个第一逻辑子模块321,第0组第一逻辑子模块包括2n/2-1个第一逻辑子模块321。The combinational logic module 320 includes 2 n/2 groups of first logic sub-modules and one second logic sub-module 322 . In the 2 n/2 groups of first logical sub-modules, except for the 0th group of first logical sub-modules, each other group of first logical sub-modules includes 2 n/2 first logical sub-modules 321, and the 0th group of first logical sub-modules A logical sub-module includes 2 n/2 -1 first logical sub-modules 321 .
第二逻辑子模块322用于输出第0位温度计码en0<0>。第0组第一逻辑子模块用于输出第0组温度计码en0<2n/2-1:1>,第1组第一逻辑子模块用于输出第1组温度计码en1<2n/2-1:0>,依次类推,第2n/2-1组第一逻辑子模块用于输出第2n/2-1组温度计码en2 n/2 -1<2n/2-1:0>。将该多组温度计码由第0组依次排列至第2n/2-1组,且结合第0位温度计码en0<0>,即可得到2n位的温度计码en<2n-1:0>。The second logic sub-module 322 is used to output the 0th thermometer code en 0 <0>. The first logical submodule of group 0 is used to output the thermometer code of group 0 en 0 <2 n/2 -1:1>, and the first logical submodule of group 1 is used to output the thermometer code of group 1 en 1 <2 n /2 -1:0>, and so on, the 2 n/2 -1 group of first logical submodules are used to output the 2 n/2 -1 group of thermometer codes en 2 n/ 2 -1 < 2 n/2 - 1:0>. Arrange the multiple groups of thermometer codes from the 0th group to the 2n /2 -1 group in sequence, and combine them with the 0th thermometer code en 0 <0> to obtain a 2 n -digit thermometer code en<2 n -1 :0>.
在n=4的情况下,译码模块310用于输入4比特位的二进制码,通过译码模块310转换后分别得到4比特位的高位码和4比特位的低位码,该高位码和低位码通过组合逻辑模块320转换后,得到16比特位的温度计码。In the case of n=4, the decoding module 310 is used to input a 4-bit binary code. After conversion by the decoding module 310, a 4-bit high-order code and a 4-bit low-order code are obtained respectively. The high-order code and the low-order code are obtained respectively. After the code is converted by the combinational logic module 320, a 16-bit thermometer code is obtained.
在译码模块310转换得到的高位码和低位码中目标码元为“1”,非目标码元为“0”的情况下,下面表2示出了一种通过本申请实施例的装置300实现的4位二进制码(B<3:0>)转16位温度计码(en<15:0>)的真值表,其中,Dec表示十进制码。In the case where the target symbol is “1” and the non-target symbol is “0” in the high-bit code and low-bit code converted by the decoding module 310, Table 2 below shows a device 300 according to the embodiment of the present application. The implemented truth table from 4-bit binary code (B<3:0>) to 16-bit thermometer code (en<15:0>), where Dec represents the decimal code.
表2

Table 2

在译码模块310转换得到的高位码和低位码中目标码元为“0”,非目标码元为“1”的情况下,在上述表2所示的真值表中,除了High<3:0>与Low<3:0>的值取反以外,其它值不变。In the case where the target symbol is "0" and the non-target symbol is "1" in the high-bit code and low-bit code converted by the decoding module 310, in the truth table shown in the above Table 2, except for High<3 Except for the inversion of :0> and Low<3:0>, other values remain unchanged.
通过上文实施例的技术方案,提供了一种二进制码转温度计码的装置300,该装置300的电路结构简单清晰,功耗较低。且该装置300可实现每个码元的延迟时间一致且短,从而在高速数据传输中保证数据传输的同步正确接收。当二进制码的传输速度较快时,该装置300可将二进制码快速且准确转换为温度计码来使用,且转换速度能够跟踪上输入的二进制码的速度。进一步地,本申请实施例的装置300由于电路结构简单,仅包含译码模块和组合逻辑模块两层逻辑电路,在版图绘制时,可避免复杂的版图走线(例如避免交叉走线),同时也减小了寄生和面积。Through the technical solution of the above embodiment, a device 300 for converting a binary code into a thermometer code is provided. The circuit structure of the device 300 is simple and clear, and the power consumption is low. Moreover, the device 300 can achieve a consistent and short delay time for each symbol, thereby ensuring synchronous and correct reception of data transmission during high-speed data transmission. When the transmission speed of the binary code is fast, the device 300 can quickly and accurately convert the binary code into a thermometer code for use, and the conversion speed can track the speed of the input binary code. Furthermore, due to the simple circuit structure of the device 300 in the embodiment of the present application, it only includes two layers of logic circuits, the decoding module and the combinational logic module. When drawing the layout, complex layout wiring (such as avoiding cross wiring) can be avoided. At the same time, It also reduces parasitism and area.
另外,通过该装置300转换得到的温度计码可用于输入控制模块,以使得该控制模块根据该温度计码实现控制功能。In addition, the thermometer code converted by the device 300 can be used to input the control module, so that the control module implements the control function according to the thermometer code.
作为示例,该控制模块可包括开关阵列,该温度计码中的每一个码元可用于控制该开关阵列中的一个开关。每个开关控制的单元权重是一致的,例如码元“1”可指示开关打开,码元“0”可指示开关关闭。仅需通过控制温度计码中码元“1”的个数即可控制开关阵列中打开开关的数量。As an example, the control module may include a switch array, and each symbol in the thermometer code may be used to control a switch in the switch array. The weight of the unit controlled by each switch is consistent. For example, the symbol "1" can indicate that the switch is on, and the symbol "0" can indicate that the switch is off. The number of open switches in the switch array can be controlled only by controlling the number of code elements "1" in the thermometer code.
通过该温度计码控制控制模块,不仅保证了控制方式的方便和准确实现,同时实现了线性度和单调性俱佳的控制调节功能。Through the thermometer code control module, it not only ensures the convenient and accurate implementation of the control method, but also achieves control and adjustment functions with excellent linearity and monotonicity.
本申请还提供一种电子设备,该电子设备可包括上述控制模块以及如上述任一实施例中的二进制码转温度计码的装置300,该装置300用于将n位二进制码转换为对应的温度计码,控制模块用于接收温度计码且根据温度计码实现控制功能。 This application also provides an electronic device. The electronic device may include the above control module and the device 300 for converting a binary code to a thermometer code as in any of the above embodiments. The device 300 is used to convert an n-bit binary code into a corresponding thermometer code. code, the control module is used to receive the thermometer code and implement control functions based on the thermometer code.
在一些实施方式中,电子设备可包括LC振荡电路,控制模块包括2n个开关组成的开关阵列,开关阵列中的每个开关连接于LC振荡电路中的一个电容,该开关阵列用于接收温度计码且根据温度计码控制LC振荡电路中处于工作状态的电容的数量。In some embodiments, the electronic device may include an LC oscillation circuit. The control module includes a switch array composed of 2 n switches. Each switch in the switch array is connected to a capacitor in the LC oscillation circuit. The switch array is used to receive a thermometer. The code controls the number of working capacitors in the LC oscillation circuit according to the thermometer code.
具体地,LC振荡电路可包括2n个电容,该2n个电容的电容值相同,且该2n个电容与开关阵列中的2n个一一对应。温度计码中的每一位码元用于控制开关阵列中的一个开关,当该开关闭合时,与该开关连接的电容连接入LC振荡电路,其作为工作电容产生振荡,反之,当该开关断开时,与该开关连接的电容与LC振荡电路断开,其不作为LC振荡电路的工作电容。Specifically, the LC oscillation circuit may include 2 n capacitors, the 2 n capacitors have the same capacitance value, and the 2 n capacitors correspond to the 2 n capacitors in the switch array in a one-to-one manner. Each code element in the thermometer code is used to control a switch in the switch array. When the switch is closed, the capacitor connected to the switch is connected to the LC oscillation circuit, which acts as a working capacitor to generate oscillation. On the contrary, when the switch is open, the capacitor connected to the switch is connected to the LC oscillation circuit. When it is on, the capacitor connected to the switch is disconnected from the LC oscillation circuit and does not serve as the working capacitor of the LC oscillation circuit.
通过该实施方式的技术方案,控制模块与二进制码转温度计码的装置300的相互配合,可实现对LC振荡电路中电容的线性和单调性控制,从而保证LC振荡电路的增益的线性度以提升LC振荡电路的整体性能。Through the technical solution of this embodiment, the cooperation between the control module and the device 300 for converting binary codes to thermometer codes can realize linear and monotonic control of the capacitance in the LC oscillation circuit, thereby ensuring the linearity of the gain of the LC oscillation circuit to improve Overall performance of LC oscillator circuit.
除了上述LC振荡电路以外,本申请实施例提供的控制模块和二进制码转温度计码的装置300还可以适用于其它温度计码适用的控制场景,本申请实施例对此不做具体限定。In addition to the above-mentioned LC oscillator circuit, the control module and the device 300 for converting binary codes to thermometer codes provided by the embodiments of the present application can also be applied to other control scenarios applicable to thermometer codes, which are not specifically limited in the embodiments of the present application.
应理解,本申请实施例中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围。It should be understood that the specific examples in the embodiments of the present application are only to help those skilled in the art better understand the embodiments of the present application, but are not intended to limit the scope of the embodiments of the present application.
例如,在上述具体实施方式中所描述的各个具体技术特征,在不矛盾的情况下,可以通过任何合适的方式进行组合,为了避免不必要的重复,本申请对各种可能的组合方式不再另行说明。For example, each specific technical feature described in the above-mentioned specific embodiments can be combined in any suitable way without conflict. In order to avoid unnecessary repetition, this application will no longer describe various possible combinations. Specify otherwise.
又例如,本申请的各种不同的实施方式之间也可以进行任意组合,只要其不违背本申请的思想,其同样应当视为本申请所公开的内容。For another example, any combination of various embodiments of the present application can be carried out. As long as they do not violate the idea of the present application, they should also be regarded as the contents disclosed in the present application.
应理解,在本申请实施例和所附权利要求书中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请实施例。例如,在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“上述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。It should be understood that the terminology used in the embodiments of the present application and the appended claims is for the purpose of describing particular embodiments only and is not intended to limit the embodiments of the present application. For example, as used in the embodiments and the appended claims, the singular forms "a," "above," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用 来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the units of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. In order to clearly illustrate the interchangeability of hardware and software In the above description, the composition and steps of each example have been generally described according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians are available for each specific application Different methods may be used to implement the described functionality, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或模块的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed systems and devices can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling or direct coupling or communication connection between each other shown or discussed may be indirect coupling or communication connection through some interfaces, devices or modules, or may be electrical, mechanical or other forms of connection.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。 The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of various equivalent methods within the technical scope disclosed in the present application. Modification or replacement, these modifications or replacements shall be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (19)

  1. 一种二进制码转温度计码的装置,其特征在于,包括:A device for converting binary codes into thermometer codes, which is characterized by including:
    译码模块,用于将n位二进制码中高n/2位的高位二进制码转换为2n/2位的高位码,且将所述n位二进制码中低n/2位的低位二进制码转换为2n/2位的低位码,其中,所述高位码中目标码元的数量与所述高位二进制码的值相关,所述低位码中目标码元的数量与所述低位二进制码的值相关,所述目标码元为0或1,n为正偶数;Decoding module, used to convert the high n/2 bits of the n-bit binary code into a 2 n/2 bit high-bit code, and convert the n/2 bits of the n-bit binary code into the low-bit binary code. is a low-order code of 2 n/2 bits, wherein the number of target symbols in the high-order code is related to the value of the high-order binary code, and the number of target symbols in the low-order code is related to the value of the low-order binary code Relevant, the target symbol is 0 or 1, n is a positive even number;
    组合逻辑模块,包括多个逻辑子模块,所述多个逻辑子模块的时延相同,且所述多个逻辑子模块用于将所述高位码中的码元和所述低位码中的码元组合,以得到所述n位二进制码对应的温度计码。A combinational logic module includes a plurality of logic sub-modules, the plurality of logic sub-modules have the same delay, and the plurality of logic sub-modules are used to combine the symbols in the high-order code and the codes in the low-order code. Elements are combined to obtain the thermometer code corresponding to the n-bit binary code.
  2. 根据权利要求1所述的装置,其特征在于,所述高位码中目标码元的数量与所述高位二进制码的值相关包括:所述高位码中第0位至第u位为所述目标码元,所述高位码中除所述第0位至第u位以外的其它位为非目标码元,其中,u为所述高位二进制码的值,0≤u≤2n/2-1;The device according to claim 1, wherein the correlation between the number of target symbols in the high-order code and the value of the high-order binary code includes: the 0th to uth bits in the high-order code are the target Code element, the other bits in the high-order code except the 0th to u-th bits are non-target code elements, where u is the value of the high-order binary code, 0≤u≤2 n/2 -1 ;
    所述低位码中目标码元的数量与所述低位二进制码的值相关包括:所述低位码中第0位至第v位为所述目标码元,所述低位码中除所述第0位至第v位以外的其它位为非目标码元,其中,v为所述低位二进制码的值,0≤v≤2n/2-1;The number of target code elements in the low-order code is related to the value of the low-order binary code: the 0th to v-th bits in the low-order code are the target code elements, and the low-order code except the 0th Bits other than the v-th bit are non-target code elements, where v is the value of the low-order binary code, 0≤v≤2 n/2 -1;
    在所述目标码元为1时,所述非目标码元为0,或者,在所述目标码元为0时,所述非目标码元为1。When the target symbol is 1, the non-target symbol is 0, or when the target symbol is 0, the non-target symbol is 1.
  3. 根据权利要求2所述的装置,其特征在于,所述译码模块包括多个相同的译码子模块,所述多个相同的译码子模块用于对所述高位二进制码和所述低位二进制码进行转换以得到所述高位码和所述低位码。The device according to claim 2, characterized in that the decoding module includes a plurality of identical decoding sub-modules, and the plurality of identical decoding sub-modules are used to compare the high-order binary code and the low-order binary code. The binary code is converted to obtain the high-order code and the low-order code.
  4. 根据权利要求3所述的装置,其特征在于,所述译码模块包括两个相同的译码子模块,所述两个相同的译码子模块中第一译码子模块用于对所述高位二进制码进行转换以得到所述高位码,所述两个相同的译码子模块中第二译码子模块用于对所述低位二进制码进行转换以得到所述低位码。The device according to claim 3, characterized in that the decoding module includes two identical decoding sub-modules, and the first decoding sub-module of the two identical decoding sub-modules is used to The high-order binary code is converted to obtain the high-order code, and the second decoding sub-module of the two identical decoding sub-modules is used to convert the low-order binary code to obtain the low-order code.
  5. 根据权利要求1至4中任一项所述的装置,其特征在于,所述多个逻辑子模块包括:2n-1个第一逻辑子模块和一个第二逻辑子模块,所述一个第二逻辑子模块用于将所述温度计码中的第0位码元输出为预设码元,所述2n-1个第一逻辑子模块相同,且用于将所述高位码中的码元和所述低位码中 的码元组合以输出所述温度计码中第1位码元至第2n-1位码元。The device according to any one of claims 1 to 4, characterized in that the plurality of logical sub-modules include: 2 n -1 first logical sub-modules and a second logical sub-module, and the first logical sub-module The two logical sub-modules are used to output the 0th bit symbol in the thermometer code as a preset symbol. The 2 n -1 first logical sub-modules are the same and are used to output the code element in the high-order code. Yuan and the low bit code The code elements are combined to output the 1st code element to the 2n -1th code element in the thermometer code.
  6. 根据权利要求5所述的装置,其特征在于,所述2n-1个第一逻辑子模块包括2n/2组第一逻辑子模块,其中,第i组第一逻辑子模块中的每个第一逻辑子模块用于根据所述高位码中的第i位码元与所述低位码中的多位码元得到多个中间结果,且根据所述多个中间结果与所述高位码中的第i+1位码元得到所述温度计码中的多位码元,其中,0≤i≤2n/2-1,i为整数。The device according to claim 5, characterized in that the 2 n -1 first logical sub-modules include 2 n/2 groups of first logical sub-modules, wherein each of the i-th group of first logical sub-modules A first logical sub-module is used to obtain a plurality of intermediate results according to the i-th symbol in the high-order code and the multi-bit symbols in the low-order code, and according to the multiple intermediate results and the high-order code The i+1th bit symbol in obtains the multi-bit symbol in the thermometer code, where 0≤i≤2 n/2 -1, i is an integer.
  7. 根据权利要求6所述的装置,其特征在于,在0<i≤2n/2-1的情况下,所述第i组第一逻辑子模块包括2n/2个第一逻辑子模块,在i=0的情况下,所述第i组第一逻辑子模块包括2n/2-1个第一逻辑子模块;The device according to claim 6, wherein when 0<i≤2 n/2 -1, the i-th group of first logical sub-modules includes 2 n/2 first logical sub-modules, In the case of i=0, the i-th group of first logical sub-modules includes 2 n/2 -1 first logical sub-modules;
    其中,所述第i组第一逻辑子模块中的第j个第一逻辑子模块用于根据所述高位码中的第i位码元与所述低位码中的第j位码元得到所述多个中间结果中的第j个中间结果,且根据所述第j个中间结果与所述高位码中的第i+1位码元得到所述温度计码中的第(i*2n/2+j)位码元,其中,在0<i≤2n/2-1的情况下,0≤j≤2n/2-1,在i=0的情况下,0<j≤2n/2-1,j为整数。Wherein, the j-th first logical sub-module in the i-th group of first logical sub-modules is used to obtain the j-th bit symbol in the high-order code and the j-th bit symbol in the low-order code. The j-th intermediate result among the plurality of intermediate results is obtained, and the (i*2 n/ 2 +j) bit symbol, where, when 0<i≤2 n/2 -1, 0≤j≤2 n/2 -1, when i=0, 0<j≤2 n /2 -1, j is an integer.
  8. 根据权利要求7所述的装置,其特征在于,所述目标码元为1,非目标码元为0;The device according to claim 7, characterized in that the target symbol is 1 and the non-target symbol is 0;
    所述第j个第一逻辑子模块用于将所述高位码中的第i位码元与所述低位码中的第j位码元执行与逻辑得到所述第j个中间结果,且将所述第j个中间结果与所述高位码中的第i+1位码元执行或逻辑得到所述温度计码中的第(i*2n/2+j)位码元。The jth first logic sub-module is used to perform AND logic on the i-th symbol in the high-order code and the j-th symbol in the low-order code to obtain the jth intermediate result, and The jth intermediate result and the i+1th bit symbol in the high-order code are ORed to obtain the (i*2 n/2 +j)th bit symbol in the thermometer code.
  9. 根据权利要求7所述的装置,其特征在于,所述目标码元为0,非目标码元为1;The device according to claim 7, wherein the target symbol is 0 and the non-target symbol is 1;
    所述第j个第一逻辑子模块用于将所述高位码中的第i位码元与所述低位码中的第j位码元执行或逻辑得到所述第j个中间结果,且将所述第j个中间结果与所述高位码中的第i+1位码元执行与非逻辑得到所述温度计码中的第(i*2n/2+j)位码元。The jth first logic sub-module is used to perform OR logic on the i-th symbol in the high-order code and the j-th symbol in the low-order code to obtain the jth intermediate result, and The jth intermediate result and the i+1th bit symbol in the high-order code perform NAND logic to obtain the (i*2 n/2 +j)th bit symbol in the thermometer code.
  10. 根据权利要求1至9中任一项所述的装置,其特征在于,所述译码模块和/或所述组合逻辑模块为包括逻辑门的逻辑电路。The device according to any one of claims 1 to 9, characterized in that the decoding module and/or the combinational logic module is a logic circuit including logic gates.
  11. 根据权利要求10所述的装置,其特征在于,所述译码模块包括译码器电路,所述译码器电路中任一输入端至与所述输入端相连的任一输出端之间的逻辑门数量相同。 The device according to claim 10, characterized in that the decoding module includes a decoder circuit, and the distance between any input terminal in the decoder circuit and any output terminal connected to the input terminal is The number of logic gates is the same.
  12. 根据权利要求10或11所述的装置,其特征在于,所述译码模块包括两个结构相同的译码器电路,在n=4的情况下,所述译码器电路包括两个电路输入端和四个电路输出端,所述两个电路输入端用于输入2位的高位二进制码或低位二进制码,所述四个电路输出端用于输出4位的高位码或低位码;The device according to claim 10 or 11, characterized in that the decoding module includes two decoder circuits with the same structure. When n=4, the decoder circuit includes two circuit inputs. terminals and four circuit output terminals, the two circuit input terminals are used to input a 2-bit high-order binary code or a low-order binary code, and the four circuit output terminals are used to output a 4-bit high-order binary code or low-order code;
    所述四个电路输出端中第一电路输出端连接于缓冲门,用于输出所述高位码或低位码中第零位预设码元;The first circuit output terminal among the four circuit output terminals is connected to the buffer gate and is used to output the zeroth preset symbol in the high-order code or the low-order code;
    所述两个电路输入端中的第一电路输入端和第二电路输入端连接于或非门的输入端,所述或非门的输出端连接于第一非门的输入端,所述第一非门的输出端连接于所述四个电路输出端中的第二电路输出端,用于输出所述高位码或低位码中第一位码元;The first circuit input terminal and the second circuit input terminal among the two circuit input terminals are connected to the input terminal of the NOR gate, the output terminal of the NOR gate is connected to the input terminal of the first NOT gate, and the third circuit input terminal is connected to the input terminal of the NOR gate. The output terminal of a NOT gate is connected to the second circuit output terminal among the four circuit output terminals, and is used to output the first symbol of the high-order code or the low-order code;
    所述两个电路输入端中的第二电路输入端连接于第二非门的输入端,所述第二非门的输出端连接于第三非门的输入端,所述第三非门的输出端连接于所述四个电路输出端中的第三电路输出端,用于输出所述高位码或低位码中第二位码元;The second circuit input terminal among the two circuit input terminals is connected to the input terminal of the second NOT gate, the output terminal of the second NOT gate is connected to the input terminal of the third NOT gate, and the third NOT gate The output terminal is connected to the third circuit output terminal among the four circuit output terminals, and is used for outputting the second code element of the high-order code or the low-order code;
    所述两个电路输入端中的第一电路输入端和第二电路输入端连接于与非门的输入端,所述与非门的输出端连接于第四非门的输入端,所述第四非门的输出端连接于所述四个电路输出端中的第四电路输出端,用于输出所述高位码或低位码中第三位码元。The first circuit input terminal and the second circuit input terminal among the two circuit input terminals are connected to the input terminal of the NAND gate, the output terminal of the NAND gate is connected to the input terminal of the fourth NOT gate, and the third circuit input terminal is connected to the input terminal of the NAND gate. The output terminal of the four NOT gate is connected to the fourth circuit output terminal among the four circuit output terminals, and is used for outputting the third code element of the high-order code or the low-order code.
  13. 根据权利要求10至12中任一项所述的装置,其特征在于,所述组合逻辑模块包括:组合逻辑电路,所述组合逻辑电路包括2n-1个第一逻辑子电路和一个第二逻辑子电路,所述一个第二逻辑子电路用于将所述温度计码中的第0位码元输出为预设码元,所述2n-1个第一逻辑子电路的电路相同,且用于将所述高位码中的码元和所述低位码中的码元组合以输出所述温度计码中第1位码元至第2n-1位码元。The device according to any one of claims 10 to 12, characterized in that the combinational logic module includes: a combinational logic circuit, the combinational logic circuit includes 2 n -1 first logic sub-circuits and a second Logic sub-circuit, the one second logic sub-circuit is used to output the 0th bit symbol in the thermometer code as a preset symbol, the circuits of the 2 n -1 first logic sub-circuits are the same, and Used to combine the symbol elements in the high-order code and the symbol elements in the low-order code to output the 1st to 2n -1th symbol elements in the thermometer code.
  14. 根据权利要求13所述的装置,其特征在于,所述2n-1个第一逻辑子电路中任一第一逻辑子电路的时延和所述一个第二逻辑子电路的时延相同。The device according to claim 13, wherein the delay of any one of the 2 n -1 first logic sub-circuits is the same as the delay of the one second logic sub-circuit.
  15. 根据权利要求13或14所述的装置,其特征在于,所述第一逻辑子电路包括三个电路输入端和一个电路输出端,所述三个电路输入端中的第一电路输入端和第二电路输入端用于输入所述高位二进制码中的2个码元,所 述三个电路输入端中的第三电路输入端用于输入所述低位二进制码中的1个码元,所述电路输出端用于输出所述温度计码中的1个码元;The device according to claim 13 or 14, characterized in that the first logic sub-circuit includes three circuit input terminals and one circuit output terminal, and the first circuit input terminal and the third circuit input terminal among the three circuit input terminals The input terminal of the second circuit is used to input the 2 symbols in the high-order binary code, so The third circuit input terminal among the three circuit input terminals is used to input 1 symbol in the low-order binary code, and the circuit output terminal is used to output 1 symbol in the thermometer code;
    在所述目标码元为1的情况下,所述第一电路输入端和所述第三电路输入端连接于与门的输入端,所述与门的输出端和所述第二电路输入端连接于或门的输入端,所述或门的输出端连接于所述电路输出端,或者,When the target symbol is 1, the first circuit input terminal and the third circuit input terminal are connected to the input terminal of the AND gate, and the output terminal of the AND gate and the second circuit input terminal Connected to the input end of the OR gate, the output end of the OR gate is connected to the output end of the circuit, or,
    在所述目标码元为0的情况下,所述第一电路输入端和所述第三电路输入端连接于或门的输入端,所述或门的输出端和所述第二电路输入端连接于与非门的输入端,所述与非门的输出端连接于所述电路输出端。When the target symbol is 0, the first circuit input terminal and the third circuit input terminal are connected to the input terminal of the OR gate, and the output terminal of the OR gate and the second circuit input terminal Connected to the input terminal of the NAND gate, the output terminal of the NAND gate is connected to the output terminal of the circuit.
  16. 根据权利要求1至15中任一项所述的装置,其特征在于,所述译码模块和/或所述组合逻辑模块为数字芯片中的功能模块。The device according to any one of claims 1 to 15, characterized in that the decoding module and/or the combinational logic module are functional modules in a digital chip.
  17. 根据权利要求1至16中任一项所述的装置,其特征在于,所述温度计码用于输入控制模块,以使得所述控制模块根据所述温度计码实现控制功能。The device according to any one of claims 1 to 16, wherein the thermometer code is used to input into a control module, so that the control module implements a control function according to the thermometer code.
  18. 一种电子设备,其特征在于,包括:控制模块,以及An electronic device, characterized by including: a control module, and
    如权利要求1至17中任一项所述的装置,所述装置用于将n位二进制码转换为对应的温度计码,所述控制模块用于接收所述温度计码且根据所述温度计码实现控制功能。The device according to any one of claims 1 to 17, the device is used to convert an n-bit binary code into a corresponding thermometer code, and the control module is used to receive the thermometer code and implement the thermometer code according to the thermometer code. control function.
  19. 根据权利要求18所述的电子设备,其特征在于,所述电子设备包括LC振荡电路,所述LC振荡电路包括2n个电容值相同的电容,所述控制模块包括由2n个开关组成的开关阵列,所述开关阵列中的每个开关连接于所述LC振荡电路中的一个电容,所述开关阵列用于接收所述温度计码且根据所述温度计码控制所述LC振荡电路中处于工作状态的电容的数量。 The electronic device according to claim 18, characterized in that the electronic device includes an LC oscillation circuit, the LC oscillation circuit includes 2 n capacitors with the same capacitance value, and the control module includes a switch composed of 2 n switches. A switch array, each switch in the switch array is connected to a capacitor in the LC oscillation circuit, the switch array is used to receive the thermometer code and control the operation of the LC oscillation circuit according to the thermometer code. The number of capacitors in the state.
PCT/CN2023/077541 2022-08-26 2023-02-22 Apparatus for converting binary code into thermometer code, and electronic device WO2024040892A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211032712.2A CN115102553B (en) 2022-08-26 2022-08-26 Device for converting binary code into thermometer code and electronic equipment
CN202211032712.2 2022-08-26

Publications (1)

Publication Number Publication Date
WO2024040892A1 true WO2024040892A1 (en) 2024-02-29

Family

ID=83301644

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/077541 WO2024040892A1 (en) 2022-08-26 2023-02-22 Apparatus for converting binary code into thermometer code, and electronic device

Country Status (2)

Country Link
CN (1) CN115102553B (en)
WO (1) WO2024040892A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115102553B (en) * 2022-08-26 2022-12-23 深圳市汇顶科技股份有限公司 Device for converting binary code into thermometer code and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103078645A (en) * 2012-12-27 2013-05-01 中国科学院微电子研究所 Macrocell and method and circuit for decoding binary codes into thermometer codes
CN111256849A (en) * 2020-02-24 2020-06-09 苏州迅芯微电子有限公司 Thermometer decoding structure applied to high-speed DAC circuit
CN113114264A (en) * 2020-01-10 2021-07-13 炬芯科技股份有限公司 Thermometer decoding method and circuit
CN115102553A (en) * 2022-08-26 2022-09-23 深圳市汇顶科技股份有限公司 Device for converting binary code into thermometer code and electronic equipment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101373957B (en) * 2007-08-24 2010-08-25 锐迪科创微电子(北京)有限公司 Digital gain control method and circuit
CN101420229A (en) * 2007-10-24 2009-04-29 中国科学院半导体研究所 High speed digital to analog converter
CN102006066B (en) * 2009-09-02 2012-06-27 中国科学院微电子研究所 ROM-less DDS circuit structure
CN105099458B (en) * 2014-05-09 2018-06-29 中芯国际集成电路制造(上海)有限公司 Thermometer decoder
US10341145B2 (en) * 2015-03-03 2019-07-02 Intel Corporation Low power high speed receiver with reduced decision feedback equalizer samplers
CN105207675B (en) * 2015-10-21 2018-10-02 昆腾微电子股份有限公司 Coding, code translator and method for digital analog converter
CN105634451B (en) * 2015-12-29 2018-08-28 龙迅半导体(合肥)股份有限公司 A kind of data clock recovery circuit and its phase interpolator
CN110034761B (en) * 2019-03-29 2020-10-27 西安交通大学 Coding circuit for converting digital output of voltage-controlled oscillator type analog-to-digital converter into binary code
CN114595658A (en) * 2022-03-07 2022-06-07 中国科学院微电子研究所 Design method of row decoding circuit and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103078645A (en) * 2012-12-27 2013-05-01 中国科学院微电子研究所 Macrocell and method and circuit for decoding binary codes into thermometer codes
CN113114264A (en) * 2020-01-10 2021-07-13 炬芯科技股份有限公司 Thermometer decoding method and circuit
CN111256849A (en) * 2020-02-24 2020-06-09 苏州迅芯微电子有限公司 Thermometer decoding structure applied to high-speed DAC circuit
CN115102553A (en) * 2022-08-26 2022-09-23 深圳市汇顶科技股份有限公司 Device for converting binary code into thermometer code and electronic equipment

Also Published As

Publication number Publication date
CN115102553A (en) 2022-09-23
CN115102553B (en) 2022-12-23

Similar Documents

Publication Publication Date Title
WO2024040892A1 (en) Apparatus for converting binary code into thermometer code, and electronic device
JPH0428180B2 (en)
US6738795B1 (en) Self-timed transmission system and method for processing multiple data sets
CN112671414B (en) Novel parallel-serial conversion circuit
JP2003513582A (en) Gray code counter with binary incrementer and method of operating the same
US20080238480A1 (en) Reversible sequential apparatuses
US7843374B2 (en) Priority encoder
De Vos Reversible computer hardware
CN107517055B (en) Design method of CMOS digital logic circuit
CN109104195A (en) A kind of D/A converting circuit, its application method and display device
JP2580325B2 (en) Data transmission system, data output circuit and data input circuit
Ghafari et al. A new high-speed and low area efficient pipelined 128-bit adder based on modified carry look-ahead merging with Han-Carlson tree method
Soundharya et al. GDI based area delay power efficient carry select adder
US6816098B2 (en) High-speed oversampling modulator device
CN220273668U (en) Circuit for converting parallel signal into serial signal
Shirmohammadi et al. ST-CAC: A low-cost crosstalk avoidance coding mechanism based on three-valued numerical system
US7277909B2 (en) High speed adder
KR19990055984A (en) Serial data rate converter
JPH10154066A (en) N-bit comparator
CN217034731U (en) Selection controller, arithmetic circuit and chip
Lewis et al. Transforming bit-serial communication circuits into fast parallel VLSI implementations
US11239633B2 (en) Photonic transmitter drivers with logic using cascaded differential transistor pairs stepped by supply voltage differences
US3652840A (en) Apparatus for converting numbers between positive and negative radices
CN106877872B (en) Control device and coding method of current steering digital-to-analog converter
KR20070069288A (en) Circuit for converting gray code

Legal Events

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

Ref document number: 23855989

Country of ref document: EP

Kind code of ref document: A1