CN119441134B - Sensing and memory calculation integrated macro unit circuit, system and analog-to-digital conversion method - Google Patents
Sensing and memory calculation integrated macro unit circuit, system and analog-to-digital conversion method Download PDFInfo
- Publication number
- CN119441134B CN119441134B CN202411769901.7A CN202411769901A CN119441134B CN 119441134 B CN119441134 B CN 119441134B CN 202411769901 A CN202411769901 A CN 202411769901A CN 119441134 B CN119441134 B CN 119441134B
- Authority
- CN
- China
- Prior art keywords
- digital
- analog
- signal
- bus
- isc
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/80—Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors
- G06F15/8007—Architectures of general purpose stored program computers comprising an array of processing units with common control, e.g. single instruction multiple data processors single instruction multiple data [SIMD] multiprocessors
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M1/00—Analogue/digital conversion; Digital/analogue conversion
- H03M1/12—Analogue/digital converters
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Analogue/Digital Conversion (AREA)
Abstract
Description
技术领域Technical Field
本发明涉及电子电路及信号处理领域,尤其是是一种感存算一体宏单元电路、系统及模数转换方法。The present invention relates to the field of electronic circuits and signal processing, and in particular to a sensing-storage-computing integrated macro unit circuit, system and analog-to-digital conversion method.
背景技术Background Art
随着工业互联网的发展,对视频采集和处理技术提出了更高的要求,传统的视觉类应用系统,图像传感器采集图像信息,将光信号转化电信号,并经过数模转换之后变成数字信号,再经过图像信号处理单元处理图像数据,最后需要经过特殊的视频接口输出给系统中的处理器,进而由处理器执行数据分析并做出相应的控制和操作。With the development of the industrial Internet, higher requirements are placed on video acquisition and processing technologies. In traditional visual application systems, image sensors collect image information, convert optical signals into electrical signals, and convert them into digital signals after digital-to-analog conversion. The image data is then processed by the image signal processing unit and finally output to the processor in the system through a special video interface. The processor then performs data analysis and makes corresponding controls and operations.
在图像处理和激光测距等应用中,如图1所示,感存算一体芯片通过集成传感、存储和计算功能,实现高效、低功耗的数据处理。其中,中间是处理宏单元(PE)1阵列,由PE以阵列形式紧密摆放在一起,例如1024*1024规模,因为每个PE都包括感存算基本单元,所以PE阵列中的所有PE可以同时并行处理每个单元内的数据,这样的方式也常称为单指令多数据模式即SIMD,这种方式GPU中较为常见。在PE阵列水平方向和垂直方向分别设计行控制模块5和列控制模块6,行控制模块5用于对PE阵列进行行选择和相关控制,相应的列模式控制模块用于对PE阵列进行列选择和相关控制,以及数据读出选择,在PE阵列外围还包括外围数字模块4、INS总线41、外围模拟模块3、接口模块7。In applications such as image processing and laser ranging, as shown in Figure 1, the integrated sensing, storage and computing chip achieves efficient and low-power data processing by integrating sensing, storage and computing functions. Among them, the middle is the processing macro unit (PE) 1 array, which is closely placed together in the form of an array of PEs, such as a 1024*1024 scale. Because each PE includes a sensing, storage and computing basic unit, all PEs in the PE array can simultaneously process the data in each unit in parallel. This method is also often called a single instruction multiple data mode, namely SIMD, which is more common in GPUs. Row control modules 5 and column control modules 6 are designed in the horizontal and vertical directions of the PE array respectively. The row control module 5 is used to select rows and related controls for the PE array, and the corresponding column mode control module is used to select columns and related controls for the PE array, as well as data readout selection. The periphery of the PE array also includes a peripheral digital module 4, an INS bus 41, a peripheral analog module 3, and an interface module 7.
如图2所示,PE单元包括,感知单元(SU),模拟信号算子运算单元(AOP)、模拟存算单元(AREG Bank)、数字存算单元(DREG bank)、标签模块(TAG)、相邻PE通信单元(AdjacentIF),其中模拟存算单元包括若干个模拟信号存储器AREG0、AREG1……,模拟信号存储器本身也是运算单元。同样,数字存算单元包括若干个数字信号存储器DREG0、DREG1……,数字信号存储器除了存储数字信号外,还可以进行逻辑运算。标签单元的输出作为判断信号,在控制当前PE是否执行当前SIMD的指令。As shown in Figure 2, the PE unit includes a sensing unit (SU), an analog signal operator operation unit (AOP), an analog storage unit (AREG Bank), a digital storage unit (DREG bank), a tag module (TAG), and an adjacent PE communication unit (AdjacentIF). The analog storage unit includes several analog signal memories AREG0, AREG1, etc. The analog signal memory itself is also an operation unit. Similarly, the digital storage unit includes several digital signal memories DREG0, DREG1, etc. In addition to storing digital signals, the digital signal memory can also perform logical operations. The output of the tag unit is used as a judgment signal to control whether the current PE executes the current SIMD instruction.
常规的模拟信号转换到数字信号,需要用到专门ADC芯片,或者ADC电路来实现转换,对于传统图像传感器,从早期的单个ADC,发展到列级ADC,再到最新的像素级别的ADC设计,但是会增加芯片面积和转换所需的能耗,以及像素级的ADC需要更先进的工艺制程,如堆叠工艺。因为ADC设计尺寸限制,以及ADC的频率特性要求。这样传统的方式数据搬运过程,造成处理的高延迟,高功耗。To convert conventional analog signals to digital signals, a special ADC chip or ADC circuit is needed to realize the conversion. For traditional image sensors, from the early single ADC to the column-level ADC, and then to the latest pixel-level ADC design, the chip area and the energy consumption required for conversion will increase, and the pixel-level ADC requires more advanced process technology, such as stacking process. Because of the ADC design size limitation and the ADC frequency characteristic requirements, the traditional data handling process results in high processing delay and high power consumption.
尤其感存算芯片,PE中模拟存算单元和数字存算单元在进行信号在模拟域和数字域交互或者流动的时候面临较大的问题,要么在PE中设计ADC电路,但是带来的电路面积的问题和功耗问题。要么通过单个ADC电路串行转换,带来效率问题,和数据流动的延迟、功耗问题。Especially for the memory and computing chip, the analog memory and computing units and digital memory and computing units in PE face great problems when the signals interact or flow in the analog and digital domains. Either the ADC circuit is designed in PE, but it brings problems of circuit area and power consumption. Or the serial conversion is carried out through a single ADC circuit, which brings efficiency problems, data flow delay and power consumption problems.
发明内容Summary of the invention
本发明提出一种感存算一体宏单元电路、系统及数据处理方法,可以通过特殊模块,以及对PE模式控制实现转换功能。The present invention proposes a sensing, storage and computing integrated macro unit circuit, system and data processing method, which can realize the conversion function through special modules and PE mode control.
本发明提出一种感存算一体宏单元电路的模数转换方法,包括步骤:The present invention provides an analog-to-digital conversion method for a sensing-storage-computing integrated macro unit circuit, comprising the steps of:
标签模块从iSC总线读取模拟信号;The tag module reads the analog signal from the iSC bus;
标签模块将读取的模拟信号与若干个参考模拟信号进行遍历比较;The tag module compares the read analog signal with several reference analog signals;
根据比较结果得到对应的数字信号;Obtaining a corresponding digital signal according to the comparison result;
若干个参考模拟信号为随函数关系逐渐增大或减小的数据。The plurality of reference analog signals are data that gradually increase or decrease along a functional relationship.
可选的,参考模拟信号按照线性函数、指数函数、对数函数、幂函数或三角函数关系随次数逐渐增加或减小。Optionally, the reference analog signal gradually increases or decreases with the number of times according to a linear function, exponential function, logarithmic function, power function or trigonometric function relationship.
可选的,模拟信号按照线性函数、指数函数、对数函数、幂函数或三角函数关系随次数逐渐增加或减小。Optionally, the analog signal gradually increases or decreases with the number of times according to a linear function, exponential function, logarithmic function, power function or trigonometric function relationship.
可选的,数字信号的编码规则为标准二进制码、格雷码、汉明码或哈夫曼编码。Optionally, the encoding rule of the digital signal is standard binary code, Gray code, Hamming code or Huffman code.
可选的,根据比较结果得到对应的数字信号还包括步骤:Optionally, obtaining a corresponding digital signal according to the comparison result further includes the steps of:
数字存算单元初始化值为0;The initialization value of the digital storage unit is 0;
当标签模块比较结果为模拟信号小于参考模拟信号,则每比较1次,数字存算单元存储的数字信号按照编码规则改变一个数值,直到模拟信号大于或等于参考模拟信号,数字存算单元输出存储的数字信号。When the comparison result of the tag module is that the analog signal is less than the reference analog signal, the digital signal stored in the digital storage unit changes a value according to the encoding rule each time the comparison is performed until the analog signal is greater than or equal to the reference analog signal, and the digital storage unit outputs the stored digital signal.
可选的,还包括步骤:所述标签模块基于所存储的标识数据确定当前感存算一体宏单元电路是否执行INS总线发送的指令。Optionally, the method further includes the step of: the label module determining whether the current sensing, storage and computing integrated macro unit circuit executes the instruction sent by the INS bus based on the stored identification data.
可选的,还包括步骤:在数模转换模式下,标签模块由比较器电路和锁存器电路组成,比较器电路用来比较模拟信号与若干个参考模拟信号,锁存器用于将比较结果存储,当所述标签模块中存储的比较结果为第一值时,对应的处理单元执行当前INS指令,当所述标签模块中存储的比较结果为第二值时,对应的处理单元不执行当前INS指令。Optionally, the step is also included: in the digital-to-analog conversion mode, the label module is composed of a comparator circuit and a latch circuit, the comparator circuit is used to compare the analog signal with a number of reference analog signals, and the latch is used to store the comparison result, when the comparison result stored in the label module is a first value, the corresponding processing unit executes the current INS instruction, and when the comparison result stored in the label module is a second value, the corresponding processing unit does not execute the current INS instruction.
可选的,在非数模转换模式下,所述比较器还比较标识数据和输入参考信号,然后将比较器的输出结果存入后面的锁存器;当所述标签模块中存储的比较结果为第一值时,对应的处理单元执行当前INS指令,当所述标签模块中存储的比较结果为第二值时,对应的处理单元不执行当前INS指令。Optionally, in the non-digital-to-analog conversion mode, the comparator also compares the identification data and the input reference signal, and then stores the output result of the comparator in a subsequent latch; when the comparison result stored in the label module is a first value, the corresponding processing unit executes the current INS instruction, and when the comparison result stored in the label module is a second value, the corresponding processing unit does not execute the current INS instruction.
可选的,所述数字信号为3bit二进制信号。Optionally, the digital signal is a 3-bit binary signal.
可选的,还包括步骤:感存算一体宏单元电路外部的DAC单元发送参考模拟信号。Optionally, the step is also included: a DAC unit outside the sensing-storage-computing integrated macro unit circuit sends a reference analog signal.
本发明还提供了一种感存算一体宏单元电路,包括:The present invention also provides a sensing-storage-computing integrated macro unit circuit, comprising:
iSC总线,用于连接各模块,模块间传递感知信号和运算信号;iSC bus is used to connect various modules and transmit perception signals and operation signals between modules;
INS总线,用于连接各模块;INS bus, used to connect various modules;
数字存算单元,用于同时进行数据存储和数据运算,所述的数据包括数字信号;A digital storage and calculation unit, used for simultaneously performing data storage and data calculation, wherein the data includes digital signals;
模拟存算单元,用于同时进行数据存储和数据运算,所述的数据包括模拟信号;An analog storage and calculation unit, used for simultaneously performing data storage and data calculation, wherein the data includes analog signals;
标签模块,用于从iSC总线读取模拟信号;将读取的模拟信号与若干个参考模拟信号进行遍历比较;The tag module is used to read the analog signal from the iSC bus; compare the read analog signal with several reference analog signals;
输出模块,用于根据比较结果得到数字信号;An output module, used for obtaining a digital signal according to the comparison result;
第一控制模块,用于向标签模块提供参考模拟信号,所述若干个参考模拟信号为随函数关系逐渐增大或减小的数据。The first control module is used to provide reference analog signals to the tag module, wherein the reference analog signals are data that gradually increase or decrease along a functional relationship.
可选的,参考模拟信号按照线性函数、指数函数、对数函数、幂函数或三角函数关系随次数逐渐增加或递减。Optionally, the reference analog signal gradually increases or decreases with the number of times according to a linear function, exponential function, logarithmic function, power function or trigonometric function relationship.
可选的,编码模块,用于将参考模拟信号和数字信号按照一定的编码规则进行对应,数字信号的编码规则为标准二进制码、格雷码、汉明码或哈夫曼编码。Optionally, the encoding module is used to correspond the reference analog signal and the digital signal according to a certain encoding rule, and the encoding rule of the digital signal is standard binary code, Gray code, Hamming code or Huffman code.
可选的,还包括:第二控制模块,用于数字存算单元初始化值为0;Optionally, it further includes: a second control module, configured to initialize the digital storage unit to 0;
当标签模块比较结果为模拟信号小于参考模拟信号,则每比较1次,数字存算单元存储的数字信号按照编码规则改变一个数值,直到模拟信号大于或等于参考模拟信号。When the comparison result of the tag module is that the analog signal is less than the reference analog signal, the digital signal stored in the digital storage unit changes a value according to the encoding rule each time the comparison is performed until the analog signal is greater than or equal to the reference analog signal.
可选的,所述感知单元、模拟存算单元、数字存算单元、iSC总线、INS总线以及标签模块一体化的集成在同一芯片上。Optionally, the sensing unit, analog storage and computing unit, digital storage and computing unit, iSC bus, INS bus and tag module are integrated on the same chip.
可选的,所述标签模块基于所存储的标识数据确定当前感存算一体宏单元电路是否执行INS总线发送的指令。Optionally, the label module determines whether the current sensing-storage-computing-in-one macro unit circuit executes instructions sent by the INS bus based on the stored identification data.
可选的:在数模转换模式下,标签模块由比较器电路和锁存器电路组成,比较器电路用来比较模拟信号与若干个参考模拟信号,锁存器用于将比较结果存储,当所述标签模块中存储的比较结果为第一值时,对应的处理单元执行当前INS指令,当所述标签模块中存储的比较结果为第二值时,对应的处理单元不执行当前INS指令。Optional: In the digital-to-analog conversion mode, the label module is composed of a comparator circuit and a latch circuit. The comparator circuit is used to compare the analog signal with several reference analog signals, and the latch is used to store the comparison result. When the comparison result stored in the label module is a first value, the corresponding processing unit executes the current INS instruction. When the comparison result stored in the label module is a second value, the corresponding processing unit does not execute the current INS instruction.
可选的:在非数模转换模式下,所述比较器还比较标识数据和输入参考信号,然后将比较器的输出结果存入后面的锁存器;当所述标签模块中存储的比较结果为第一值时,对应的处理单元执行当前INS指令,当所述标签模块中存储的比较结果为第二值时,对应的处理单元不执行当前INS指令。Optional: In the non-digital-to-analog conversion mode, the comparator also compares the identification data and the input reference signal, and then stores the output result of the comparator in the subsequent latch; when the comparison result stored in the label module is a first value, the corresponding processing unit executes the current INS instruction, and when the comparison result stored in the label module is a second value, the corresponding processing unit does not execute the current INS instruction.
可选的,所述模拟存算单元包括多个模拟信号存储器,模拟信号存储器同时作为模拟运算单元,通过将所述多个模拟存算单元连接到同一iSC总线进行读写操作,使得模拟信号直接在模拟信号存储器中进行加减乘除运算。Optionally, the analog storage and computing unit includes multiple analog signal memories, which also serve as analog computing units. By connecting the multiple analog storage and computing units to the same iSC bus for read and write operations, analog signals can be directly added, subtracted, multiplied, and divided in the analog signal memories.
可选的,所述数字存算单元,包括若多个数字信号存储器,数字信号存储器同时具有存储和逻辑运算能力。Optionally, the digital storage and computing unit includes a plurality of digital signal memories, and the digital signal memories have both storage and logical operation capabilities.
可选的,所述的数字存算单元中设置有DREG BANK,所述DREG BANK包括多个数字信号存储器,以及数字读总线iSC RD DBUS和数字写总线iSC WR DBUS,所述的数字信号存储器为数字寄存器DREG;在数字读总线iSC RD DBUS和数字写总线iSC WR DBUS之间并行连接有多个数字寄存器DREG,其中,数字寄存器DREG的输入端IN接在数字写总线iSC WR DBUS上,数字寄存器DREG的输出端OUT连接在数字读总线iSC RD DBUS上,在数字读总线iSC RDDBUS和数字写总线iSC WR DBUS间还连接多路器MUX,数字寄存器DREG的数字读总线iSC RDDBUS还通过一开关连接到iSC总线上。Optionally, a DREG BANK is provided in the digital storage and computing unit, and the DREG BANK includes multiple digital signal memories, and a digital read bus iSC RD DBUS and a digital write bus iSC WR DBUS, and the digital signal memory is a digital register DREG; multiple digital registers DREG are connected in parallel between the digital read bus iSC RD DBUS and the digital write bus iSC WR DBUS, wherein the input end IN of the digital register DREG is connected to the digital write bus iSC WR DBUS, and the output end OUT of the digital register DREG is connected to the digital read bus iSC RD DBUS, and a multiplexer MUX is also connected between the digital read bus iSC RDDBUS and the digital write bus iSC WR DBUS, and the digital read bus iSC RDDBUS of the digital register DREG is also connected to the iSC bus through a switch.
可选的,所述的数字信号存储器采用3T DRAM、或者6T DRAM、SRAM实现。Optionally, the digital signal memory is implemented using 3T DRAM, or 6T DRAM, or SRAM.
可选的,所述的数字信号存储器采用Flash实现,其中,进一步包括:多个FLASH存储器,以及读写控制电路、数字读总线iSC RD DBUS以及多路器MUX,其中,FLASH存储器的输入端IN接在读写控制电路上,FLASH的输出端并行的连接到数字读总线iSC RD DBUS上,且数字读总线iSC RD DBUS与读写控制电路之间连接有多路器MUX。Optionally, the digital signal memory is implemented using Flash, which further includes: multiple FLASH memories, and a read-write control circuit, a digital read bus iSC RD DBUS and a multiplexer MUX, wherein the input end IN of the FLASH memory is connected to the read-write control circuit, the output end of the FLASH is connected in parallel to the digital read bus iSC RD DBUS, and a multiplexer MUX is connected between the digital read bus iSC RD DBUS and the read-write control circuit.
本发明还提供了一种感存算一体宏单元系统,包括:The present invention also provides a sensing, storage and computing integrated macro unit system, comprising:
多个感存算一体宏单元电路布局为阵列结构,其中:Multiple sensing, storage and computing integrated macro-unit circuits are arranged in an array structure, where:
感存算一体宏单元电路包括:The sensing, storage and computing integrated macro unit circuit includes:
iSC总线,用于连接各模块,模块间传递感知信号和运算信号;iSC bus is used to connect various modules and transmit perception signals and operation signals between modules;
INS总线,用于连接各模块;INS bus, used to connect various modules;
数字存算单元,用于同时进行数据存储和数据运算,所述的数据包括数字信号;A digital storage and calculation unit, used for simultaneously performing data storage and data calculation, wherein the data includes digital signals;
模拟存算单元,用于同时进行数据存储和数据运算,所述的数据包括模拟信号;An analog storage and calculation unit, used for simultaneously performing data storage and data calculation, wherein the data includes analog signals;
标签模块,用于从iSC总线读取模拟信号;将读取的模拟信号与若干个参考模拟信号进行遍历比较;The tag module is used to read the analog signal from the iSC bus; compare the read analog signal with several reference analog signals;
输出模块,用于根据比较结果得到数字信号;An output module, used for obtaining a digital signal according to the comparison result;
第一控制模块,用于向标签模块提供参考模拟信号,所述若干个参考模拟信号为随函数关系逐渐增大或减小的数据,所述外部DAC单元作为第一控制模块。The first control module is used to provide reference analog signals to the tag module. The reference analog signals are data that gradually increase or decrease with a functional relationship. The external DAC unit serves as the first control module.
可选的,感存算一体宏单元电路阵列位于同一个芯片上,Optionally, the sensing, storage and computing integrated macro unit circuit array is located on the same chip.
所述外部DAC位于芯片内或芯片外。The external DAC is located on-chip or off-chip.
本发明利用现有的PE资源,通过控制方法实现ADC的原理,进而实现并行化的模拟域到数字域信号转化的方法,契合感存算一体系统芯片SIMD的特点,对整个PE阵列同时实现ADC转换。让模拟域信号和数字域信号无障碍转换。The present invention utilizes existing PE resources and realizes the principle of ADC through a control method, thereby realizing a parallel method of converting analog domain to digital domain signals, which is in line with the characteristics of the SIMD system chip of sensing, storage and computing, and realizes ADC conversion for the entire PE array at the same time, allowing barrier-free conversion of analog domain signals and digital domain signals.
本发明利用PE中的现有部件实现如比较器,将模拟信号如Pixel信号和AREG电流信号转换成数字信号,存放在PE中的DREG中,在不需要增加特殊转换电路情况下,实现并行化的模拟域到数字域信号转化的方法,这种方法无需专用的ADC电路,利用了PE现有的电路实现了转换功能,这种并行的转换,等效于像素级别或者PE级别的信号转换,效率高,带宽高,非常适合视觉类的信号处理与转换。The present invention utilizes existing components in PE, such as comparators, to convert analog signals such as Pixel signals and AREG current signals into digital signals, which are stored in DREG in PE. This method realizes a parallel analog domain to digital domain signal conversion method without adding special conversion circuits. This method does not require a dedicated ADC circuit, but utilizes the existing circuits of PE to realize the conversion function. This parallel conversion is equivalent to pixel-level or PE-level signal conversion, has high efficiency and high bandwidth, and is very suitable for visual signal processing and conversion.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1是一种感存算一体宏单元系统的架构示意图;FIG1 is a schematic diagram of the architecture of a sensing-storage-computing integrated macro unit system;
图2是一种感存算一体宏单元电路的架构示意图;FIG2 is a schematic diagram of the architecture of a sensing-storage-computing integrated macro unit circuit;
图3是一种感存算一体宏单元电路的DREG架构示意图;FIG3 is a schematic diagram of a DREG architecture of a sensing-storage-computing integrated macro unit circuit;
图4是一种感存算一体宏单元电路的SRAM电路示意图;FIG4 is a schematic diagram of an SRAM circuit of a sensing-storage-computing integrated macro unit circuit;
图5是一种感存算一体宏单元电路的TAG电路示意图;FIG5 is a schematic diagram of a TAG circuit of a sensing-storage-computing integrated macro unit circuit;
图6是本申请一实施例的感存算一体宏单元电路的模数转换方法示意图;6 is a schematic diagram of an analog-to-digital conversion method of a sensing-storage-computing integrated macro unit circuit according to an embodiment of the present application;
图7是本申请一实施例的感存算一体宏单元电路的模数转换方法流程图;7 is a flow chart of an analog-to-digital conversion method of a sensing-storage-computing integrated macro unit circuit according to an embodiment of the present application;
图8是本申请另一实施例的感存算一体宏单元电路的模数转换方法示意图;8 is a schematic diagram of an analog-to-digital conversion method of a sensing-storage-computing integrated macro unit circuit according to another embodiment of the present application;
图9是本申请一实施例的感存算一体宏单元电路的模数转换方法编码示意图;9 is a schematic diagram of an analog-to-digital conversion method of a sensing-storage-computing integrated macro unit circuit according to an embodiment of the present application;
图10是本申请另一实施例的感存算一体宏单元电路的模数转换方法编码示意图。FIG. 10 is a schematic diagram of coding of an analog-to-digital conversion method of a sensing-storage-computing integrated macro unit circuit according to another embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,使本发明的优点和特征能更易于被本领域技术人员理解,从而对本发明的保护范围做出更为清楚明确的界定。显然,本发明所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more explicit definition of the protection scope of the present invention. Obviously, the embodiments described in the present invention are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
在本申请中,除非另外说明,否则使用“或”意味着“和/或”。此外,术语“包含”以及“包括”和“包括”等其他形式的使用不具限制性。另外,除非另外具体地说明,否则例如“元件”或“组件”等术语涵盖包含一个单元的元件和组件以及包含一个以上单元的元件和组件两者。In this application, the use of "or" means "and/or" unless otherwise stated. Furthermore, the use of the term "comprising" and other forms such as "including" and "comprising" are not limiting. In addition, unless specifically stated otherwise, terms such as "element" or "component" encompass both elements and components comprising one unit and elements and components comprising more than one unit.
本发明提供了一种感存算一体宏单元系统,包括多个上述的感存算一体宏单元电路,所述的多个感存算一体宏单元电路布局为阵列结构;The present invention provides a sensing-storage-computing integrated macro unit system, comprising a plurality of the sensing-storage-computing integrated macro unit circuits described above, wherein the plurality of sensing-storage-computing integrated macro unit circuits are arranged in an array structure;
感存算一体宏单元电路包括:The sensing, storage and computing integrated macro unit circuit includes:
iSC总线,用于连接各模块,模块间传递感知信号和运算信号;iSC bus is used to connect various modules and transmit perception signals and operation signals between modules;
INS总线,用于连接各模块;INS bus, used to connect various modules;
数字存算单元,用于同时进行数据存储和数据运算,所述的数据包括数字信号;A digital storage and calculation unit, used for simultaneously performing data storage and data calculation, wherein the data includes digital signals;
模拟存算单元,用于同时进行数据存储和数据运算,所述的数据包括模拟信号;An analog storage and calculation unit, used for simultaneously performing data storage and data calculation, wherein the data includes analog signals;
标签模块,用于从iSC总线读取模拟信号;将读取的模拟信号与若干个参考模拟信号进行遍历比较;The tag module is used to read the analog signal from the iSC bus; compare the read analog signal with several reference analog signals;
输出模块,用于根据比较结果得到数字信号;An output module, used for obtaining a digital signal according to the comparison result;
第一控制模块,用于向标签模块提供参考模拟信号,所述若干个参考模拟信号为随函数关系逐渐增大或减小的数据,所述外部DAC单元作为第一控制模块。The first control module is used to provide reference analog signals to the tag module. The reference analog signals are data that gradually increase or decrease with a functional relationship. The external DAC unit serves as the first control module.
在一实施例中,还包括:设置在所述阵列结构外部的DAC单元,所述外部DAC单元作为第一控制模块。In one embodiment, it further includes: a DAC unit arranged outside the array structure, and the external DAC unit serves as a first control module.
在一实施例中,感存算一体宏单元电路阵列位于同一个芯片上,所述外部DAC位于芯片内或芯片外。In one embodiment, the sensing, storage and computing integrated macro unit circuit array is located on the same chip, and the external DAC is located inside or outside the chip.
如图1所示,在本实施例中感存算一体宏单元系统具体设计在一个像素级感存算一体化芯片里,中间是处理宏单元(PE)阵列,由PE1以阵列形式紧密摆放在一起,例如1024*1024规模,PE的内部结构参考后面具体感存算一体宏单元电路及感存算一体宏单元电路的实施例进行详细说明,在此仅说明感存一体宏单元系统的总体架构。As shown in Figure 1, in this embodiment, the sensing-storage-computing integrated macro unit system is specifically designed in a pixel-level sensing-storage-computing integrated chip, with a processing macro unit (PE) array in the middle, which is closely arranged together in the form of an array of PE1, for example, a scale of 1024*1024. The internal structure of PE is described in detail with reference to the specific sensing-storage-computing integrated macro unit circuit and the embodiments of the sensing-storage-computing integrated macro unit circuit later. Here, only the overall architecture of the sensing-storage integrated macro unit system is described.
因为每个PE都包括感存算基本单元,所以PE阵列中的所有PE可以同时并行处理每个单元内的数据。这样的方式也常称为单指令多数据模式即SIMD,这种方式GPU中较为常见。在PE阵列水平方向和垂直方向分别设计行控制模块和列控制模块,行控制模块用于对PE阵列进行行选择和相关控制,相应的列模式控制模块用于对PE阵列进行列选择和相关控制,以及数据读出选择。因此除PE阵列外,感存一体电路系统还包括设置在PE阵列外围的模数转换单元(ADC)2、外围模拟模块3、外围数字模块4、行控制模块5、列控制模块6、接口模块7等、以及INS总线41。Because each PE includes a basic sensing, storage and computing unit, all PEs in the PE array can process the data in each unit in parallel at the same time. This method is also often called single instruction multiple data mode, namely SIMD, which is more common in GPUs. Row control modules and column control modules are designed in the horizontal and vertical directions of the PE array respectively. The row control module is used to perform row selection and related control on the PE array, and the corresponding column mode control module is used to perform column selection and related control on the PE array, as well as data readout selection. Therefore, in addition to the PE array, the sensing and storage integrated circuit system also includes an analog-to-digital conversion unit (ADC) 2, a peripheral analog module 3, a peripheral digital module 4, a row control module 5, a column control module 6, an interface module 7, etc., and an INS bus 41 arranged on the periphery of the PE array.
在一实施例中,感存算一体宏单元系统包括多个感存算一体宏单元电路布局为阵列结构,具体的可以为距离测量传感器的感存算一体宏单元电路,如图2所示,PE单元包括,感知单元SU,模拟信号算子运算单元AOP、模拟存算单元AREG bank、数字存算单元DREGbank、标签模块TAG、相邻PE通信单元adjacent IF,iSC总线、INS总线,上述单元和模块都连接到iSC总线和INS总线,iSC总线用于传递感知信号和运算信号,且所述感知单元和存算单元均连接到所述iSC总线;INS总线用于传递指令。标签模块,用于从iSC总线读取模拟信号;将读取的模拟信号与若干个参考模拟信号进行遍历比较,并输出比较结果;输出模块,用于根据比较结果和参考模拟信号输出数字信号;第一控制模块,用于向标签模块提供参考模拟信号,所述若干个参考模拟信号为随函数关系逐渐增大或减小的数据。In one embodiment, the sensing, storage and computing integrated macro unit system includes a plurality of sensing, storage and computing integrated macro unit circuits arranged in an array structure, specifically, the sensing, storage and computing integrated macro unit circuit of the distance measurement sensor, as shown in FIG2 , the PE unit includes a sensing unit SU, an analog signal operator operation unit AOP, an analog storage and computing unit AREG bank, a digital storage and computing unit DREGbank, a tag module TAG, an adjacent PE communication unit adjacent IF, an iSC bus, and an INS bus, the above units and modules are connected to the iSC bus and the INS bus, the iSC bus is used to transmit sensing signals and operation signals, and the sensing unit and the storage and computing unit are both connected to the iSC bus; the INS bus is used to transmit instructions. The tag module is used to read an analog signal from the iSC bus; the read analog signal is compared with a plurality of reference analog signals, and the comparison result is output; the output module is used to output a digital signal according to the comparison result and the reference analog signal; the first control module is used to provide a reference analog signal to the tag module, and the plurality of reference analog signals are data that gradually increases or decreases with a function relationship.
在一实施例中,参考模拟信号按照线性函数、指数函数、对数函数、幂函数或三角函数关系随次数逐渐增加或递减。In one embodiment, the reference analog signal gradually increases or decreases with the number of times according to a linear function, an exponential function, a logarithmic function, a power function or a trigonometric function relationship.
在一实施例中,编码模块,用于将参考模拟信号和数字信号按照一定的编码规则进行对应,数字信号的编码规则为标准二进制码、格雷码、汉明码或哈夫曼编码。In one embodiment, the encoding module is used to correspond the reference analog signal and the digital signal according to a certain encoding rule, and the encoding rule of the digital signal is standard binary code, Gray code, Hamming code or Huffman code.
在一实施例中,根据比较结果和参考模拟信号,输出对应的数字信号还包括步骤:In one embodiment, outputting a corresponding digital signal according to the comparison result and the reference analog signal further comprises the steps of:
数字存算单元初始化值为0;The initialization value of the digital storage unit is 0;
当标签模块比较结果为模拟信号小于参考模拟信号,则每比较1次,数字存算单元存储的数字信号按照编码规则改变一个数值,直到模拟信号大于或等于参考模拟信号,数字存算单元输出存储的数字信号。When the comparison result of the tag module is that the analog signal is less than the reference analog signal, the digital signal stored in the digital storage unit changes a value according to the encoding rule each time the comparison is performed until the analog signal is greater than or equal to the reference analog signal, and the digital storage unit outputs the stored digital signal.
在一实施例中,所述感知单元、模拟存算单元、数字存算单元、iSC总线、INS总线以及标签模块一体化的集成在同一芯片上。In one embodiment, the sensing unit, analog storage and computing unit, digital storage and computing unit, iSC bus, INS bus and tag module are integrated on the same chip.
在一实施例中,所述模拟存算单元包括多个模拟信号存储器,模拟信号存储器同时作为模拟运算单元,通过将所述多个模拟存算单元连接到同一iSC总线进行读写操作,使得模拟信号直接在模拟信号存储器中进行加减乘除运算。In one embodiment, the analog storage and computing unit includes multiple analog signal memories, which also serve as analog computing units. By connecting the multiple analog storage and computing units to the same iSC bus for read and write operations, analog signals can be directly added, subtracted, multiplied, and divided in the analog signal memories.
在一实施例中,所述数字存算单元,包括若多个数字信号存储器,数字信号存储器同时具有存储和逻辑运算能力。In one embodiment, the digital storage and computing unit includes a plurality of digital signal memories, and the digital signal memories have both storage and logic operation capabilities.
在一实施例中,所述的数字存算单元中设置有DREG BANK,所述DREG BANK包括多个数字信号存储器,以及数字读总线iSC RD数据总线和数字写总线iSC WR数据总线,所述的数字信号存储器为数字寄存器DREG;在数字读总线iSC RD数据总线和数字写总线iSC WR数据总线之间并行连接有多个数字寄存器DREG,其中,数字寄存器DREG的输入端IN接在iSCWR数据总线上,数字寄存器DREG的输出端OUT连接在iSC RD数据总线上,在数字读总线iSCRD数据总线和数字写总线iSC WR数据总线间还连接多路器MUX,数字寄存器DREG的数字读总线iSC RD数据总线还通过一开关连接到iSC总线上。In one embodiment, a DREG BANK is provided in the digital storage and computing unit, and the DREG BANK includes multiple digital signal memories, a digital read bus iSC RD data bus and a digital write bus iSC WR data bus, and the digital signal memory is a digital register DREG; multiple digital registers DREG are connected in parallel between the digital read bus iSC RD data bus and the digital write bus iSC WR data bus, wherein the input end IN of the digital register DREG is connected to the iSCWR data bus, and the output end OUT of the digital register DREG is connected to the iSC RD data bus, and a multiplexer MUX is also connected between the digital read bus iSCRD data bus and the digital write bus iSC WR data bus, and the digital read bus iSC RD data bus of the digital register DREG is also connected to the iSC bus through a switch.
在一实施例中,所述的数字信号存储器采用3T DRAM、或者6T DRAM、SRAM实现。In one embodiment, the digital signal memory is implemented using 3T DRAM, or 6T DRAM, or SRAM.
在一实施例中,所述的数字信号存储器采用Flash实现,其中,进一步包括:多个FLASH存储器,以及读写控制电路、读数据iSC RD数据总线以及多路器MUX,其中,FLASH存储器的输入端IN接在读写控制电路上,FLASH的输出端并行的连接到iSC RD数据总线上,且iSC RD数据总线与读写控制电路之间连接有多路器MUX。In one embodiment, the digital signal memory is implemented using Flash, which further includes: multiple FLASH memories, and a read-write control circuit, a read data iSC RD data bus and a multiplexer MUX, wherein the input end IN of the FLASH memory is connected to the read-write control circuit, the output end of the FLASH is connected in parallel to the iSC RD data bus, and a multiplexer MUX is connected between the iSC RD data bus and the read-write control circuit.
在一实施例中,还包括:所述标签模块中存储有标识数据,基于所存储的标识数据确定当前感存算一体宏单元电路是否执行INS总线发送的指令。In one embodiment, it also includes: identification data is stored in the label module, and whether the current sensing, storage and computing integrated macro unit circuit executes the instruction sent by the INS bus is determined based on the stored identification data.
在一实施例中,在运算时,将数字读总线iSC RD数据总线读出的一个或多个数字寄存器DREG信号通过多路器MUX写回到数字写总线iSC WR数据总线上再写到相应的一个或多个数字寄存器DREG中实现运算。In one embodiment, during operation, one or more digital register DREG signals read out from the digital read bus iSC RD data bus are written back to the digital write bus iSC WR data bus through the multiplexer MUX and then written into the corresponding one or more digital registers DREG to implement the operation.
在一实施例中,每个标签模块对应一个处理单元,用于根据标签模块中存储的比较结果,即标识数据决定当前处理单元PE是否执行当前INS指令;当所述标签模块中存储的比较结果为第一值时,对应的处理单元执行当前INS指令,当所述标签模块中存储的比较结果为第二值时,对应的处理单元不执行当前INS指令。In one embodiment, each label module corresponds to a processing unit, which is used to determine whether the current processing unit PE executes the current INS instruction based on the comparison result stored in the label module, that is, the identification data; when the comparison result stored in the label module is a first value, the corresponding processing unit executes the current INS instruction, and when the comparison result stored in the label module is a second value, the corresponding processing unit does not execute the current INS instruction.
在一实施例中,模拟存算单元包括若干个模拟信号存储器AREG0、AREG1……,模拟信号存储器本身也是运算单元,信号可以通过模拟存储器进行加减乘除运算,比如可以设计5个寄存器可以满足基本的运算需求。同样,所述的数字存算单元中设置有DREG BANK,所述DREG BANK包括多个数字信号存储器,所述的数字信号存储器为数字寄存器DREG;在DREGBANK中设计有专属的数字读总线iSC RD总线和数字写总线iSC WR总线,同时打开多个DREG读出控制信号RD到读总线上,可以实现存储数字信号的线与操作。数字读出总线可以通过选通管将信号传递到iSC总线上,进行进一步的操作。在两个总线间设计一个多路器MUX,将读总线的读出信号写回到写总线上再写到相应的DREG中,写回的信号与原来的信号相同也可以选择取反写回,这就是多路器MUX的作用,参考图3,在数字读总线iSC RD DBUS和数字写总线iSC WR DBUS之间并行连接有多个数字寄存器DREG0、DREG1……,数字信号存储器除了存储数字信号外,还可以进行逻辑运算。其中,数字寄存器DREG的输入端IN接在iSC WRDBUS上,数字寄存器DREG的输出端OUT连接在数字读总线iSC RD DBUS上,在数字读总线iSCRD DBUS和数字写总线iSC WR DBUS间还连接多路器MUX,数字寄存器DREG的数字读总线iSCRD DBUS还通过一开关连接到iSC总线上。In one embodiment, the analog storage and calculation unit includes several analog signal memories AREG0, AREG1..., and the analog signal memory itself is also an operation unit. The signal can be added, subtracted, multiplied and divided through the analog memory. For example, 5 registers can be designed to meet basic operation requirements. Similarly, the digital storage and calculation unit is provided with a DREG BANK, and the DREG BANK includes multiple digital signal memories, and the digital signal memory is a digital register DREG; a dedicated digital read bus iSC RD bus and a digital write bus iSC WR bus are designed in the DREGBANK, and multiple DREG read control signals RD are opened to the read bus at the same time, so as to realize the line and operation of storing digital signals. The digital read bus can pass the signal to the iSC bus through the selection tube for further operation. A multiplexer MUX is designed between the two buses to write the read signal of the read bus back to the write bus and then write it to the corresponding DREG. The written signal can be the same as the original signal and can also be written back inversely. This is the role of the multiplexer MUX. Referring to FIG3, multiple digital registers DREG0, DREG1, etc. are connected in parallel between the digital read bus iSC RD DBUS and the digital write bus iSC WR DBUS. In addition to storing digital signals, the digital signal memory can also perform logical operations. Among them, the input terminal IN of the digital register DREG is connected to the iSC WR DBUS, and the output terminal OUT of the digital register DREG is connected to the digital read bus iSC RD DBUS. A multiplexer MUX is also connected between the digital read bus iSCRD DBUS and the digital write bus iSC WR DBUS. The digital read bus iSCRD DBUS of the digital register DREG is also connected to the iSC bus through a switch.
所述的数字信号存储器采用3T DRAM、或者6T DRAM、SRAM实现。6T SRAM作为PE中数字信号存储DREG的电路,相比之前DRAM,存储更加稳定,但是会增加DREG的单元尺寸。数据通过MWR管写入数据,WR有效,IN输入有效信号,完成写操作,对应的,数据通过MRD管读出数据,RD有效,OUT输出有效信号,完成读操作。在本实施例中具体的RAM参考图4。The digital signal memory is implemented by 3T DRAM, or 6T DRAM, or SRAM. 6T SRAM is used as the circuit for digital signal storage DREG in PE. Compared with the previous DRAM, the storage is more stable, but the unit size of DREG will be increased. Data is written through the MWR tube, WR is valid, IN inputs a valid signal, and the write operation is completed. Correspondingly, data is read out through the MRD tube, RD is valid, OUT outputs a valid signal, and the read operation is completed. For the specific RAM in this embodiment, refer to Figure 4.
在一实施例中,模拟信号算子运算单元AOP除了通过模拟寄存器进行常规运算,根据应用场景特殊性,可以单独设计高效的特殊的算子实现特殊运算,比如平方运算,log运算,平方根运算等。In one embodiment, in addition to performing conventional operations through analog registers, the analog signal operator operation unit AOP can design efficient special operators to implement special operations, such as square operations, log operations, square root operations, etc., according to the particularity of the application scenario.
在运算时,将数字读总线iSC RD DBUS读出的一个或多个数字寄存器DREG信号通过多路器MUX写回到数字写总线iSC WR DBUS上再写到相应的一个或多个数字寄存器DREG中实现运算。During operation, one or more digital register DREG signals read out by the digital read bus iSC RD DBUS are written back to the digital write bus iSC WR DBUS through the multiplexer MUX and then written into the corresponding one or more digital registers DREG to implement the operation.
在一实施例中,所述标签模块基于所存储的标识数据确定当前感存算一体宏单元电路是否执行INS总线发送的指令。In one embodiment, the tag module determines whether the current sensing-storage-computing-in-one macro unit circuit executes the instruction sent by the INS bus based on the stored identification data.
在一实施例中,参考图5,标签单元包括一个比较器,用于从iSC总线读取模拟信号;将读取的模拟信号与若干个参考模拟信号进行遍历比较,并根据比较结果输出数字信号。In one embodiment, referring to FIG. 5 , the tag unit includes a comparator for reading an analog signal from the iSC bus; performing traversal comparison between the read analog signal and a plurality of reference analog signals, and outputting a digital signal according to the comparison result.
在一实施例中,标签模块的输出作为判断信号或者使能信号,用以控制当前PE是否执行全局SIMD的指令,设计有TAG模块的PE,当TAG输出状态为“无效”,则当前PE不执行当前指令,反之当TAG输出状态为“有效”,则当前PE执行当前的这条指令。影响TAG标签模块的信号来自于模拟寄存器的操作过程,如操作后信号溢出,还比如数字信号“0”和“1”数值判断,以及其他的操作结果。TAG标签模块设计由比较器电路和锁存器电路组成,比较器电路用来比较iSC总线上的信号与参考输入信号,然后将比较器的输出结果存入后面的锁存器。TAG标签模块对PE内部感知单元,模拟存算单元,数字存算单元,相邻PE通讯模块进行控制,通过使能电路控制上述单元电路读写操作或者工作状态,TAG标签模块控制范围仅为当前PE。芯片通过全局TAG复位信号使TAG恢复初始状态。In one embodiment, the output of the tag module is used as a judgment signal or an enable signal to control whether the current PE executes the global SIMD instruction. For a PE designed with a TAG module, when the TAG output state is "invalid", the current PE does not execute the current instruction. On the contrary, when the TAG output state is "valid", the current PE executes the current instruction. The signal affecting the TAG tag module comes from the operation process of the analog register, such as signal overflow after operation, and the numerical judgment of the digital signal "0" and "1", as well as other operation results. The TAG tag module is designed to consist of a comparator circuit and a latch circuit. The comparator circuit is used to compare the signal on the iSC bus with the reference input signal, and then the output result of the comparator is stored in the latch behind. The TAG tag module controls the PE internal perception unit, analog storage unit, digital storage unit, and adjacent PE communication module, and controls the read and write operations or working states of the above unit circuits through the enable circuit. The control range of the TAG tag module is only the current PE. The chip restores the TAG to its initial state through the global TAG reset signal.
在本实施例中,在数模转换模式下,标签模块的比较器电路用来比较模拟信号与若干个参考模拟信号,锁存器用于将比较结果存储,当所述标签模块中存储的比较结果为第一值时,对应的处理单元执行当前指令,当所述标签模块中存储的比较结果为第二值时,对应的处理单元不执行当前指令。In this embodiment, in the digital-to-analog conversion mode, the comparator circuit of the label module is used to compare the analog signal with a number of reference analog signals, and the latch is used to store the comparison result. When the comparison result stored in the label module is a first value, the corresponding processing unit executes the current instruction, and when the comparison result stored in the label module is a second value, the corresponding processing unit does not execute the current instruction.
在非数模转换模式下,所述比较器还比较标识数据和输入参考信号,然后将比较器的输出结果存入后面的锁存器;当所述标签模块中存储的比较结果为第一值时,对应的处理单元执行当前指令,当所述标签模块中存储的比较结果为第二值时,对应的处理单元不执行当前指令。In the non-digital-to-analog conversion mode, the comparator also compares the identification data and the input reference signal, and then stores the output result of the comparator in the subsequent latch; when the comparison result stored in the label module is a first value, the corresponding processing unit executes the current instruction, and when the comparison result stored in the label module is a second value, the corresponding processing unit does not execute the current instruction.
PE中还设计了相邻PE之间的通信接口如图2中相邻PE通信单元(Adjacent IF),可以将围绕当前PE周围8个PE的信息给到当前PE。上述模块单元通过特殊设计的感存算总线iSC总线连接在一起,模拟信号可以是电压,也可以是电流信号。除了iSC总线,PE中还设计全局指令总线INS总线,对PE中每个功能模块进行整体操作控制,因为每个PE的INS总线是由相同的全局信号控制,所以通过这种方式实现了存算一体化(SIMD)。The PE also designs a communication interface between adjacent PEs, such as the adjacent PE communication unit (Adjacent IF) in Figure 2, which can provide the current PE with information about the eight PEs surrounding the current PE. The above module units are connected together through a specially designed sense-storage-computation bus iSC bus. The analog signal can be a voltage or a current signal. In addition to the iSC bus, the PE also designs a global instruction bus INS bus to perform overall operation control on each functional module in the PE. Because the INS bus of each PE is controlled by the same global signal, storage-computation integration (SIMD) is achieved in this way.
在一实施例中,原始信号可以来自于SU单元,或者芯片外部写入到PE中,如图IO接入,亦或是相邻PE的信号,通过adjacent IF传递到本PE总线上。SU、IO或者adjacent IF将感知信号通过iSC总线传递给模拟寄存器AREG BANK,或是AOP单元,AREG内部可以进行存储和运算,具体实现方式下面说明详细讲述。模拟信号转换成数字信号,然后存储在DREGBANK中,可以进行数字运算和存储。运算结果可以存储在PE的AREG或者DREG中,再通过iSC总线或者其它总线及传输线输出到芯片外部,以实现某类应用功能。In one embodiment, the original signal may come from the SU unit, or be written into the PE from outside the chip, such as the IO access in the figure, or the signal of the adjacent PE, which is transmitted to the PE bus through the adjacent IF. The SU, IO or adjacent IF transmits the sensing signal to the analog register AREG BANK or the AOP unit through the iSC bus. The AREG can be stored and calculated. The specific implementation method is described in detail below. The analog signal is converted into a digital signal and then stored in the DREGBANK, which can be digitally calculated and stored. The calculation result can be stored in the AREG or DREG of the PE, and then output to the outside of the chip through the iSC bus or other buses and transmission lines to realize a certain type of application function.
在一实施例中,还包括:设置在所述阵列结构外部的DAC单元,所述外部DAC单元作为第一控制模块。In one embodiment, it further includes: a DAC unit arranged outside the array structure, and the external DAC unit serves as a first control module.
在一实施例中,感存算一体宏单元电路阵列位于同一个芯片上,所述外部DAC位于芯片内或芯片外。In one embodiment, the sensing, storage and computing integrated macro unit circuit array is located on the same chip, and the external DAC is located inside or outside the chip.
在一实施例中,感存算一体宏单元电路还包括:第二控制模块,用于数字存算单元初始化值为0;当标签模块比较结果为模拟信号小于参考模拟信号,则每比较1次,数字存算单元存储的数字信号按照编码规则改变一个数值,直到模拟信号大于或等于参考模拟信号,数字存算单元得到的数字信号。In one embodiment, the sensing, storage and computing integrated macro unit circuit also includes: a second control module, which is used to initialize the digital storage and computing unit to 0; when the comparison result of the label module is that the analog signal is less than the reference analog signal, the digital signal stored in the digital storage and computing unit changes a value according to the encoding rule for each comparison until the analog signal is greater than or equal to the reference analog signal, and the digital storage and computing unit obtains a digital signal.
下面结合感存算一体宏单元电路及其模数转换方法进一步说明。The following is further explained in conjunction with the sensing, storage and computing integrated macro unit circuit and its analog-to-digital conversion method.
参考图6,本实施例中感存算一体宏单元电路的模数转换方法,包括步骤:6 , the analog-to-digital conversion method of the sensing-storage-computing integrated macro unit circuit in this embodiment includes the following steps:
标签模块从iSC总线读取模拟信号;The tag module reads the analog signal from the iSC bus;
标签模块将读取的模拟信号与若干个参考模拟信号进行遍历比较;The tag module compares the read analog signal with several reference analog signals;
根据比较结果得到对应的数字信号;Obtaining a corresponding digital signal according to the comparison result;
若干个参考模拟信号为随函数关系逐渐增大或减小的数据。The plurality of reference analog signals are data that gradually increase or decrease along a functional relationship.
其中若干个参考模拟信号为随函数关系逐渐增大或减小的数据。Among them, several reference analog signals are data that gradually increase or decrease along with a functional relationship.
在一实施例中,参考模拟信号按照线性函数、指数函数、对数函数、幂函数或三角函数关系随次数逐渐增加或减小。In one embodiment, the reference analog signal gradually increases or decreases with the number according to a linear function, an exponential function, a logarithmic function, a power function or a trigonometric function relationship.
在一实施例中,数字信号的编码规则为标准二进制码、格雷码、汉明码或哈夫曼编码。In one embodiment, the encoding rule of the digital signal is standard binary code, Gray code, Hamming code or Huffman code.
本发明实现PE模拟域到数字域的转化,即将PE中的模拟信号转换成对应的数字信号。下面示例用将PE中AREG的模拟信号,如电流信号,转换成3bit精度,实际使用中可以使用5bit精度甚至更高的8bit数字信号,存储在数字存储器DREG中。The present invention realizes the conversion from PE analog domain to digital domain, that is, converting the analog signal in PE into the corresponding digital signal. The following example converts the analog signal of AREG in PE, such as the current signal, into 3-bit precision. In actual use, 5-bit precision or even higher 8-bit digital signal can be used and stored in the digital memory DREG.
在本实施例中,原始信号可以来自于SU单元,或者芯片外部写入到PE中,也可以是来自模拟寄存器AREG BANK,或是AOP单元,然发送到iSC总线。TAG单元从iSC总线接收模拟信号,从而根据AREG模拟电流信号的大小,以及负向输入端输入的电压大小,可以得出转换的数字信号,然后存储在DREG BANK中,可以进行数字运算和存储。运算结果可以存储在PE的DREG中,再通过iSC总线输出到芯片外部,以实现某类应用功能。在模数转换步骤中,模拟存算单元将模拟信号发送给iSC总线。In this embodiment, the original signal can come from the SU unit, or be written into the PE outside the chip, or it can come from the analog register AREG BANK, or the AOP unit, and then sent to the iSC bus. The TAG unit receives the analog signal from the iSC bus, and thus can obtain the converted digital signal according to the size of the AREG analog current signal and the size of the voltage input at the negative input terminal, and then store it in the DREG BANK, and digital operations and storage can be performed. The operation result can be stored in the DREG of the PE, and then output to the outside of the chip through the iSC bus to realize a certain type of application function. In the analog-to-digital conversion step, the analog storage unit sends the analog signal to the iSC bus.
以上所有的数据传输和信号的采集,都需要INS指令控制,INS总线连接了每个PE中的部件,INS可以来自于芯片外的系统下发指令,也可以有芯片内部MCU模块发出,或者芯片内部自己产生特定应用的INS。所述标签模块基于所存储的标识数据确定当前感存算一体宏单元电路是否执行INS总线发送的指令。All the above data transmission and signal collection require INS command control. The INS bus connects the components in each PE. The INS can come from the system outside the chip, or it can be issued by the MCU module inside the chip, or the chip itself generates an INS for specific applications. The label module determines whether the current sensing, storage and computing macro unit circuit executes the instruction sent by the INS bus based on the stored identification data.
具体的,在本实施例中,AREG的存储电流范围是-8uA到8uA,输出到iSC总线上的电压也会对应变化,0.2V到0.9V。Specifically, in this embodiment, the storage current range of AREG is -8uA to 8uA, and the voltage output to the iSC bus will also change accordingly, from 0.2V to 0.9V.
具体的,标签模块的输出作为判断信号或者使能信号,用以控制当前PE是否执行全局SIMD的指令,设计有TAG模块的PE,当TAG输出状态为“无效”,则当前PE不执行当前指令,反之当TAG输出状态为“有效”,则当前PE执行当前的这条指令。影响TAG标签模块的信号来自于模拟寄存器的操作过程,如操作后信号溢出,还比如数字信号“0”和“1”数值判断,以及其他的操作结果。TAG标签模块设计由比较器电路如图5所示和锁存器电路组成,比较器电路用来比较iSC总线上的信号与参考输入信号,然后将比较器的输出结果存入后面的锁存器。TAG对PE内部感知单元,模拟存算单元,数字存算单元,相邻PE通讯模块进行控制,通过使能电路控制上述单元电路读写操作或者工作状态,TAG标签模块控制范围仅为当前PE。芯片通过全局TAG复位信号使TAG恢复初始状态。Specifically, the output of the tag module is used as a judgment signal or an enable signal to control whether the current PE executes the global SIMD instruction. For a PE designed with a TAG module, when the TAG output state is "invalid", the current PE does not execute the current instruction. On the contrary, when the TAG output state is "valid", the current PE executes the current instruction. The signal that affects the TAG tag module comes from the operation process of the analog register, such as signal overflow after operation, and the value judgment of the digital signal "0" and "1", as well as other operation results. The TAG tag module design consists of a comparator circuit as shown in Figure 5 and a latch circuit. The comparator circuit is used to compare the signal on the iSC bus with the reference input signal, and then the output result of the comparator is stored in the latch behind. TAG controls the internal perception unit, analog storage unit, digital storage unit, and adjacent PE communication module of the PE, and controls the read and write operations or working states of the above unit circuits through the enable circuit. The control range of the TAG tag module is only the current PE. The chip restores the TAG to its initial state through the global TAG reset signal.
在一实施例中,还包括步骤:所述标签模块基于所存储的标识数据确定当前感存算一体宏单元电路是否执行INS总线发送的指令。In one embodiment, the step is further included: the tag module determines whether the current sensing-storage-computing-in-one macro unit circuit executes the instruction sent by the INS bus based on the stored identification data.
在一实施例中,还包括步骤:在数模转换模式下,比较器电路用来比较模拟信号与若干个参考模拟信号,锁存器用于将比较结果存储,当所述标签模块中存储的比较结果为第一值时,对应的处理单元执行当前指令,当所述标签模块中存储的比较结果为第二值时,对应的处理单元不执行当前指令。In one embodiment, the steps are further included: in the digital-to-analog conversion mode, the comparator circuit is used to compare the analog signal with a plurality of reference analog signals, the latch is used to store the comparison result, when the comparison result stored in the label module is a first value, the corresponding processing unit executes the current instruction, and when the comparison result stored in the label module is a second value, the corresponding processing unit does not execute the current instruction.
在一实施例中,还包括步骤:在非数模转换模式下,所述比较器还比较标识数据和输入参考信号,然后将比较器的输出结果存入后面的锁存器;当所述标签模块中存储的比较结果为第一值时,对应的处理单元执行当前指令,当所述标签模块中存储的比较结果为第二值时,对应的处理单元不执行当前指令。In one embodiment, the steps are further included: in a non-digital-to-analog conversion mode, the comparator also compares the identification data and the input reference signal, and then stores the output result of the comparator in a subsequent latch; when the comparison result stored in the label module is a first value, the corresponding processing unit executes the current instruction, and when the comparison result stored in the label module is a second value, the corresponding processing unit does not execute the current instruction.
具体数模转换模式和非数模转换模式可以通过在比较器的参考信号输入端连接多路选通开关,例如在数模转换模式选择输入参考模拟信号,在非数模转换模式选择输入跟标识数据的比较参考信号。另外还可以在比较器的正向输入端设置多路选通开关,在相应模式下选择从iSC总线读取模拟信号。The specific D/A conversion mode and non-D/A conversion mode can be selected by connecting a multi-way selection switch at the reference signal input terminal of the comparator, for example, selecting to input the reference analog signal in the D/A conversion mode, and selecting to input the comparison reference signal with the identification data in the non-D/A conversion mode. In addition, a multi-way selection switch can be set at the positive input terminal of the comparator to select to read the analog signal from the iSC bus in the corresponding mode.
因为TAG模块主要的电路是比较器电路,因此利用TAG比较器的特性,实现在PE中实现ADC功能,即实现PE中模拟域信号到数字域信号的相互转化。具体的,将iSC总线与TAG中的比较器正端相连。TAG中比较器的负向端输入参考模拟信号。Because the main circuit of the TAG module is the comparator circuit, the characteristics of the TAG comparator are used to realize the ADC function in the PE, that is, to realize the mutual conversion of analog domain signals in the PE to digital domain signals. Specifically, the iSC bus is connected to the positive end of the comparator in the TAG. The negative end of the comparator in the TAG inputs the reference analog signal.
具体的可以由AREG或者SU向iSC总线发送模拟信号,TAG内部包括一个比较器电路,用来比较从iSC获取的模拟信号和参考模拟信号两个信号的大小。如图5所示,MOS管M171的栅极输入电压信号A,MOS管M172的栅极输入电压信号B,MOS管M172的漏极作为输出端,比较器电路用来比较两个信号的大小,当A小于B,会造成TAG的输出变为0,或者将模拟寄存器AREG的输出端输入到B端,参考模拟信号电压输入到A端,判断该AREG的值是否超过给定的参考模拟信号电压,超过为0,低于阈值则变成1。Specifically, the analog signal can be sent to the iSC bus by AREG or SU. The TAG includes a comparator circuit inside to compare the magnitude of the analog signal obtained from the iSC and the reference analog signal. As shown in FIG5 , the gate input voltage signal A of the MOS tube M171, the gate input voltage signal B of the MOS tube M172, and the drain of the MOS tube M172 are used as the output terminal. The comparator circuit is used to compare the magnitude of the two signals. When A is less than B, the output of the TAG will become 0, or the output terminal of the analog register AREG is input to the B terminal, and the reference analog signal voltage is input to the A terminal to determine whether the value of the AREG exceeds the given reference analog signal voltage. If it exceeds, it is 0, and if it is lower than the threshold, it becomes 1.
例如在本实施例中,是利用PE阵列外围的DAC单元连接TAG中比较器的负向端,提供参考模拟信号。根据图8和图9,芯片上的DAC模块可以用来产生斜坡阶梯电压,输出给比较器的负端,输出范围根据AREG中存储的信号范围相当,斜坡阶梯输出电压的变化根量化的精度有关,如3bit量化精度,需要8个阶梯电压值。这种对应关系是一个线性关系,编码的大小与量化的电压是线性关系。For example, in this embodiment, the DAC unit on the periphery of the PE array is connected to the negative end of the comparator in the TAG to provide a reference analog signal. According to Figures 8 and 9, the DAC module on the chip can be used to generate a ramp step voltage and output it to the negative end of the comparator. The output range is equivalent to the signal range stored in the AREG. The change of the ramp step output voltage is related to the quantization accuracy. For example, 8 step voltage values are required for a 3-bit quantization accuracy. This correspondence is a linear relationship, and the size of the code is linearly related to the quantized voltage.
在本实施例中,数字信号的编码规则为标准二进制码、在其他实施例中还可以按照格雷码、汉明码或哈夫曼编码等,均在本发明的保护范围内。参考模拟信号按照线性函数、指数函数、对数函数、幂函数或三角函数关系随次数逐渐增加或者减小。在本另一实施例中,采用另一种非线性量化方法,调整DAC的输出特性,使其非线性输出,如LOG曲线,并对应线性的数字编码,可以实现动态范围较高的量化转换方式,尤其是光学成像的数据转换。In this embodiment, the coding rule of the digital signal is a standard binary code, and in other embodiments, it can also be based on Gray code, Hamming code or Huffman code, etc., all of which are within the scope of protection of the present invention. The reference analog signal gradually increases or decreases with the number of times according to a linear function, exponential function, logarithmic function, power function or trigonometric function relationship. In another embodiment of this invention, another nonlinear quantization method is used to adjust the output characteristics of the DAC to make it nonlinear output, such as a LOG curve, and corresponding to a linear digital code, which can achieve a quantization conversion method with a higher dynamic range, especially data conversion for optical imaging.
在一实施例中,如图7所示,控制流程,通过指令控制,芯片根据指令执行操作,整个PE阵列以SIMD方式动作。模拟信号转换数字信号,具体操作流程和步骤如下:In one embodiment, as shown in FIG7 , the control process is controlled by instructions, the chip performs operations according to the instructions, and the entire PE array operates in a SIMD manner. The analog signal is converted into a digital signal, and the specific operation process and steps are as follows:
S10:对TAG单元进行复位,TAG值变成了“0”。S10: The TAG unit is reset and the TAG value becomes "0".
S20:DREGs初始化为0,将DREG1、DREG2、DREG3存储为初始值例如000。S20: DREGs is initialized to 0, and DREG1, DREG2, and DREG3 are stored as initial values, such as 000.
S30:TAG单元比较模拟信号和参考模拟信号。S30: The TAG unit compares the analog signal with the reference analog signal.
TAG单元从iSC总线接收模拟信号,外部DAC向TAG单元提供模拟参考信号,例如0.2v。The TAG unit receives an analog signal from the iSC bus, and the external DAC provides an analog reference signal, such as 0.2V, to the TAG unit.
S40:根据比较结果赋TAG值;如果TAG单元比较模拟信号小于参考模拟信号,则TAG=0,执行步骤S50。S40: assign a TAG value according to the comparison result; if the TAG unit comparison analog signal is smaller than the reference analog signal, TAG=0, and execute step S50.
否则,TAG=1,执行步骤S60。Otherwise, TAG=1, and execute step S60.
S50:DREGs按照编码规则改变一个数值,例如加1,相应的3个bit DREG1、DREG2、DREG3对应的值变化,并且外部DAC向TAG单元提供模拟参考信号增加一个固定值,例如0.1v,参考模拟信号增加到0.3v,返回执行步骤S30。S50: DREGs changes a value according to the coding rules, for example, adds 1, and the corresponding values of the three bits DREG1, DREG2, and DREG3 change, and the external DAC provides an analog reference signal to the TAG unit that increases by a fixed value, for example, 0.1v, and the reference analog signal increases to 0.3v, and returns to execute step S30.
S60:DREGs锁定,完成一次数模转换。S60: DREGs are locked and a digital-to-analog conversion is completed.
因此在步骤S30和S40中,一直循环到完成一次数模转换。Therefore, in steps S30 and S40, the loop is continued until one digital-to-analog conversion is completed.
具体的对应关系如下:The specific corresponding relationships are as follows:
模拟信号小于0.2V,DREGs置为000;If the analog signal is less than 0.2V, DREGs is set to 000;
模拟信号0.2V-0.3V之间,DREG置为001;When the analog signal is between 0.2V and 0.3V, DREG is set to 001;
模拟信号0.3V-0.3V之间,DREG置为010;When the analog signal is between 0.3V-0.3V, DREG is set to 010;
模拟信号0.4V-0.5V之间,DREG置为011;When the analog signal is between 0.4V and 0.5V, DREG is set to 011;
模拟信号0.5V-0.6V之间,DREG置为100;When the analog signal is between 0.5V and 0.6V, DREG is set to 100;
模拟信号0.6V-0.7V之间,DREG置为101;When the analog signal is between 0.6V and 0.7V, DREG is set to 101;
模拟信号0.7V-0.8V之间,DREG置为110;When the analog signal is between 0.7V and 0.8V, DREG is set to 110;
模拟信号0.8V-0.9V之间,DREG置为111;When the analog signal is between 0.8V and 0.9V, DREG is set to 111;
通过全局指令控制多个DREG实现计数器功能,如3bit精度转换需要3个DREG,DREG0/DREG1/DREG2,让DREG0/DREG1/DREG2,从“000”变化到“111”,同时每次数值变化比较器的负端输入对应的电压,当比较器负端输入的电压与iSC总线电压相当或者大于iSC总线电压总线,TAG中的比较器输出从0变化到1,TAG值变成了1,此时当前PE不会响应全局指令,DREG0/DREG1/DREG2中的值不输出,锁定当前数值,不再随INS控制变化,此时的数值对应模拟信号的大小,DREG锁定当前数值,不再响应全局DREG操作,即完成一次数模转换。The counter function is realized by controlling multiple DREGs through global instructions. For example, 3-bit precision conversion requires 3 DREGs, DREG0/DREG1/DREG2. Let DREG0/DREG1/DREG2 change from "000" to "111". At the same time, each time the value changes, the negative input of the comparator corresponds to the voltage. When the voltage of the negative input of the comparator is equivalent to or greater than the iSC bus voltage, the comparator output in TAG changes from 0 to 1, and the TAG value becomes 1. At this time, the current PE will not respond to the global instruction, and the value in DREG0/DREG1/DREG2 will not be output. The current value is locked and no longer changes with INS control. The value at this time corresponds to the size of the analog signal. DREG locks the current value and no longer responds to the global DREG operation, that is, a digital-to-analog conversion is completed.
在另一实施例中,如图可以采用参考模拟信号按照对数函数关系随次数逐渐增加。In another embodiment, as shown in the figure, the reference analog signal may be gradually increased with the number of times according to a logarithmic function relationship.
在另一实施例中,参考图10,数字信号的编码规则为以采用格雷码。采用gray(格雷)码方式可以提高量化效率,因为自然数序列之间变化涉及到多个bit同时变化,这导致需要多个指令实现对应的数值变化。如果使用格雷码方式,每个数字之间只需要一个bit变化,也就是只需要一条指令实现对应的数值序列的变化。如下图3bit序列和4bit数值序列变化。In another embodiment, referring to FIG10 , the encoding rule of the digital signal is to use Gray code. The use of Gray code can improve the quantization efficiency, because the change between natural number sequences involves multiple bits changing at the same time, which requires multiple instructions to achieve the corresponding numerical changes. If the Gray code method is used, only one bit needs to change between each number, that is, only one instruction is needed to achieve the change of the corresponding numerical sequence. The following figure shows the change of 3-bit sequence and 4-bit numerical sequence.
具体的对应关系如下:The specific corresponding relationships are as follows:
模拟信号小于0.2V,DREG置为000;If the analog signal is less than 0.2V, DREG is set to 000;
模拟信号0.2V-0.3V之间,DREG置为001;When the analog signal is between 0.2V and 0.3V, DREG is set to 001;
模拟信号0.3V-0.3V之间,DREG置为011;When the analog signal is between 0.3V-0.3V, DREG is set to 011;
模拟信号0.4V-0.5V之间,DREG置为010;When the analog signal is between 0.4V and 0.5V, DREG is set to 010;
模拟信号0.5V-0.6V之间,DREG置为110;When the analog signal is between 0.5V and 0.6V, DREG is set to 110;
模拟信号0.6V-0.7V之间,DREG置为111;When the analog signal is between 0.6V and 0.7V, DREG is set to 111;
模拟信号0.7V-0.8V之间,DREG置为101;When the analog signal is between 0.7V and 0.8V, DREG is set to 101;
模拟信号0.8V-0.9V之间,DREG置为100。When the analog signal is between 0.8V and 0.9V, DREG is set to 100.
在另一实施例中,还可以采用4bit的编码,也就是DREG的精确度为4bit。In another embodiment, 4-bit encoding may be used, that is, the accuracy of DREG is 4 bits.
具体的对应关系如下:The specific corresponding relationships are as follows:
模拟信号小于0.2V,DREG置为0000;If the analog signal is less than 0.2V, DREG is set to 0000;
模拟信号0.2V-0.25V之间,DREG置为0001;When the analog signal is between 0.2V and 0.25V, DREG is set to 0001;
模拟信号0.25V-0.3V之间,DREG置为0011;When the analog signal is between 0.25V and 0.3V, DREG is set to 0011;
模拟信号0.3V-0.35V之间,DREG置为0010;When the analog signal is between 0.3V and 0.35V, DREG is set to 0010;
模拟信号0.35V-0.4V之间,DREG置为0110;When the analog signal is between 0.35V and 0.4V, DREG is set to 0110;
模拟信号0.4V-0.45V之间,DREG置为0111;When the analog signal is between 0.4V and 0.45V, DREG is set to 0111;
模拟信号0.45V-0.5V之间,DREG置为0101;When the analog signal is between 0.45V and 0.5V, DREG is set to 0101;
模拟信号0.5V-0.55V之间,DREG置为0100;When the analog signal is between 0.5V and 0.55V, DREG is set to 0100;
模拟信号0.55V-0.6V之间,DREG置为1100;When the analog signal is between 0.55V and 0.6V, DREG is set to 1100;
模拟信号0.6V-0.65V之间,DREG置为1101;When the analog signal is between 0.6V and 0.65V, DREG is set to 1101;
模拟信号0.65V-0.7V之间,DREG置为1111;When the analog signal is between 0.65V and 0.7V, DREG is set to 1111;
模拟信号0.7V-0.75V之间,DREG置为1010;When the analog signal is between 0.7V and 0.75V, DREG is set to 1010;
模拟信号0.75V-0.8V之间,DREG置为1011;When the analog signal is between 0.75V and 0.8V, DREG is set to 1011;
模拟信号0.8V-0.85V之间,DREG置为1001;When the analog signal is between 0.8V and 0.85V, DREG is set to 1001;
模拟信号0.85V-0.9V之间,DREG置为1000。The analog signal is between 0.85V-0.9V, and DREG is set to 1000.
常规的模拟信号转换到数字信号,需要用到专门ADC芯片,或者ADC电路来实现转换,对于传统图像传感器,从早期的单个ADC,发展到列级ADC,再到最新的像素级别的ADC设计,但是这需要先进工艺制程要求。因为ADC设计尺寸限制,以及ADC的频率特性要求。这样传统的方式数据搬运过程,造成处理的高延迟,高功耗。To convert conventional analog signals to digital signals, a special ADC chip or ADC circuit is needed to realize the conversion. For traditional image sensors, the early single ADC has developed to column-level ADC, and then to the latest pixel-level ADC design, but this requires advanced process requirements. Because of the ADC design size limitation and ADC frequency characteristic requirements, the traditional data handling process results in high processing delay and high power consumption.
尤其感存算芯片,PE中存在模拟信号的运算存储单元和数字信号运算和存储单元。信号在模拟域和数字域交互或者流动的时候面临较大的问题,要么在PE中设计ADC电路,但是带来的电路面积的问题和功耗问题。要么通过单个ADC电路串行转换,带来效率问题,和数据流动的延迟、功耗问题。Especially for the sensing storage chip, there are analog signal operation and storage units and digital signal operation and storage units in the PE. When the signal interacts or flows in the analog domain and the digital domain, it faces great problems. Either the ADC circuit is designed in the PE, but it brings problems of circuit area and power consumption. Or a single ADC circuit is used for serial conversion, which brings efficiency problems, data flow delay, and power consumption problems.
本发明利用量化后的数字信号,存放在DREGs中,可以用来进行数字域的计算,或者作为最终的运算结果本发明提供了PE中,并行化的模拟域到数字域信号转化的方法,这种方法无需专用的ADC电路,利用了PE现有的电路实现了转换功能,这种并行的转换,等效于像素级别或者PE级别的信号转换,效率高,带宽高,非常适合视觉类的信号处理与转换。输出给芯片后级的数字系统,如MCU。The present invention utilizes the quantized digital signal and stores it in DREGs, which can be used for digital domain calculations or as the final calculation result. The present invention provides a method for parallelizing analog domain to digital domain signal conversion in PE. This method does not require a dedicated ADC circuit, but uses the existing circuit of PE to realize the conversion function. This parallel conversion is equivalent to pixel-level or PE-level signal conversion, with high efficiency and high bandwidth, and is very suitable for visual signal processing and conversion. Output to the digital system of the chip post-stage, such as MCU.
利用现有PE中部件实现如比较器,将模拟信号如Pixel信号和AREG电流信号转换成数字信号,存放在PE中的DREG中,在不需要增加特殊转换电路情况下,实现并行化的模拟域到数字域信号转化的方法,这种方法无需专用的ADC电路,利用了PE现有的电路实现了转换功能,这种并行的转换,等效于像素级别的信号转换,效率高,带宽高,非常适合视觉类的信号处理与转换。By utilizing existing components in PE, such as comparators, analog signals such as Pixel signals and AREG current signals are converted into digital signals and stored in DREG in PE. This method realizes parallel analog domain to digital domain signal conversion without adding special conversion circuits. This method does not require a dedicated ADC circuit and utilizes the existing circuits of PE to realize the conversion function. This parallel conversion is equivalent to pixel-level signal conversion, with high efficiency and high bandwidth, and is very suitable for visual signal processing and conversion.
契合感存算芯片SIMD的执行方式,这种转换方式仅在PE中流转,无需传输到PE外,这样减少数据的流动,极大的减少延迟和,数据搬运带来的功耗。In line with the SIMD execution mode of the memory computing chip, this conversion method only circulates in the PE and does not need to be transmitted outside the PE. This reduces the flow of data and greatly reduces the delay and power consumption caused by data transportation.
本申请公开的机制的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程系统上执行的计算机程序或程序代码,该可编程系统包括至少一个处理器、存储系统(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device and at least one output device.
可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner.
程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理系统通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读介质分发。因此,机器可读介质可以包括用于以机器(例如,计算机)可读的形式存储或传输信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(CD-ROMs)、磁光盘、只读存储器(ROM)、随机存取存储器(RAM)、可擦除可编程只读存储器(EPROM)、电可擦除可编程只读存储器(EEPROM)、磁卡或光卡、闪存、或用于利用因特网以电、光、声或其他形式的传播信号来传输信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器可读介质包括适合于以机器(例如计算机)可读的形式存储或传输电子指令或信息的任何类型的机器可读介质。In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the accompanying drawings, some structural or method features may be shown in a specific arrangement and/or order. However, it should be understood that such a specific arrangement and/or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and/or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。It should be noted that the units/modules mentioned in the various device embodiments of the present application are all logical units/modules. Physically, a logical unit/module can be a physical unit/module, or a part of a physical unit/module, or can be implemented as a combination of multiple physical units/modules. The physical implementation method of these logical units/modules themselves is not the most important. The combination of functions implemented by these logical units/modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units/modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units/modules in the above-mentioned device embodiments.
需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims (23)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411769901.7A CN119441134B (en) | 2024-12-04 | 2024-12-04 | Sensing and memory calculation integrated macro unit circuit, system and analog-to-digital conversion method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411769901.7A CN119441134B (en) | 2024-12-04 | 2024-12-04 | Sensing and memory calculation integrated macro unit circuit, system and analog-to-digital conversion method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN119441134A CN119441134A (en) | 2025-02-14 |
| CN119441134B true CN119441134B (en) | 2025-07-04 |
Family
ID=94525586
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202411769901.7A Active CN119441134B (en) | 2024-12-04 | 2024-12-04 | Sensing and memory calculation integrated macro unit circuit, system and analog-to-digital conversion method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN119441134B (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116881193A (en) * | 2023-09-01 | 2023-10-13 | 北京犀灵视觉科技有限公司 | Sensing and storing integrated macro unit circuit, system and data processing method |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| IL145245A0 (en) * | 2001-09-03 | 2002-06-30 | Jtc 2000 Dev Delaware Inc | System and method including vector-matrix multiplication |
| JP5304410B2 (en) * | 2009-04-17 | 2013-10-02 | ソニー株式会社 | AD converter, solid-state imaging device, and camera system |
| CN116821048A (en) * | 2022-03-22 | 2023-09-29 | 华为技术有限公司 | Integrated memory chip and operation method thereof |
| CN116821047B (en) * | 2023-08-31 | 2023-10-31 | 北京犀灵视觉科技有限公司 | Sensing and storing integrated circuit, system and method |
-
2024
- 2024-12-04 CN CN202411769901.7A patent/CN119441134B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116881193A (en) * | 2023-09-01 | 2023-10-13 | 北京犀灵视觉科技有限公司 | Sensing and storing integrated macro unit circuit, system and data processing method |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119441134A (en) | 2025-02-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110991608B (en) | Convolutional neural network quantitative calculation method and system | |
| CN111899784B (en) | Method and device for measuring threshold voltage distribution in NAND flash memory and storage medium | |
| US20120314496A1 (en) | Nonvolatile memory devices having improved read reliability | |
| CN113361695B (en) | Convolutional neural network accelerator | |
| US12033699B2 (en) | Memory device and operation method thereof for performing multiply accumulate operation | |
| CN115022628B (en) | JPEG-LS (joint photographic experts group-LS) -based high-throughput lossless image compression method | |
| CN112153139A (en) | Control system and method based on sensor network and in-memory computing neural network | |
| CN119441134B (en) | Sensing and memory calculation integrated macro unit circuit, system and analog-to-digital conversion method | |
| CN110309877B (en) | Feature map data quantization method and device, electronic equipment and storage medium | |
| JPH09288895A (en) | Ternary storage semiconductor storage system | |
| CN111710356B (en) | Coding type flash memory device and coding method | |
| CN119537309B (en) | Sensing and storing integrated macro unit circuit, system and digital-to-analog conversion method | |
| CN113741857B (en) | Multiply-accumulate operation circuit | |
| CN113988279B (en) | A method and system for reading output current of a storage and computing array supporting negative value excitation | |
| JP7206531B2 (en) | Memory device and method of operation | |
| CN214846708U (en) | Chip architecture for AI calculation based on NVM | |
| Guo et al. | Boosting reram-based DNN by row activation oversubscription | |
| CN115862710A (en) | Control method for NAND flash memory to realize exclusive OR operation | |
| Thangavel et al. | Intrinsic evolution of truncated Puiseux series on a mixed-signal field-programmable soc | |
| Quiles et al. | Development of a wireless low power datalogger with high performance converter | |
| CN117492696A (en) | Multiplication and addition circuits, memories and electronic devices | |
| RU2717629C1 (en) | Random sequence generator | |
| CN217693295U (en) | A Gray code counter and image sensor | |
| CN115955237B (en) | Analog-to-digital conversion module optimization method based on memory-calculation integrated array weight preprocessing | |
| US20250278824A1 (en) | State detecting device and state detecting method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |