WO2022150939A1 - 用于差分输出电压的模数转换器以及模数转换方法 - Google Patents

用于差分输出电压的模数转换器以及模数转换方法 Download PDF

Info

Publication number
WO2022150939A1
WO2022150939A1 PCT/CN2021/071169 CN2021071169W WO2022150939A1 WO 2022150939 A1 WO2022150939 A1 WO 2022150939A1 CN 2021071169 W CN2021071169 W CN 2021071169W WO 2022150939 A1 WO2022150939 A1 WO 2022150939A1
Authority
WO
WIPO (PCT)
Prior art keywords
voltage
differential
differential voltage
analog
digital
Prior art date
Application number
PCT/CN2021/071169
Other languages
English (en)
French (fr)
Inventor
许振隆
Original Assignee
尼奥耐克索斯有限私人贸易公司
燕博南
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 尼奥耐克索斯有限私人贸易公司, 燕博南 filed Critical 尼奥耐克索斯有限私人贸易公司
Priority to CN202180000304.6A priority Critical patent/CN112913144B/zh
Priority to PCT/CN2021/071169 priority patent/WO2022150939A1/zh
Publication of WO2022150939A1 publication Critical patent/WO2022150939A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/12Analogue/digital converters
    • H03M1/34Analogue value compared with reference values

Definitions

  • the present invention generally relates to the field of integrated circuits, and in particular, to an analog-to-digital converter for differential output voltage. Furthermore, the present invention also relates to an analog-to-digital conversion method for differential output voltages.
  • An analog-to-digital converter is an electrical device that converts an analog voltage into a digital signal.
  • analog-to-digital converters can achieve higher conversion precision (or conversion bits), such as 16 bits or higher.
  • conversion precision or conversion bits
  • problems such as poor conversion accuracy and slow speed may occur.
  • the task of the present invention is to provide an analog-to-digital converter and an analog-to-digital conversion method for differential output voltages, by means of which the conversion accuracy can be significantly improved.
  • this task is solved by an analog-to-digital converter for a differential output voltage, wherein the differential output voltage comprises a first differential voltage and a second differential voltage, the analog-to-digital converter comprising :
  • a first analog-to-digital conversion unit configured to convert the first differential voltage into a first digital value
  • a second analog-to-digital conversion unit configured to convert the second differential voltage into a second digital value
  • a control unit configured to perform the following actions:
  • the output digital value is generated according to the second digital value and a comparison result between the absolute value of the first differential voltage and the second differential voltage when the absolute value of the first differential voltage is smaller than the absolute value of the second differential voltage.
  • the term "differential voltage” or “differential input/output voltage” refers to a signal output/output method in which the difference between the voltages of two voltage input/output terminals is used as an output signal.
  • the voltages of the two voltage input/output terminals may be represented as "V+” and "V-", but their signs may be the same or different, such as both positive voltages or both negative voltages or one positive and one negative.
  • the first analog-to-digital conversion unit and/or the second analog-to-digital conversion unit includes:
  • a reference voltage which is configured to provide a corresponding reference voltage for the comparator
  • 2n-1-1 comparators configured to compare the first or second differential voltage with a corresponding reference voltage, respectively, to generate 2n-1-1 comparison results, where n is the conversion accuracy and n is an integer greater than 1;
  • a decoder configured to convert the 2n-1-1 comparison results into an n-1-bit binary result, wherein the n-1-bit binary result serves as bits 1 to n-1 of the output digital value , and the nth bit is determined according to the comparison result between the absolute value of the first differential voltage and the second differential voltage.
  • the preferred solution also has the advantage that the converter composed of the parallel comparator does not contain or contains less capacitance, and is not prone to crosstalk with the capacitance in the device providing the differential voltage, thereby reducing failure or interference. possibility. It should be noted, however, that other types of converters are also contemplated under the teachings of the present invention.
  • control unit includes:
  • a comparator configured to compare the absolute value of the first differential voltage with the absolute value of the second differential voltage to generate a differential voltage comparison result
  • a strobe configured to output the first digital value of the first analog-to-digital conversion unit or the second digital value of the second analog-to-digital conversion unit as bits other than the most significant bit of the output digital value according to the differential voltage comparison result, wherein The differential voltage comparison result is used as the most significant bit of the output digital value.
  • the functions of the controller can be implemented with fewer components.
  • the decoder is a thermometer code to binary code converter.
  • the thermometer code refers to a numerical value represented by the number of "1", for example, the thermometer code "01111111” contains 7 "1", so it represents 7 or binary "0111".
  • the differential output voltage is a differential output voltage of an integrated storage and computing memory.
  • an integrated memory-computing memory generally includes resistors and transistors as operation devices, and due to the nonlinearity of the input/output voltage of the transistors, the output differential voltage of the integrated memory-computing memory generally has non-linearity.
  • non-linear means that the differential voltage includes a plurality of levels with gradually increasing magnitudes, wherein the level step difference (voltage step) between two levels of adjacent magnitudes varies nonlinearly, such as not Equal or disproportionate.
  • the inventor found that if the analog-to-digital conversion is performed by always using a high level on one of the two output terminals for analog-to-digital conversion, better conversion accuracy can be achieved, because the high level has greater Therefore, the differential voltage can be distinguished more accurately, and the non-linearity of the differential voltage is higher, and the solution of the present invention can also obtain a more accurate digital value.
  • the aforementioned task is solved by an analog-to-digital converter for a memory-computer memory, wherein the analog-to-digital converter is configured to convert the differential output voltage of the memory-computer memory into n bits A binary output digital value, wherein n is the number of conversion bits, and n is an integer greater than 1, and the differential output voltage includes a first differential voltage and a second differential voltage, and the analog-to-digital converter includes:
  • a first analog-to-digital conversion unit configured to convert the first differential voltage into a first digital value
  • the first analog-to-digital conversion unit includes:
  • a reference voltage configured to provide a corresponding reference voltage for each comparator in the first set of comparators
  • a first set of comparators including 2n-1-1 comparators configured to respectively compare the first differential voltage with a corresponding reference voltage to generate 2n-1-1 comparison results; and a decoder , which is configured to convert the 2 n-1 -1 comparison results into a binary result of n-1 bits as a first digital value;
  • a second analog-to-digital conversion unit configured to convert the second differential voltage into a second digital value, wherein the second analog-to-digital conversion unit includes:
  • a reference voltage configured to provide a corresponding reference voltage for the second set of comparators
  • a second set of comparators comprising 2n-1-1 comparators configured to compare the second differential voltages with respective reference voltages to generate 2n-1-1 comparisons, respectively results;
  • a decoder configured to convert the 2n-1-1 comparison results into an n-1-bit binary result as a second digital value
  • Control unit including:
  • a comparator configured to compare the absolute value of the first differential voltage with the absolute value of the second differential voltage to generate a differential voltage comparison result
  • a strobe configured to output the first digital value or the second digital value as bits 1 to n-1 of the output digital value according to the differential voltage comparison result, wherein the differential voltage comparison result is the highest bit n-th of the output digital value bit.
  • reference voltage refers to a reference value used by a comparator when comparing or quantizing levels.
  • 2n-1-1 comparators respectively compare the differential voltage with 2n-1-1 reference voltages to obtain 2n-1-1 comparison results, then The results of these comparisons will be decoded into output digital values.
  • the differential output voltage includes a plurality of levels with gradually increasing magnitudes, wherein the level difference between two adjacent levels changes non-linearly.
  • an analog-to-digital converter for a differential output voltage wherein the differential output voltage comprises a first differential voltage and a second differential voltage
  • the analog-to-digital converter comprising :
  • a gater configured to output a voltage with a larger absolute value of the first differential voltage and the second differential voltage as an input voltage
  • an analog-to-digital conversion unit configured to convert the input voltage to a digital value
  • a control unit configured to generate an output digital value according to the digital value and a comparison result between the absolute value of the first differential voltage and the second differential voltage.
  • the feature of this scheme is that by first identifying the magnitude of the differential output voltage and then converting only the high level, about half of the comparators can be eliminated, thereby achieving smaller chip area and lower power consumption.
  • the present invention also provides an integrated memory and computing memory, which includes the analog-to-digital converter according to the present invention.
  • a circuit for neural network computation comprising:
  • each layer including a plurality of neural units
  • an all-in-one memory configured to receive input data from the neural units of the first layer and calculate output data from the input data, wherein the output data is a differential output voltage
  • An analog-to-digital converter is configured to convert the differential output voltage into an output digital value as input data for a neural unit of a second layer adjacent to the first layer.
  • the storage-computing integrated memory includes:
  • each in-memory processing PIM block configured to be in compute mode or memory mode;
  • a controller configured to divide the array of PIM blocks into: a first set of PIM blocks, each of which is configured to be in memory mode; and a second set of PIM blocks, each of which is configured to be in compute mode , where a first set of PIM blocks is configured to store a first input vector X, and a second set of PIM blocks is configured to store a first input matrix W and compute a partial sum of a third vector based on the first input vector X and the second matrix ;as well as
  • an accumulator configured to output the product based on the partial sum of the third matrix.
  • vector refers to an array with n components or elements, which can also be represented by a 1xn matrix, where n is a natural number.
  • each element or component of a vector may be separately stored in one storage unit, and a single vector may be collectively stored by multiple storage units.
  • matrix can be regarded as an array containing nxm elements, where m is a natural number.
  • the multiplication of vectors and matrices is calculated according to the matrix multiplication rules. For example, the product of an n-dimensional vector (ie, a 1xn matrix) and an nxm matrix is an n-dimensional vector, that is, an nx1 matrix.
  • vectors or matrices that can be multiplied or added satisfy corresponding dimension requirements.
  • the aforementioned task is solved by an analog-to-digital conversion method for a differential output voltage, wherein the differential output voltage comprises a first differential voltage and a second differential voltage, the method comprising the steps of:
  • the first differential voltage is converted into a first digital value as the remaining bits of the output digital value except the highest bit, otherwise the second differential voltage is converted into a second digital value
  • the digital value is used as the remaining bits except the most significant bit of the output digital value.
  • the present invention has at least the following beneficial effects: the present invention can solve the problem of low conversion precision caused by the nonlinearity of the stepped level difference of the differential voltage by using a larger level on the two differential voltage output terminals for analog-to-digital conversion. This is because the inventors have found through research that, especially in devices such as storage and computing integrated memories, the differential voltage often has the following characteristics: the level step difference becomes larger and larger as the level increases.
  • the level step difference becomes smaller and smaller as the level decreases; and due to the voltage differential relationship of the integrated memory, the voltages on the two differential voltage output terminals are always: one output terminal has a high level , the other output terminal has a low level; therefore, the inventor uniquely found that if the analog-to-digital conversion is always performed with a high level on one of the two output terminals, a better The conversion accuracy is higher because the high level has a larger level difference, so it can be distinguished more accurately. Therefore, the nonlinearity of the differential voltage is higher, and the solution of the present invention can also obtain a more accurate digital value.
  • FIG. 1 shows a block diagram of an analog-to-digital converter according to the present invention
  • Figure 2 shows a detailed view of an analog-to-digital converter according to the present invention
  • FIG. 3 shows a detailed view of the analog-to-digital converter according to the present invention when it is applied to an integrated memory for storing and computing;
  • Figure 4 shows a schematic diagram of a nonlinear differential voltage pair
  • Figure 5 shows a schematic diagram of an embodiment of an integrated storage and computing memory
  • FIG. 6 shows an embodiment of a PIM block of an all-in-one memory
  • FIGS 7A-7B show schematic diagrams of PIM blocks in memory mode and compute mode of an all-in-one memory.
  • the quantifiers "a” and “an” do not exclude the scenario of multiple elements.
  • the controller may be implemented in software, hardware or firmware, or a combination thereof.
  • a controller can exist alone or be part of a component.
  • a typical example is the integrated storage and computing memory.
  • the memory-computing integrated memory includes resistors and transistors as operation devices, and due to the non-linearity of the input/output voltage of the transistors, for example, referring to FIG. 4, FIG. 4 shows the voltage curves of the two differential voltage output terminals of the memory-computing integrated memory, Therefore, the output differential voltage of the memory-computing integrated memory generally has non-linearity.
  • non-linear means that the differential voltage includes a plurality of levels with gradually increasing magnitudes, wherein the level step difference (voltage step) between two levels of adjacent magnitudes varies nonlinearly, such as not Equal or disproportionate.
  • the inventor found through research that the differential voltage of such devices has the following rules: due to the voltage differential relationship of the device, the voltages on the two differential voltage output terminals are always: one output terminal has a high level, and the other output terminal has a high level.
  • the terminal has a low level, so in combination with the above findings, among the two voltages output on the two terminals, the high level has a large level difference, and the low level has a small level difference.
  • this feature can be used to improve the analog-to-digital conversion accuracy, that is, when performing analog-to-digital conversion, the high-level on one of the two output terminals is always used for analog-to-digital conversion (the high level in the differential voltage can already be used.
  • Figure 1 shows a block diagram of an analog-to-digital converter 100 according to the present invention.
  • the present invention is described by taking an integrated storage and computing memory 200 as an example.
  • the all-in-one memory 200 outputs an analog signal, that is, a differential output voltage, to the analog-to-digital converter 100 according to the present invention.
  • the analog-to-digital converter 100 converts the differential output voltage into an output digital value through analog-to-digital conversion.
  • FIG. 2 shows a detailed view of the analog-to-digital converter 100 according to the present invention.
  • the differential output voltage includes a first differential voltage V+ and a second differential voltage V-, which are in a differential relationship with each other, that is, their difference is a signal.
  • the differential output voltage is, for example, a bit line (BL) voltage.
  • the analog-to-digital converter 100 includes the following components:
  • a first analog-to-digital conversion unit configured to convert the first differential voltage V+ into a first digital value
  • the first analog-to-digital conversion unit comprises:
  • Reference voltages Vref1 to Vref7 which are configured to provide respective reference voltages for each of the comparators 101-1 to 101-7 in the first group of comparators 101-1 to 101-7.
  • the reference voltage may be shared among two or more sets of comparators.
  • the term "reference voltage” refers to a reference value used by a comparator when comparing or quantizing levels.
  • 2n-1-1 (7 in this embodiment) comparators respectively compare the differential voltage with 2n-1-1 reference voltages to obtain 2 n-1-1 comparison results, which are then decoded into output digital values.
  • the reference voltage may be a voltage source or other voltage or level generating device.
  • thermometer code refers to a numerical value represented by the number of "1”, for example, the thermometer code "01111111” contains 7 "1", so it represents 7 or binary "0111".
  • the thermometer code can be converted into binary code by a decoder, for example, the thermometer code "01111110” can be converted into binary code "0110" by the decoder.
  • a decoder 104-1 which is configured to convert the 2n-1-1 comparison results into an n-1-bit binary result as a first digital value.
  • the decoder 104-1 is configured to convert a 7-bit thermometer code into a 3-bit binary code.
  • a second analog-to-digital conversion unit which is basically the same in structure and configuration as the first analog-to-digital conversion unit.
  • the second analog-to-digital conversion unit is configured to convert the second differential voltage V- into a second digital value, wherein the second analog-to-digital conversion unit includes:
  • Reference voltages Vref1 to Vref7 which are configured to provide respective reference voltages for each of the comparators 102-1 to 102-7 in the second set of comparators 102-1 to 102-7.
  • the reference voltage may be shared among two or more sets of comparators.
  • the term "reference voltage” refers to a reference value used by a comparator when comparing or quantizing levels.
  • 2n-1-1 (7 in this embodiment) comparators respectively compare the differential voltage with 2n-1-1 reference voltages to obtain 2 n-1-1 comparison results, which are then decoded into output digital values.
  • thermometer code refers to a numerical value represented by the number of "1”, for example, the thermometer code "01111111” contains 7 "1", so it represents 7 or binary "0111".
  • the thermometer code can be converted into binary code by a decoder, for example, the thermometer code "01111100” can be converted into binary code "0101" by the decoder.
  • a decoder 104-2 which is configured to convert the 2n-1-1 comparison results into an n-1-bit binary result as a first digital value.
  • the decoder 104-1 is configured to convert a 7-bit thermometer code into a 3-bit binary code.
  • Decoder 104-2 may be the same as or different from decoder 104-1.
  • ⁇ Control unit including:
  • a comparator 103 configured to compare the absolute value of the first differential voltage V+ and the absolute value of the second differential voltage V- to generate a differential voltage comparison result.
  • the result of the comparison will be, for example, the most significant bit (MSB) of the 4-bit output digital value.
  • the strobe 105 which is configured to output the first digital value or the second digital value according to the differential voltage comparison result as bits 1 to n-1 of the output digital value (bits 1 to 3 in this embodiment, A total of 3 bits), wherein the differential voltage comparison result is used as the highest nth bit of the output digital value, that is, the most significant bit.
  • the conversion result of the first group of comparators is selected to be output as a part of the output digital value, that is, the first to third bit
  • the absolute value of the first differential voltage V+1 is less than or equal to the absolute value of the second differential voltage V-
  • the most significant bit is determined by the comparison result between the first differential voltage V+ and the second differential voltage V-. For example, when
  • , MSB 1, and when
  • , MSB 0.
  • only a single set of comparators may be provided, wherein the comparison between the absolute value of the first differential voltage V+1 and the absolute value of the second differential voltage V- is performed first, and only for the larger of the two
  • the user performs an analog-to-digital conversion and uses the result and the differential voltage comparison to generate an output digital value, thereby eliminating a set of comparators.
  • the first differential voltage and the second differential voltage are compared to determine a differential voltage comparison result. Then, the most significant bit of the output digital value is generated according to the differential voltage comparison result. Finally, when the first differential voltage is greater than the second differential voltage, the first differential voltage is converted into a first digital value as the remaining bits of the output digital value except the highest bit, otherwise the second differential voltage is converted into The second digital value is used as the remaining bits except the most significant bit of the output digital value.
  • FIG. 3 shows a detailed view of the analog-to-digital converter 100 according to the present invention when it is applied to the memory-computing integrated memory 200 .
  • the integrated memory 200 employs a plurality of analog-to-digital converters 100 according to the present invention to convert the differential voltages thereof into output digital values.
  • its differential voltage should be converted into 32-bit data, thus requiring eight 4-bit analog-to-digital converters 100 (only a portion is shown here).
  • all the analog-to-digital converters 100 share a single reference voltage.
  • FIG. 5 shows a schematic diagram of one embodiment of an all-in-one memory 200 .
  • the integrated storage and computing memory 200 includes:
  • controller 206 configured to divide the array of PIM blocks 202 into: a first group of PIM blocks 202, each configured to be in memory mode; and a second group of PIM blocks 202, each PIM block 202 Both are configured to be in computation mode, wherein the first set of PIM blocks 202 are configured to store a first input vector X, and the second set of PIM blocks 202 are configured to store a first input matrix W and are based on the first input vector X and the th The two-matrix computes the partial sum of the third vector. Controller 206 may be integrated with storage controller 105 or separate from each other.
  • each PIM block 202 may include a memory array 402 and a VVM (Vector-Vector Multiply) engine 404 that is configured to be disabled in memory mode.
  • the VVM engine may include, for example, a bit counter, shift accumulator, and multiple AND gates to perform vector-to-vector multiplication, see Figures 5A-5B for details on the VVM engine.
  • memory array 402 includes a ReRAM array.
  • the memory array 402 may include any other suitable memory including, but not limited to, phase change random access memory (PRAM), magnetoresistive random access memory, to name a few examples. (MRAM), Ferroelectric Random Access Memory (FRAM).
  • the memory array 402 may store the first vector.
  • the PIM block 202 may also include a control circuit 406 configured to enable the VVM engine 404 in compute mode and to control the VVM engine 404 to perform a dot product between the first vector and the second vector to generate a partial sum.
  • the control circuit 406 may also be configured to disable the VVM engine 404 in memory mode and control the memory array 402 to write or read the first vector.
  • PIM block 202 may also include various buffers for intermediate data storage, including: column buffer 408 configured to receive and buffer second vectors, eg, from other PIM devices, over the memory bus; and partial sum buffer 410 , which is configured to buffer the partial sum and send the partial sum to another PIM device over the partial sum bus.
  • column buffer 408 configured to receive and buffer second vectors, eg, from other PIM devices, over the memory bus
  • partial sum buffer 410 which is configured to buffer the partial sum and send the partial sum to another PIM device over the partial sum bus.
  • An optional accumulator configured to output the product based on the partial sum of the third matrix.
  • the partial sum can also be directly output as the calculation result.
  • a plurality of MUXs 204 configured to redirect data flow between PIM blocks 202 in different rows and/or columns.
  • a global function unit 210 configured to perform any suitable global miscellaneous functions, such as pooling, enabling and encoding schemes, and the like.
  • Each PIM block 202 may be identical and configured to be either in a memory mode for storing data such as a vector or matrix of two or more dimensions, or in a memory mode for storing data and executing functions such as VMM or Computational mode for vector/matrix computations like VVM.
  • a memory mode for storing data such as a vector or matrix of two or more dimensions
  • a memory mode for storing data and executing functions such as VMM or Computational mode for vector/matrix computations like VVM.
  • VMM Computational mode for vector/matrix computations like VVM.
  • each PIM block 202 can be reconfigured between computation and memory modes based on the computation scheme of the particular task. configuration.
  • the layout of the array of PIM blocks 202 is preset, such as in orthogonal rows and columns, the configuration of the MUX 204 can be flexibly changed depending on the particular task to be performed.
  • the arrangement of the array of PIM blocks 202 can be configured to accommodate the computing scheme and data flow corresponding to a particular task.
  • the enabled MUX 204 divides the array of PIM blocks 202 into two or more groups, each group configured to be in the same compute or memory mode.
  • enabled MUX 204 may further redirect data flow between different rows and/or columns as needed for a particular task.
  • the bus 212 may be the main/system bus of the memory-computer memory 101, which is used to transfer incoming data, such as a matrix, to the array of PIM blocks 202.
  • a set of PIM blocks 202 in memory 101 may be configured to be in memory mode in place of RAM 102.
  • the data flow is no longer between each PIM block 104 and the centralized RAM 102 , but rather is based on the arrangement of the array of PIM blocks 202 , such as the layout of the array of PIM blocks 202 and/or the configuration of the MUX 204 . follow a specific path.
  • the output of the PIM block 202 array eg, a partial sum (sum) may be sent to an accumulator 208, which may be further configured to generate an output matrix based on the partial sum.
  • FIGS. 7A-7B show schematic diagrams of PIM blocks in memory mode and compute mode of a memory-compute integrated memory of a vector processor according to the present invention.
  • FIG. 7A shows a detailed block diagram of the PIM block 202 in memory mode, according to some embodiments of the present disclosure.
  • FIG. 7B shows a detailed block diagram of the PIM block 202 of FIG. 4 in compute mode, according to some embodiments of the present disclosure.
  • the VVM engine 404 may include a bit counter 502 , a shift accumulator 508 and a plurality of AND gates 506 .
  • control circuitry 406 may disable VVM engine 404 and partial sum buffer 410 (shown in dashed lines) in memory mode, such that PIM block 202 acts as a memory element for storing first in memory array 402 vector.
  • FIG. 5A shows a bit counter 502 , a shift accumulator 508 and a plurality of AND gates 506 .
  • control circuitry 406 may disable VVM engine 404 and partial sum buffer 410 (shown in dashed lines) in memory mode, such that PIM block 202 acts as a memory element for storing first in memory array 402 vector
  • the control circuit 406 may enable the VVM engine 404 and the partial sum buffer 410 (shown in solid lines) in compute mode such that the first vector sum column buffer 408 stored in the memory array 402 buffers the The second vector of can be sent to VVM engine 404 to compute the dot product of the first and second vectors, which can be buffered as a partial sum in partial sum buffer 410 .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Analogue/Digital Conversion (AREA)

Abstract

本发明涉及一种用于差分输出电压的模数转换器,其中所述差分输出电压包括第一差分电压和第二差分电压,所述模数转换器包括:第一和第二模数转换单元,其被配置为将第一和第二差分电压分别转换成第一和第二数字值;控制单元,其被配置为基于第一差分电压的绝对值与第二差分电压之间的比较结果根据第一数字值或第二数字值生成输出数字值。本发明还涉及一种模数转换方法。通过本发明,可以显著地提高转换精度。

Description

用于差分输出电压的模数转换器以及模数转换方法 技术领域
本发明总的来说涉及集成电路领域,具体而言,涉及一种用于差分输出电压的模数转换器。此外,本发明还涉及一种用于差分输出电压的模数转换方法。
背景技术
模数转换器是一种将模拟电压转换为数字信号的电器件。目前,模数转换器已经可以达到较高的转换精度(或转换位数)、例如16位或更高。然而,模数转换器在转换某些差分电压时,可能出现转换精度差、速度慢等问题。
发明内容
本发明的任务是,提供一种用于差分输出电压的模数转换器以及模数转换方法,通过所述转换器和/或转换方法,可以显著地提高转换精度。
在本发明的第一方面,该任务通过一种用于差分输出电压的模数转换器来解决,其中所述差分输出电压包括第一差分电压和第二差分电压,所述模数转换器包括:
第一模数转换单元,其被配置为将第一差分电压转换成第一数字值;
第二模数转换单元,其被配置为将第二差分电压转换成第二数字值;以及
控制单元,其被配置为执行下列动作:
在第一差分电压的绝对值大于第二差分电压的绝对值时根据第一数字值和第一差分电压的绝对值与第二差分电压之间的比较结果生成输出数字值;以及
在第一差分电压的绝对值小于第二差分电压的绝对值时根据第二数字值和第一差分电压的绝对值与第二差分电压之间的比较结果生成输出数字值。
本发明的范围内,术语“差分电压”或“差分输入/输出电压”是指以两个电压输入/输出端电压的差值作为输出信号的一种信号输出/输出方式。两个电压输入/输出端的电压例如可以表示为“V+”和“V-”,但是它们的符号既可以相同也可以不同,例如均为正电压或均为负电压或者一正一负。
在本发明的一个优选方案中规定,第一模数转换单元和/或第二模数转换单元包括:
参考电压,其被配置为为比较器提供相应的参考电压;
2 n-1-1个比较器,其被配置为分别将第一或第二差分电压与相应参考电压相比较以生成2 n-1-1个比较结果,其中n为转换精度,且n为大于1的整数;以及
译码器,其被配置为将所述2 n-1-1个比较结果转换成为n-1位的二进制结果,其中n-1位的二进制结果作为输出数字值的第1至n-1位,并且第n位根据第一差分电压的绝对值与第二差分电压之间的比较结果来确定。
通过该优选方案,可以实现较高的转换速度,因为第一模数转换单元和/或第二模数转换单元采用了并行运行的2 n-1-1个比较器、即它们同时产生比较结果以供生成最终的结果。此外,本优选方案还具有的优点在于,由并行比较器构成的转换器不含或含较少的电容,不容易与提供差分电压的设备中的电容产生相互串扰,由此减少故障或干扰的可能性。但是应当指出,在本发明的教导下,其它类型的转换器也是可以设想的。
在本发明的另一优选方案中规定,所述控制单元包括:
比较器,其被配置为比较第一差分电压的绝对值和第二差分电压的绝对值以生成差分电压比较结果;以及
选通器,其被配置为根据差分电压比较结果输出第一模数转换单元的第一数字值或第二模数转换单元的第二数字值作为输出数字值的除最高位以外的位,其中差分电压比较结果作为输出数字值的最高位。
通过该优选方案,可以以较少的元件实现控制器的功能。
在本发明的一个扩展方案中规定,所述译码器为温度计码到二进制码转换器。在此,温度计码是指以“1”的个数来表征数值,例如温度计码“01111111”中包含7个“1”,因此表示7或二进制的“0111”。
在本发明的一个优选方案中规定,所述差分输出电压为存算一体存储器的差分输出电压。通过该优选方案,可以大大提高存算一体存储器的输出数字值的精度,这基于发明人的如下洞察。发明人通过研究发现,存算一体存储器一般包括电阻和晶体管作为运算器件,而由于晶体管的输入/输出电压的非线性,因此存算一体存储器的输出差分电压一般存在非线性(non-linearity)。在此,“非线性”是指,差分电压包括大小逐渐升高的多个电平,其中相邻大小的两个电平之间的电平阶梯差(voltage step)呈非线性变化、例如不相等或者不成比例。这导致两个差分电压输出端上的电压呈现如下变化:电平阶梯差随着电平的升高的越来越大,并且电平阶梯差随着电平的降低而越来越小。由于存算一体存储器的电压差分关系,其两个差分电压输出端上的电压总是为:一个输出端具有高电平、另一个输出端具有低电平。因此,发明人发现,如果在进行模数转换时,总是利用两个输出端之一上的高电平进行模数转换,可以实现更好的转换精度,这是因为高电平具有更大的电平阶梯差,因此能够更加准确地分辨,由此差分电压的非线性程度较高,本发明的方案也能得出较精确的数字值。
在本发明的第二方面,前述任务通过一种用于存算一体存储器的模数转换器来解决,其中所述模数转换器被配置为将存算一体存储器的差分输出电压转换成n位二进制的输出数字值,其中n为转换位数,且n为大于1的整数,并且所述差分输出电压包括第一差分电压和第二差分电压,所述模数转换器包括:
第一模数转换单元,其被配置为将第一差分电压转换成第一数字值,其中第一模数转换单元包括:
参考电压,其被配置为为第一组比较器中的每个比较器提供相应的参考电压;
第一组比较器,其包括2 n-1-1个比较器,其被配置为分别将第一差分电压与相应参考电压相比较以生成2 n-1-1个比较结果;以及译码器,其被配置为将所述2 n-1-1个比较结果转换成为n-1位的二进制结果作为第一数字值;
第二模数转换单元,其被配置为将第二差分电压转换成第二数字值,其中第二模数转换单元包括:
参考电压,其被配置为为第二组比较器提供相应的参考电压;
第二组比较器,其包括2 n-1-1个比较器,所述第二组比较器被配置为分别将第二差分电压与相应参考电压相比较以生成2 n-1-1个比较结果;以及
译码器,其被配置为将所述2 n-1-1个比较结果转换成为n-1位的二进制结果作为第二数字值;以及
控制单元,包括:
比较器,其被配置为比较第一差分电压的绝对值和第二差分电压的绝对值以生成差分电压比较结果;以及
选通器,其被配置为根据差分电压比较结果输出第一数字值或第二数字值作为输出数字值的第1至n-1位,其中差分电压比较结果作为输出数字值的最高位第n位。
在本发明的范围内,术语“参考电压”是指比较器在比较或量化电平时所使用的参考值。例如,在并行比较器的情况下,2 n-1-1个比较器分别将差分电压与2 n-1-1个参考电压相比较,以得出2 n-1-1个比较结果,然后这些比较结果将被译码成输出数字值。
在本发明的一个优选方案中规定,所述差分输出电压包括大小逐渐升高的多个电平,其中相邻两个电平之间的电平差呈非线性变化。通过该优选方案,可以在差分电压的非线性程度较高的情况下仍然得出精确的结果。
在本发明的第三方面,前述任务通过一种用于差分输出电压的模数转换器来解决,其中所述差分输出电压包括第一差分电压和第二差分电压,所述模数转换器包括:
选通器,其被配置为输出第一差分电压和第二差分电压二者中绝对值较大的电压作为输入电压;
模数转换单元,其被配置为将输入电压转换成数字值;以及
控制单元,其被配置为根据所述数字值和第一差分电压的绝对值与第二差分电压之间的比较结果生成输出数字值。
此方案的特点在于,通过首先识别差分输出电压的大小,然后仅仅对高电平进行转换,由此可以省去大约一半的比较器,由此实现更小的芯片面积和更低的功耗。
此外,本发明还提供了一种存算一体存储器,其包括根据本发明的模数转换器。
在本发明的第四方面,前述任务通过一种用于神经网络计算的电路来解决,该电路包括:
多个层,每个层包括多个神经单元;以及
存算一体存储器,其被配置为从第一层的神经单元接收输入数据并且根据输入数据计算输出数据,其中所述输出数据为差分输出电压;以及
根据本发明的模数转换器,其被配置为将所述差分输出电压转换成输出数字值以作为与第一层相邻的第二层的神经单元的输入数据。
在本发明的一个优选方案中规定,所述存算一体存储器包括:
行和列形式的存储器内处理PIM块阵列,每个存储器内处理PIM块都被配置为处于计算模式或存储器模式;
控制器,其被配置为将PIM块阵列划分为:第一组PIM块,每个PIM块都被配置为处于存储器模式;以及第二组PIM块,每个PIM块都被配置为处于计算模式,其中第一组PIM块被配置为存储第一输入向量X,并且第二组PIM块被配置为存储第一输入矩阵W并且基于第一输入向量X和第二矩阵计算第三向量的部分和;以及
累加器,其被配置为基于第三矩阵的部分和输出所述乘积。
在本发明中,术语“向量”或“矢量”是指具有n个分量或元素的数组,也可以用1xn矩阵来表示,其中n为自然数。例如,向量的每个元素或分量可以分别存储在一个存储单元中,并且由多个存储单元来共同存储单个向量。在本发明中,术语“矩阵”可以视为包含nxm个元素的数组,m为自然数。向量和矩阵的乘法按照矩阵乘法规则来计算。例如,n维向量(即1xn矩阵)与nxm矩阵的乘积为n维向量、即nx1矩阵。在本发明中,除特别指出以外,能够相乘或相加的向量或矩阵满足相应的维度要求。
在本发明的第五方面,前述任务通过一种用于差分输出电压的模数转换方法来解决,其中所述差分输出电压包括第一差分电压和第二差分电压,该方法包括下列步骤:
将第一差分电压和第二差分电压相比较以确定差分电压比较结果;
根据差分电压比较结果生成输出数字值的最高位;以及
在第一差分电压大于第二差分电压的情况下将第一差分电压转换成第一数字值以作为输出数字值的除所述最高位以外的其余位,否则将 第二差分电压转换成第二数字值以作为输出数字值的除所述最高位以外的其余位。
本发明至少具有下列有益效果:本发明通过采用两个差分电压输出端上的较大的电平进行模数转换,可以良好地解决因差分电压的阶梯电平差非线性所导致的转换精度低问题,这是因为,本发明人通过研究发现,尤其是在存算一体存储器之类的设备中,其差分电压往往存在如下特性:电平阶梯差随着电平的升高的越来越大,并且电平阶梯差随着电平的降低而越来越小;而且由于存算一体存储器的电压差分关系,其两个差分电压输出端上的电压总是为:一个输出端具有高电平、另一个输出端具有低电平;因此,发明人独到地发现,如果在进行模数转换时,总是利用两个输出端之一上的高电平进行模数转换,可以实现更好的转换精度,这是因为高电平具有更大的电平阶梯差,因此能够更加准确地分辨,由此差分电压的非线性程度较高,本发明的方案也能得出较精确的数字值。
附图说明
下面结合具体实施方式参考附图进一步阐述本发明。
图1示出了根据本发明的模数转换器的框图;
图2示出了根据本发明的模数转换器的详细视图;
图3示出了根据本发明的模数转换器在应用于存算一体存储器时的详细视图;
图4示出了非线性差分电压对的示意图;
图5示出了存算一体存储器的一个实施例的示意图;
图6示出了存算一体存储器的PIM块的实施例;以及
图7A-7B示出了存算一体存储器的处于存储器模式和计算模式的PIM块的示意图。
具体实施方式
应当指出,各附图中的各组件可能为了图解说明而被夸大地示出,而不一定是比例正确的。在各附图中,给相同或功能相同的组件配备了相同的附图标记。
在本发明中,除非特别指出,“布置在…上”、“布置在…上方” 以及“布置在…之上”并未排除二者之间存在中间物的情况。此外,“布置在…上或上方”仅仅表示两个部件之间的相对位置关系,而在一定情况下、如在颠倒产品方向后,也可以转换为“布置在…下或下方”,反之亦然。
在本发明中,各实施例仅仅旨在说明本发明的方案,而不应被理解为限制性的。
在本发明中,除非特别指出,量词“一个”、“一”并未排除多个元素的场景。
在此还应当指出,在本发明的实施例中,为清楚、简单起见,可能示出了仅仅一部分部件或组件,但是本领域的普通技术人员能够理解,在本发明的教导下,可根据具体场景需要添加所需的部件或组件。另外,除非另行说明,本发明的不同实施例中的特征可以相互组合。例如,可以用第二实施例中的某特征替换第一实施例中相对应或功能相同或相似的特征,所得到的实施例同样落入本申请的公开范围或记载范围。
在此还应当指出,在本发明的范围内,“相同”、“相等”、“等于”等措辞并不意味着二者数值绝对相等,而是允许一定的合理误差,也就是说,所述措辞也涵盖了“基本上相同”、“基本上相等”、“基本上等于”。以此类推,在本发明中,表方向的术语“垂直于”、“平行于”等等同样涵盖了“基本上垂直于”、“基本上平行于”的含义。
另外,本发明的各方法的步骤的编号并未限定所述方法步骤的执行顺序。除非特别指出,各方法步骤可以以不同顺序执行。
在本发明的范围内,控制器可以用软件、硬件或固件或其组合来实现。控制器既可以单独存在,也可以是某个部件的一部分。
最后应当指出,本发明尽管以存算一体存储器为例进行说明的,但是本发明不限于此,而是也适用于差分电压的其它场景、尤其是非线性差分电压场景。
首先阐述本发明所基于的原理。
发明人通过研究发现,在一些电子设备或器件中,由于非线性元件的存在,其差分输出电压存在非线性,这种非线性会影响模数转换的精度。存算一体存储器就一个典型的示例。存算一体存储器例如包括电阻和晶体管作为运算器件,而由于晶体管的输入/输出电压的非线性,例如参考图4,图4示出了存算一体存储器的两个差分电压输出端子的电 压曲线,因此存算一体存储器的输出差分电压一般存在非线性(non-linearity)。在此,“非线性”是指,差分电压包括大小逐渐升高的多个电平,其中相邻大小的两个电平之间的电平阶梯差(voltage step)呈非线性变化、例如不相等或者不成比例。这导致两个差分电压输出端上的电压呈现如下变化:电平阶梯差随着电平的升高的越来越大,并且电平阶梯差随着电平的降低而越来越小,相应地,其信噪比也呈现相似变化。且发明人通过研究发现这类设备的差分电压存在如下规律:由于所述设备的电压差分关系,其两个差分电压输出端上的电压总是为:一个输出端具有高电平、另一个输出端具有低电平,因此结合上面的发现,两个端子上输出的两个电压中,高电平具有大的电平阶梯差,低电平具有小的电平阶梯差。发明人发现,可利用这个特点提高模数转换精度、即在进行模数转换时,总是利用两个输出端之一上的高电平进行模数转换(差分电压中的高电平已经可以确定电压的数字值,因为差分电压中的电压差分对、即高电平与低电平呈现一一对应的关系),由此可以实现更好的转换精度,这是因为高电平具有更大的电平阶梯差,因此能够更加准确地分辨,由此差分电压的非线性程度较高,本发明的方案也能得出较精确的数字值。
下面结合具体实施方式参考附图进一步阐述本发明。
图1示出了根据本发明的模数转换器100的框图。
如图1所示,以存算一体存储器200为例来说明本发明。存算一体存储器200将模拟信号、即差分输出电压输出到根据本发明的模数转换器100。模数转换器100通过模数转换将所述差分输出电压转换成输出数字值。
图2示出了根据本发明的模数转换器100的详细视图。
如图2所示,仍然以存算一体存储器200为例,所述模数转换器100被配置为将存算一体存储器200的差分输出电压V+、V-转换成n位二进制的输出数字值,其中n为转换位数,且n为大于1的整数,在本实施例中,以n=4为例,但是其它数目的n也是可设想的。差分输出电压包括第一差分电压V+和第二差分电压V-,它们互为差分关系,即它们的差值为信号。差分输出电压例如为位线(BL)电压。根据本发明的模数转换器100包括下列部件:
·第一模数转换单元,其被配置为将第一差分电压V+转换成第一数 字值,其中第一模数转换单元包括:
◇参考电压Vref1至Vref7,其被配置为为第一组比较器101-1至101-7中的每个比较器101-1至101-7提供相应的参考电压。在此应当指出,参考电压可以在两组或更多组比较器中共用。在本发明的范围内,术语“参考电压”是指比较器在比较或量化电平时所使用的参考值。例如,在并行比较器的情况下,2 n-1-1个(在此实施例中为7个)比较器分别将差分电压与2 n-1-1个参考电压相比较,以得出2 n-1-1个比较结果,然后这些比较结果将被译码成输出数字值。参考电压可以为电压源或其它电压或电平发生装置。
◇第一组比较器101-1至101-7,其包括2 n-1-1个(在此实施例中为7个)比较器,其被配置为分别将第一差分电压V+与相应参考电压Vref1至Vref7相比较以生成2 n-1-1个(在此实施例中为7个)比较结果。所述结果例如为7位的温度计码。在此,温度计码是指以“1”的个数来表征数值,例如温度计码“01111111”中包含7个“1”,因此表示7或二进制的“0111”。温度计码可以通过译码器被转换成二进制码,例如温度计码“01111110”可以被译码器转换成二进制码“0110”。
◇译码器104-1,其被配置为将所述2 n-1-1个比较结果转换成为n-1位的二进制结果作为第一数字值。在本实施例中,译码器104-1被配置为将7位的温度计码转换成3位的二进制码。
·第二模数转换单元,其与第一模数转换单元的结构和配置基本相同。第二模数转换单元被配置为将第二差分电压V-转换成第二数字值,其中第二模数转换单元包括:
◇参考电压Vref1至Vref7,其被配置为为第二组比较器102-1至102-7中的每个比较器102-1至102-7提供相应的参考电压。在此应当指出,参考电压可以在两组或更多组比较器中共用。在本发明的范围内,术语“参考电压”是指比较器在比较或量化电平时所使用的参考值。例如,在并行比较器的情况下,2 n-1-1个(在此实施例中为7个)比较器分别将差分电压与2 n-1-1个参考电压相比较,以得出2 n-1-1个比较结果,然后这些比较结果将被译码成输出数字值。
◇第二组比较器102-1至102-7,其包括2 n-1-1个(在此实施例中为7个)比较器,其被配置为分别将第二差分电压V-与相应参考电压Vref1至Vref7相比较以生成2 n-1-1个(在此实施例中为7个)比较结果。所述 结果例如为7位的温度计码。在此,温度计码是指以“1”的个数来表征数值,例如温度计码“01111111”中包含7个“1”,因此表示7或二进制的“0111”。温度计码可以通过译码器被转换成二进制码,例如温度计码“01111100”可以被译码器转换成二进制码“0101”。
◇译码器104-2,其被配置为将所述2 n-1-1个比较结果转换成为n-1位的二进制结果作为第一数字值。在本实施例中,译码器104-1被配置为将7位的温度计码转换成3位的二进制码。译码器104-2可以与译码器104-1相同或不同。
·控制单元,包括:
◇比较器103,其被配置为比较第一差分电压V+的绝对值和第二差分电压V-的绝对值以生成差分电压比较结果。所述比较结果例如将作为4位输出数字值的最高有效位(MSB)。
◇选通器105,其被配置为根据差分电压比较结果输出第一数字值或第二数字值作为输出数字值的第1至n-1位(在本实施例中为第1至3位,共3位),其中差分电压比较结果作为输出数字值的最高位第n位、即最高有效位。例如,在第一差分电压V+的绝对值大于第二差分电压V-的绝对值时选择输出第一组比较器的转换结果、即第一数字值作为输出数字值的一部分、即第1至3位;在第一差分电压V+1的绝对值小于或等于第二差分电压V-的绝对值时选择输出第二组比较器的转换结果、即第二数字值作为输出数字值的一部分、即第1至3位。最高位由第一差分电压V+与第二差分电压V-之间的比较结果来确定。例如,当|V|+>|V-|时,MSB=1,且|V|+≤|V-|时,MSB=0。
在一个优选的实施例中,可以仅仅设置单组比较器,其中首先进行第一差分电压V+1的绝对值与第二差分电压V-的绝对值之间的比较,并且仅仅对其中较大者进行模数转换并采用其结果和差分电压比较结果来生成输出数字值,由此可以省去一组比较器。
下面阐述根据本发明的模数转换器100的工作流程。
首先,将第一差分电压和第二差分电压相比较以确定差分电压比较结果。然后,根据差分电压比较结果生成输出数字值的最高位。最后,在第一差分电压大于第二差分电压的情况下将第一差分电压转换成第一数字值以作为输出数字值的除所述最高位以外的其余位,否则将第二差分电压转换成第二数字值以作为输出数字值的除所述最高位以外的 其余位。
图3示出了根据本发明的模数转换器100在应用于存算一体存储器200时的详细视图。
如图3所示,存算一体存储器200采用多个根据本发明的模数转换器100来将其差分电压转换成输出数字值。例如,其差分电压应当被转换成32位数据,因此需要8个4位模数转换器100(在此仅仅示出了一部分)。在此,全部模数转换器100共用单个参考电压。
图5示出了存算一体存储器200的一个实施例的示意图。
如图5所示,存算一体存储器200包括:
·行和列形式的存储器内处理PIM块阵列202,每个存储器内处理块202都被配置为处于计算模式或存储器模式。
·控制器206,其被配置为将PIM块阵列202划分为:第一组PIM块202,每个PIM块202都被配置为处于存储器模式;以及第二组PIM块202,每个PIM块202都被配置为处于计算模式,其中第一组PIM块202被配置为存储第一输入向量X,并且第二组PIM块202被配置为存储第一输入矩阵W并且基于第一输入向量X和第二矩阵计算第三向量的部分和。控制器206可以与存储控制器105集成在一起或彼此分离。在此,部分和是指,向量与矩阵的乘法的部分计算结果,例如行向量与矩阵的列向量的乘积。关于PIM块202的细节,请参阅图6。如图6所示,每个PIM块202都可以包括存储器阵列402和VVM(矢量-矢量乘法)引擎404,所述VVM引擎404被配置为在存储器模式下被停用。VVM引擎例如可以包括位计数器、移位累加器和多个AND门,以便执行矢量-矢量乘法,关于VVM引擎的细节,请参阅图5A-5B。在一些实施例中,存储器阵列402包括ReRAM阵列。能够理解,在其它示例中,存储器阵列402可以包括任何其它合适的存储器,举几个例子来说,所述存储器包括但不限于:相变随机存取存储器(PRAM)、磁阻随机存取存储器(MRAM)、铁电随机存取存储器(FRAM)。存储器阵列402可以存储第一矢量。PIM块202还可以包括控制电路406,所述控制电路406被配置为在计算模式下启用VVM引擎404并控制VVM引擎404以执行第一矢量与第二矢量之间的点积以生成部分和。控制电路406还可以被配置为在存储器模式下停用VVM引擎404并控制存储器阵列402以写入或读出第一矢量。PIM块202还可以包括用于中间数据存储的各种缓冲器,包括:列缓冲器408,其被配置为通过存储器总线接收和 缓冲例如来自其它PIM设备的第二矢量;以及部分和缓冲器410,其被配置为缓冲部分和并通过部分和总线将部分和发送给另一PIM设备。
·可选的累加器,其被配置为基于第三矩阵的部分和输出所述乘积。在其它情况下,也可以直接输出部分和作为计算结果。
·多个MUX 204,其被配置为在不同行和/或列的PIM块202之间重定向数据流。
·总线212,其用于在位于总线上的PIM块202、控制器206、全局功能单元210、累加器等组件之间传输。
·全局功能单元210,其被配置为执行任何合适的全局杂项功能,比如池化、启用和编码方案等。
每个PIM块202都可以是相同的,并且被配置为要么处于用于存储例如两维或更多维的矢量或矩阵之类的数据的存储器模式、要么处于用于存储数据以及执行诸如VMM或VVM之类的矢量/矩阵计算的计算模式。随着要执行的特定任务的改变,例如CNN中的卷积层或全连接(FC)层中的计算,每个PIM块202都可以基于特定任务的计算方案在计算模式与存储器模式之间重新配置。在一些实施例中,即使PIM块202阵列的布局是预设的,例如为正交的行和列的形式,MUX 204的配置仍然可以根据要执行的特定任务灵活改变。例如,通过启用和停用不同行的PIM块202之间的某些MUX 204,PIM块202阵列的布置可以被配置为适应与特定任务相对应的计算方案和数据流。根据一些实施例,被启用的MUX 204将PIM块202阵列划分成两个或更多个组,每个组都被配置为处于相同的计算或存储器模式。此外,尽管PIM块202之间的缺省数据流处于相同的行和/或列,但是被启用的MUX 204可以按照特定任务的需要进一步在不同行和/或列之间重定向数据流。
总线212可以是存算一体存储器101的主/系统总线,其用于将诸如矩阵之类的输入数据传输到PIM块202阵列。存算一体存储器101中的一组PIM块202可以被配置为处于存储器模式以替代RAM 102。结果,根据一些实施例,数据流不再处于每个PIM块104与集中式RAM 102之间,而是基于PIM块202阵列的布置、例如PIM块202阵列的布局和/或MUX 204的配置而遵循特定路径。PIM块202阵列的输出、例如部分求和(和)可以被发送到累加器208,所述累加器208可以进一步被配置为基于部分和生成输出矩阵。
图7A-7B示出了根据本发明的矢量处理器的存算一体存储器的处于存储器模式和计算模式的PIM块的示意图。
图7A示出了根据本公开一些实施例的处于存储器模式的PIM块202的详细框图。图7B示出了根据本公开一些实施例的处于计算模式的图4中的PIM块202的详细框图。VVM引擎404可以包括位计数器502、移位累加器508以及多个AND门506。如图5A所示,控制电路406可以在存储器模式下停用VVM引擎404和部分和缓冲器410(以虚线示出),使得PIM块202充当存储器元件以用于在存储器阵列402中存储第一矢量。如图7B所示,控制电路406可以在计算模式下启用VVM引擎404和部分和缓冲器410(以实线示出),使得存储在存储器阵列402中的第一矢量和列缓冲器408中缓冲的第二矢量可以被发送给VVM引擎404以计算第一和第二矢量的点积,所述点积可以在部分和缓冲器410中作为部分和被缓冲。
虽然本发明的一些实施方式已经在本申请文件中予以了描述,但是本领域技术人员能够理解,这些实施方式仅仅是作为示例示出的。本领域技术人员在本发明的教导下可以想到众多的变型方案、替代方案和改进方案而不超出本发明的范围。所附权利要求书旨在限定本发明的范围,并由此涵盖这些权利要求本身及其等同变换的范围内的方法和结构。

Claims (12)

  1. 一种用于差分输出电压的模数转换器,其中所述差分输出电压包括第一差分电压和第二差分电压,所述模数转换器包括:
    第一模数转换单元,其被配置为将第一差分电压转换成第一数字值;
    第二模数转换单元,其被配置为将第二差分电压转换成第二数字值;以及
    控制单元,其被配置为执行下列动作:
    在第一差分电压的绝对值大于第二差分电压的绝对值时根据第一数字值和第一差分电压的绝对值与第二差分电压之间的比较结果生成输出数字值;以及
    在第一差分电压的绝对值小于第二差分电压的绝对值时根据第二数字值和第一差分电压的绝对值与第二差分电压之间的比较结果生成输出数字值。
  2. 根据权利要求1所述的模数转换器,其中第一模数转换单元和/或第二模数转换单元包括:
    参考电压,其被配置为为比较器提供相应的参考电压;
    2 n-1-1个比较器,其被配置为分别将第一或第二差分电压与相应参考电压相比较以生成2 n-1-1个比较结果,其中n为转换精度,且n为大于1的整数;以及
    译码器,其被配置为将所述2 n-1-1个比较结果转换成为n-1位的二进制结果,其中n-1位的二进制结果作为输出数字值的第1至n-1位,并且第n位根据第一差分电压的绝对值与第二差分电压之间的比较结果来确定。
  3. 根据权利要求1所述的模数转换器,其中所述控制单元包括:
    比较器,其被配置为比较第一差分电压的绝对值和第二差分电压的绝对值以生成差分电压比较结果;以及
    选通器,其被配置为根据差分电压比较结果输出第一模数转换单元的第一数字值或第二模数转换单元的第二数字值作为输出数字值的除最高位以外的位,其中差分电压比较结果作为输出数字值的最高位。
  4. 根据权利要求2所述的模数转换器,其中所述译码器为温度计码到二进制码转换器。
  5. 根据权利要求1至4之一所述的模数转换器,其中所述差分输出电压为存算一体存储器的差分输出电压。
  6. 一种用于存算一体存储器的模数转换器,其中所述模数转换器被配置为将存算一体存储器的差分输出电压转换成n位二进制的输出数字值,其中n为转换位数,且n为大于1的整数,并且所述差分输出电压包括第一差分电压和第二差分电压,所述模数转换器包括:
    第一模数转换单元,其被配置为将第一差分电压转换成第一数字值,其中第一模数转换单元包括:
    参考电压,其被配置为为第一组比较器中的每个比较器提供相应的参考电压;
    第一组比较器,其包括2 n-1-1个比较器,其被配置为分别将第一差分电压与相应参考电压相比较以生成2 n-1-1个比较结果;以及
    译码器,其被配置为将所述2 n-1-1个比较结果转换成为n-1位的二进制结果作为第一数字值;
    第二模数转换单元,其被配置为将第二差分电压转换成第二数字值,其中第二模数转换单元包括:
    参考电压,其被配置为为第二组比较器提供相应的参考电压;
    第二组比较器,其包括2 n-1-1个比较器,所述第二组比较器被配置为分别将第二差分电压与相应参考电压相比较以生成2 n-1-1个比较结果;以及
    译码器,其被配置为将所述2 n-1-1个比较结果转换成为n-1位的二进制结果作为第二数字值;以及
    控制单元,包括:
    比较器,其被配置为比较第一差分电压的绝对值和第二差分电压的绝对值以生成差分电压比较结果;以及
    选通器,其被配置为根据差分电压比较结果输出第一数字值或第二数字值作为输出数字值的第1至n-1位,其中差分电压比较结果作为输出数字值的最高位第n位。
  7. 根据权利要求6所述的模数转换器,其中所述差分输出电压包括大小逐渐升高的多个电平,其中相邻两个电平之间的电平差呈非线性变化。
  8. 一种用于差分输出电压的模数转换器,其中所述差分输出电压包 括第一差分电压和第二差分电压,所述模数转换器包括:
    选通器,其被配置为输出第一差分电压和第二差分电压二者中绝对值较大的电压作为输入电压;
    模数转换单元,其被配置为将输入电压转换成数字值;以及
    控制单元,其被配置为根据所述数字值和第一差分电压的绝对值与第二差分电压之间的比较结果生成输出数字值。
  9. 一种存算一体存储器,其包括根据权利要求6至7之一所述的模数转换器。
  10. 一种用于神经网络计算的电路,包括:
    多个层,每个层包括多个神经单元;以及
    存算一体存储器,其被配置为从第一层的神经单元接收输入数据并且根据输入数据计算输出数据,其中所述输出数据为差分输出电压;以及
    根据权利要求1至5之一所述的模数转换器,其被配置为将所述差分输出电压转换成输出数字值以作为与第一层相邻的第二层的神经单元的输入数据。
  11. 根据权利要求10所述的电路,其中所述存算一体存储器包括:
    行和列形式的存储器内处理PIM块阵列,每个存储器内处理PIM块都被配置为处于计算模式或存储器模式;
    控制器,其被配置为将PIM块阵列划分为:第一组PIM块,每个PIM块都被配置为处于存储器模式;以及第二组PIM块,每个PIM块都被配置为处于计算模式,其中第一组PIM块被配置为存储第一输入向量X,并且第二组PIM块被配置为存储第一输入矩阵W并且基于第一输入向量X和第二矩阵计算第三向量的部分和;以及
    累加器,其被配置为基于第三矩阵的部分和输出所述乘积。
  12. 一种用于差分输出电压的模数转换方法,其中所述差分输出电压包括第一差分电压和第二差分电压,该方法包括下列步骤:
    将第一差分电压和第二差分电压相比较以确定差分电压比较结果;
    根据差分电压比较结果生成输出数字值的最高位;以及
    在第一差分电压大于第二差分电压的情况下将第一差分电压转换成第一数字值以作为输出数字值的除所述最高位以外的其余位,否则将第二差分电压转换成第二数字值以作为输出数字值的除所述最高位以 外的其余位。
PCT/CN2021/071169 2021-01-12 2021-01-12 用于差分输出电压的模数转换器以及模数转换方法 WO2022150939A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180000304.6A CN112913144B (zh) 2021-01-12 2021-01-12 用于差分输出电压的模数转换器以及模数转换方法
PCT/CN2021/071169 WO2022150939A1 (zh) 2021-01-12 2021-01-12 用于差分输出电压的模数转换器以及模数转换方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/071169 WO2022150939A1 (zh) 2021-01-12 2021-01-12 用于差分输出电压的模数转换器以及模数转换方法

Publications (1)

Publication Number Publication Date
WO2022150939A1 true WO2022150939A1 (zh) 2022-07-21

Family

ID=76109047

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/071169 WO2022150939A1 (zh) 2021-01-12 2021-01-12 用于差分输出电压的模数转换器以及模数转换方法

Country Status (2)

Country Link
CN (1) CN112913144B (zh)
WO (1) WO2022150939A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115906735A (zh) * 2023-01-06 2023-04-04 上海后摩智能科技有限公司 基于模拟信号的多比特数存算一体电路、芯片及计算装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6014097A (en) * 1998-09-30 2000-01-11 National Semiconductor Corporation Fully differential interpolating comparator bank and method
US20080180289A1 (en) * 2007-01-30 2008-07-31 National Chiao Tung University Self-calibrating high-speed analog-to-digital converter
CN104410419A (zh) * 2014-12-08 2015-03-11 中国科学院微电子研究所 带有数字可编程选通窗的模数转换器
CN107295808A (zh) * 2014-12-23 2017-10-24 先进能源工业公司 用于高温测量的全差分放大
CN110995269A (zh) * 2019-11-07 2020-04-10 东南大学 一种适用于低电压sar adc设计的节能开关切换电路及其方法
CN111585576A (zh) * 2020-06-08 2020-08-25 高拓讯达(北京)科技有限公司 模数转换电路与电子装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02268521A (ja) * 1989-04-11 1990-11-02 Matsushita Electric Ind Co Ltd A/d変換方法及びa/d変換装置
SG71140A1 (en) * 1997-08-15 2000-03-21 Texas Instruments Inc Differential pair-based folding interpolator circuit for an analog-to-digital converter
US7151475B2 (en) * 2004-08-31 2006-12-19 Micron Technology, Inc. Minimized differential SAR-type column-wide ADC for CMOS image sensors
US20060114140A1 (en) * 2004-11-29 2006-06-01 Taiwan Semiconductor Manufacturing Co., Ltd. Two step flash analog to digital converter
CN102751990A (zh) * 2012-06-18 2012-10-24 东南大学 一种可提高动态性能的流水线式模数转换器
CN102801422B (zh) * 2012-08-17 2016-06-15 中国科学院微电子研究所 逐次逼近型模数转换器
JP2014165649A (ja) * 2013-02-25 2014-09-08 Fujitsu Semiconductor Ltd アナログデジタル変換装置
GB2515014B (en) * 2013-06-10 2020-06-17 Cmosis Bvba Analog-to-digital conversion
CN107246890B (zh) * 2017-04-19 2020-08-28 上海矽睿科技有限公司 电容式传感器检测电路及双采样斩波级联结构
CN111669177B (zh) * 2019-03-05 2023-11-17 武汉杰开科技有限公司 一种模数转换器

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6014097A (en) * 1998-09-30 2000-01-11 National Semiconductor Corporation Fully differential interpolating comparator bank and method
US20080180289A1 (en) * 2007-01-30 2008-07-31 National Chiao Tung University Self-calibrating high-speed analog-to-digital converter
CN104410419A (zh) * 2014-12-08 2015-03-11 中国科学院微电子研究所 带有数字可编程选通窗的模数转换器
CN107295808A (zh) * 2014-12-23 2017-10-24 先进能源工业公司 用于高温测量的全差分放大
CN110995269A (zh) * 2019-11-07 2020-04-10 东南大学 一种适用于低电压sar adc设计的节能开关切换电路及其方法
CN111585576A (zh) * 2020-06-08 2020-08-25 高拓讯达(北京)科技有限公司 模数转换电路与电子装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115906735A (zh) * 2023-01-06 2023-04-04 上海后摩智能科技有限公司 基于模拟信号的多比特数存算一体电路、芯片及计算装置
CN115906735B (zh) * 2023-01-06 2023-05-05 上海后摩智能科技有限公司 基于模拟信号的多比特数存算一体电路、芯片及计算装置

Also Published As

Publication number Publication date
CN112913144B (zh) 2023-12-29
CN112913144A (zh) 2021-06-04

Similar Documents

Publication Publication Date Title
US20210082502A1 (en) Resistive random-access memory for exclusive nor (xnor) neural networks
TW201703046A (zh) 用以執行乘法累加運算之電阻式記憶體陣列
US9933998B2 (en) Methods and apparatuses for performing multiplication
WO2022150939A1 (zh) 用于差分输出电压的模数转换器以及模数转换方法
EP4086816A1 (en) Neural network circuit and neural network system
CN118072788A (zh) 存算一体电路、芯片及电子设备
KR101939359B1 (ko) 내부 연산 구조를 포함하는 mtj 메모리 장치
JP7255068B2 (ja) メモリデバイス及びその動作方法
CN111988031B (zh) 一种忆阻存内矢量矩阵运算器及运算方法
Xuan et al. HPSW-CIM: A novel ReRAM-based computing-in-memory architecture with constant-term circuit for full parallel hybrid-precision-signed-weight MAC operation
US10659070B2 (en) Digital to analog converter device and current control method
US11929141B2 (en) Sparsity-aware reconfigurable compute-in-memory (CIM) static random access memory (SRAM)
CN114168888B (zh) 一种存内模拟式线性方程组求解器、求解系统及求解方法
TWI850885B (zh) 多位元類比式乘法累加電路系統
JP2022176082A (ja) 複製ビットセル基盤のmac演算装置及び方法
JP7206531B2 (ja) メモリデバイスおよびその動作方法
US20240223207A1 (en) Multiply-accumulate successive approximation devices and methods
CN115019856B (zh) 一种基于rram多值存储的存内计算方法与系统
US20230418557A1 (en) Data computation circuit and method
CN116386687B (zh) 一种平衡电压降影响的存储器阵列
US20240220742A1 (en) Multiply-accumulate successive approximation devices and methods
US20220075599A1 (en) Memory device and operation method thereof
Wang et al. Accuracy Improvement with Weight Mapping Strategy and Output Transformation for STT-MRAM-Based Computing-In-Memory
TW202201398A (zh) 仿類比記憶體運算電路
TW202349884A (zh) 用於記憶體內運算巨集的共用行之類比數位轉換器

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02-11-2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21918158

Country of ref document: EP

Kind code of ref document: A1