TWM614073U - Processing device for executing convolution neural network computation - Google Patents

Processing device for executing convolution neural network computation Download PDF

Info

Publication number
TWM614073U
TWM614073U TW110203034U TW110203034U TWM614073U TW M614073 U TWM614073 U TW M614073U TW 110203034 U TW110203034 U TW 110203034U TW 110203034 U TW110203034 U TW 110203034U TW M614073 U TWM614073 U TW M614073U
Authority
TW
Taiwan
Prior art keywords
neural network
processing device
convolutional neural
data
internal memory
Prior art date
Application number
TW110203034U
Other languages
Chinese (zh)
Inventor
程韋翰
Original Assignee
神亞科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 神亞科技股份有限公司 filed Critical 神亞科技股份有限公司
Publication of TWM614073U publication Critical patent/TWM614073U/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Neurology (AREA)
  • Semiconductor Memories (AREA)
  • Error Detection And Correction (AREA)
  • Image Analysis (AREA)

Abstract

A processing device for executing convolution neural network computation is provided. The convolutional neural network computation include a plurality of convolutional layers. A processing device includes an internal memory and a calculation circuit. The calculation circuit executes convolution computation of each convolution layer and analyzes a physiological feature image sensed by a physiological feature sensing device. The internal memory is coupled to the calculation circuit, includes a plurality of memory cells, and is configured to store weight data of the convolutional layers. Each of the memory cells includes a control circuit and a capacitor. The control circuit has a leakage current path. Data retention time of Each of the memory cells is determined according to a leakage current on the leakage current path and a capacitance value of the capacitor.

Description

用於執行卷積神經網路運算的處理裝置 Processing device for performing convolutional neural network operations

本新型創作是有關於一種計算裝置,且特別是有關於一種用於執行卷積神經網路運算的處理裝置。The present invention relates to a computing device, and in particular to a processing device for performing convolutional neural network operations.

人工智慧近年得到迅速發展,極大地影響了人們的生活。基於人工神經網路,尤其是卷積神經網路(Convolutional Neural Network,CNN)在很多應用中的發展日趨成熟,例如在電腦視覺領域中得到廣泛使用。隨著卷積神經網路的應用越來越廣泛,越來越多的晶片設計廠商開始設計用於執行卷積神經網路運算的處理晶片。執行卷積神經網路運算的處理晶片需要複雜的運算與龐大的參數量來分析輸入資料。對於用於執行卷積神經網路運算的處理晶片而言,為了加速處理速度與降低重複存取外部記憶體所產生的功耗,處理晶片內部一般設置有內部記憶體(又稱為晶片內建記憶體(on-chip-memory))來儲存暫時計算結果與卷積運算所需的權重資料。一般而言,此內部記憶體普遍使用靜態隨機存取記憶體(static random access memory,SRAM)。然而,當靜態隨機存取記憶體內的資料基於卷積神經網路運算的特性而被頻繁讀寫時,將導致處理晶片的整體晶片功耗上升。Artificial intelligence has developed rapidly in recent years, which has greatly affected people's lives. Based on artificial neural networks, especially convolutional neural networks (Convolutional Neural Network, CNN), the development of many applications is becoming more and more mature, for example, it is widely used in the field of computer vision. As the application of convolutional neural networks becomes more and more widespread, more and more chip design manufacturers begin to design processing chips for performing convolutional neural network operations. The processing chip that performs convolutional neural network operations requires complex operations and a huge amount of parameters to analyze the input data. For the processing chip used to perform convolutional neural network operations, in order to accelerate the processing speed and reduce the power consumption caused by repeated access to the external memory, the processing chip is generally equipped with internal memory (also known as the built-in chip). Memory (on-chip-memory)) to store temporary calculation results and weight data required for convolution operations. Generally speaking, this internal memory generally uses static random access memory (SRAM). However, when the data in the static random access memory is frequently read and written based on the characteristics of the convolutional neural network operation, the overall chip power consumption of the processing chip will increase.

有鑑於此,本新型創作提供一種用於執行卷積神經網路運算的處理裝置,其可降低用於執行卷積神經網路運算的處理裝置的功耗與其電路面積。In view of this, the present invention provides a processing device for performing convolutional neural network operations, which can reduce the power consumption and circuit area of the processing device for performing convolutional neural network operations.

本新型創作實施例提出一種用於執行卷積神經網路運算的處理裝置。此卷積神經網路運算包括多個卷積層。處理裝置包括內部記憶體與計算電路。計算電路執行各卷積層的卷積運算。內部記憶體耦接計算電路並包括多個記憶胞,並用以儲存卷積層的權重資料。各記憶胞包括控制電路與電容器,控制電路具有漏電流路徑,各記憶胞的資料保留時間依據漏電流路徑上的漏電流與電容器的電容值而決定,且資料保留時間大於預設需求時間。The creative embodiment of the present invention proposes a processing device for performing convolutional neural network operations. This convolutional neural network operation includes multiple convolutional layers. The processing device includes internal memory and calculation circuits. The calculation circuit performs the convolution operation of each convolution layer. The internal memory is coupled to the calculation circuit and includes a plurality of memory cells, and is used to store the weight data of the convolutional layer. Each memory cell includes a control circuit and a capacitor. The control circuit has a leakage current path. The data retention time of each memory cell is determined according to the leakage current on the leakage current path and the capacitance value of the capacitor, and the data retention time is greater than the preset required time.

基於上述,於本新型創作的實施例中,內部記憶體的記憶胞的資料保留時間是依據漏電流路徑上的漏電流與電容器的電容值而決定,且此資料保留時間會大於預設需求時間。換言之,在確保內部記憶體中的權重資料被計算電路獲取的條件下,這些權重資料只會在內部記憶體保留一段時間就失效。基此,在讓內部記憶體所記錄的權重資料可隨時間失效的情況下,此包括內部記憶體的處理裝置的整體晶片功耗可以下降並減少電路面積。Based on the above, in the embodiment of the present invention, the data retention time of the memory cell of the internal memory is determined based on the leakage current on the leakage current path and the capacitance value of the capacitor, and the data retention time will be greater than the preset required time . In other words, under the condition of ensuring that the weight data in the internal memory is obtained by the calculation circuit, these weight data will only become invalid after being retained in the internal memory for a period of time. Based on this, under the condition that the weight data recorded in the internal memory can become invalid over time, the overall chip power consumption of the processing device including the internal memory can be reduced and the circuit area can be reduced.

為讓本新型創作的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above-mentioned features and advantages of the new creation more obvious and understandable, the following specific examples are given in conjunction with the accompanying drawings to describe in detail as follows.

為了使本新型創作的內容可以被更容易明瞭,以下特舉實施例做為本新型創作確實能夠據以實施的範例。另外,凡可能之處,在圖式及實施方式中使用相同標號的元件/構件/步驟,是代表相同或類似部件。In order to make the content of the new creation easier to understand, the following specific examples are given as examples on which the new creation can indeed be implemented. In addition, wherever possible, elements/components/steps with the same reference numbers in the drawings and embodiments represent the same or similar components.

應當理解,當元件被稱為“直接在另一元件上”或“直接連接到”另一元件時,不存在中間元件。如本文所使用的,“連接”可以指物理及/或電性連接。再者,“電性連接”或“耦合”可以是二元件間存在其它元件。It should be understood that when an element is referred to as being "directly on" or "directly connected to" another element, there are no intervening elements. As used herein, "connected" can refer to physical and/or electrical connection. Furthermore, "electrically connected" or "coupled" may mean that there are other elements between two elements.

圖1是依照本新型創作一實施例的執行卷積神經網路運算的計算系統的示意圖。請參照圖1,計算系統10可基於卷積神經網路運算來分析輸入資料以提取有效資訊。計算系統10可安裝於各式電子終端設備中以實現各種不同的應用功能。舉例而言,計算系統10可安裝於智慧型手機、平板電腦、醫療設備或機器人設備中,本新型創作對此不限制。於一實施例中,計算系統10可基於卷積神經網路運算來分析指紋感測裝置所感測的指紋圖像或掌紋圖像,以獲取與感測指紋與掌紋相關的資訊。FIG. 1 is a schematic diagram of a computing system for performing convolutional neural network operations according to an embodiment of the new creation. Please refer to FIG. 1, the computing system 10 can analyze input data based on convolutional neural network operations to extract effective information. The computing system 10 can be installed in various electronic terminal devices to implement various application functions. For example, the computing system 10 can be installed in a smart phone, a tablet computer, a medical device or a robot device, and the present invention is not limited to this. In one embodiment, the computing system 10 may analyze the fingerprint image or palmprint image sensed by the fingerprint sensing device based on a convolutional neural network operation to obtain information related to the sensed fingerprint and palmprint.

計算系統10可包括處理裝置110以及外部記憶體120。處理裝置110以及外部記憶體120可經由匯流排130進行通訊。於一實施例中,處理裝置110可被實施為一系統晶片。處理裝置110可依據接收到的輸入資料執行卷積神經網路運算,其中卷積神經網路運算包括多個卷積層。需說明的是,本新型創作對於卷積神經網路運算所對應的神經網路模型並不加以限制,其可以為任何包括多個卷積層的神經網路模型,像是GoogleNet模型、AlexNet模型、VGGNet模型、ResNet模型、LeNet模型等各種卷積神經網路模型。The computing system 10 may include a processing device 110 and an external memory 120. The processing device 110 and the external memory 120 can communicate via the bus 130. In one embodiment, the processing device 110 may be implemented as a system chip. The processing device 110 can perform a convolutional neural network operation according to the received input data, where the convolutional neural network operation includes a plurality of convolutional layers. It should be noted that the new creation does not limit the neural network model corresponding to the convolutional neural network operation. It can be any neural network model that includes multiple convolutional layers, such as the GoogleNet model, the AlexNet model, Various convolutional neural network models such as VGGNet model, ResNet model and LeNet model.

外部記憶體120耦接處理裝置110,用於記錄處理裝置110執行卷積神經網路運算所需的各種參數,像是各個卷積層的權重資料等等。外部記憶體120可以包含動態隨機存取記憶體(dynamic random access memory,DRAM)、快閃記憶體(flash memory)或是其他記憶體。處理裝置110可從外部記憶體120讀取執行卷積神經網路運算所需的各種參數,以對輸入資料執行卷積神經網路運算。The external memory 120 is coupled to the processing device 110 for recording various parameters required by the processing device 110 to perform convolutional neural network operations, such as weight data of each convolutional layer and so on. The external memory 120 may include dynamic random access memory (DRAM), flash memory, or other memory. The processing device 110 can read various parameters required for performing the convolutional neural network operation from the external memory 120 to perform the convolutional neural network operation on the input data.

圖2是依照本新型創作一實施例的卷積神經網路模型的示意圖。請參照圖2,處理裝置110可將輸入資料d_i輸入至基於卷積神經網路模型20而產生輸出資料d_o。於一實施例中,輸入資料d_i可以是一張灰階影像或彩色影像。從另一方面來看,輸入資料d_i可以是一張指紋感測影像或掌紋感測影像。輸出資料d_o可以是對輸入資料d_i進行分類的分類類別、經過語義分割的分割影像,或是經過影像處理(例如風格轉換、影像填補或解析度優化等等)的影像資料等等,本新型創作對此不限制。Fig. 2 is a schematic diagram of a convolutional neural network model according to an embodiment of the new creation. Please refer to FIG. 2, the processing device 110 can input the input data d_i to the convolutional neural network-based model 20 to generate output data d_o. In one embodiment, the input data d_i can be a grayscale image or a color image. On the other hand, the input data d_i can be a fingerprint sensing image or a palmprint sensing image. The output data d_o can be a classification category that classifies the input data d_i, a segmented image that has undergone semantic segmentation, or image data that has undergone image processing (such as style conversion, image filling, or resolution optimization, etc.). This new creation There is no restriction on this.

卷積神經網路模型20可包括多個層,而這些層可包括多個卷積層。於一些實施例中,這些層還可包括池化層、激勵層與全連接層等等,本新型創作對此不限制。卷積神經網路模型20中的每一層可接收輸入資料d_i或前層產生的特徵圖(feature map),以執行相對的運算處理以產生輸出特徵圖或輸出資料d_o。於此,特徵圖為用以表達輸入資料d_i的各種特徵的資料,其可為二維矩陣形式或三維矩陣(亦可稱為張量(tensor))形式。The convolutional neural network model 20 may include multiple layers, and these layers may include multiple convolutional layers. In some embodiments, these layers may also include a pooling layer, an incentive layer, a fully connected layer, etc., which are not limited by the present invention. Each layer in the convolutional neural network model 20 can receive input data d_i or a feature map (feature map) generated by the previous layer to perform relative arithmetic processing to generate an output feature map or output data d_o. Here, the feature map is data used to express various features of the input data d_i, which can be in the form of a two-dimensional matrix or a three-dimensional matrix (also called a tensor).

為了方便說明,圖2僅繪示了卷積神經網路模型20包括卷積層L1~L3為範例進行說明。如圖2所示,卷積層L1~L3所產生的特徵圖FM1、FM2、FM3為三維矩陣形式。於本範例中,特徵圖FM1、FM2、FM3可具有寬度w(或稱為行)、高度h(或稱為列),以及深度d(或稱為通道數量)。For the convenience of description, FIG. 2 only shows the convolutional neural network model 20 including the convolutional layers L1 to L3 as an example for description. As shown in Figure 2, the feature maps FM1, FM2, FM3 generated by the convolutional layers L1 to L3 are in the form of a three-dimensional matrix. In this example, the feature maps FM1, FM2, and FM3 may have a width w (or called a row), a height h (or called a column), and a depth d (or called a channel number).

卷積層L1可依據一或多個卷積核對輸入資料d_i進行卷積運算而產生特徵圖FM1。卷積層L2可依據一或多個卷積核對特徵圖FM1進行卷積運算而產生特徵圖FM2。卷積層L3可依據一或多個卷積核對特徵圖FM2進行卷積運算而產生特徵圖FM3。上述卷積層L1~L3所使用的卷積核又可稱為權重資料,其可為二維矩陣形式或三維矩陣形式。舉例而言,卷積層L2可依據卷積核WM對特徵圖FM1進行卷積運算。於一些實施例中,卷積核WM的通道數目與特徵圖FM1的深度相同。卷積核WM在特徵圖FM1依據固定步長進行滑動。每當卷積核WM移位,卷積核WM中所包含的每一權重將與特徵圖FM1上重合的區的所有特徵值相乘後相加。由於卷積層L2依據卷積核WM對特徵圖FM1進行卷積運算,因此可產生特徵圖FM2中對應至一個通道的特徵值。圖2僅以單一個卷積核WM為示範例進行說明,但卷積層L2實際上可依據多個卷積核對特徵圖FM1進行卷積運算,以產生具有多個通道的特徵圖FM2。The convolution layer L1 can generate a feature map FM1 by performing a convolution operation on the input data d_i according to one or more convolution kernels. The convolution layer L2 may perform a convolution operation on the feature map FM1 according to one or more convolution kernels to generate the feature map FM2. The convolution layer L3 may perform a convolution operation on the feature map FM2 according to one or more convolution kernels to generate the feature map FM3. The convolution kernels used in the above convolution layers L1 to L3 may also be referred to as weight data, which may be in the form of a two-dimensional matrix or a three-dimensional matrix. For example, the convolutional layer L2 can perform a convolution operation on the feature map FM1 according to the convolution kernel WM. In some embodiments, the number of channels of the convolution kernel WM is the same as the depth of the feature map FM1. The convolution kernel WM slides in the feature map FM1 according to a fixed step size. Whenever the convolution kernel WM is shifted, each weight included in the convolution kernel WM will be multiplied by all the feature values of the overlapping region on the feature map FM1 and then added. Since the convolution layer L2 performs a convolution operation on the feature map FM1 according to the convolution kernel WM, the feature value corresponding to a channel in the feature map FM2 can be generated. FIG. 2 only takes a single convolution kernel WM as an example for illustration, but the convolution layer L2 can actually perform convolution operations on the feature map FM1 based on multiple convolution kernels to generate a feature map FM2 with multiple channels.

圖3是依照本新型創作一實施例的卷積運算的示意圖。請參照圖3,假設某一層卷積層對前層所產生的特徵圖FM_i進行卷積運算,且假設該層卷積層具有5個卷積核WM_1~WM_5。這些卷積核WM_1~WM_5為該卷積層的權重資料。特徵圖FM_i具有高度H1、寬度W1以及M個通道。卷積核WM_1~WM_5具有高度H2、寬度W2以及M個通道。該卷積層使用卷積核WM_1與特徵圖FM_i進行卷積運算,可獲取特徵圖FM_(i+1)中屬於第一個通道的子特徵圖31。該卷積層使用卷積核WM_2與特徵圖FM_i進行卷積運算,可獲取特徵圖FM_(i+1)中屬於第二個通道的子特徵圖32。依此類推。基於此卷積層具有5個卷積核WM_1~WM_5,因而可產生卷積核WM_1~WM_5分別對應的子特徵圖31~35,從而產生具有高度H3、寬度W3以及5個通道的特徵圖FM_(i+1)。Fig. 3 is a schematic diagram of a convolution operation according to an embodiment of the new creation. Referring to FIG. 3, it is assumed that a certain convolutional layer performs a convolution operation on the feature map FM_i generated by the previous layer, and it is assumed that the convolutional layer has 5 convolution kernels WM_1 to WM_5. These convolution kernels WM_1 to WM_5 are the weight data of the convolution layer. The feature map FM_i has a height H1, a width W1, and M channels. The convolution kernels WM_1 to WM_5 have height H2, width W2, and M channels. The convolution layer uses the convolution kernel WM_1 and the feature map FM_i to perform a convolution operation to obtain the sub-feature map 31 belonging to the first channel in the feature map FM_(i+1). The convolution layer uses the convolution kernel WM_2 and the feature map FM_i to perform a convolution operation to obtain the sub-feature map 32 belonging to the second channel in the feature map FM_(i+1). So on and so forth. Based on this convolutional layer with 5 convolution kernels WM_1~WM_5, the sub-feature maps 31-35 corresponding to the convolution kernels WM_1~WM_5 can be generated, thereby generating a feature map FM_( with height H3, width W3 and 5 channels i+1).

基於圖2與圖3的說明可知,用以執行卷積神經網路運算的處理裝置110需要依據權重資料進行卷積運算。於一些實施例中,這些權重資料可預先儲存於外部記憶體120或其他儲存裝置。外部記憶體120可將這些權重資料提供給處理裝置110。亦即,內建於處理裝置110的內部記憶體可用以儲存外部記憶體120所提供的權重資料。Based on the description of FIG. 2 and FIG. 3, it can be seen that the processing device 110 for performing convolutional neural network operations needs to perform convolution operations based on weight data. In some embodiments, the weight data can be stored in the external memory 120 or other storage devices in advance. The external memory 120 can provide the weight data to the processing device 110. That is, the internal memory built into the processing device 110 can be used to store the weight data provided by the external memory 120.

圖4是依照本新型創作一實施例的處理裝置的示意圖。請參照圖4,處理裝置110可包括內部記憶體111、計算電路112,以及控制器113。內部記憶體111又稱為晶片內建記憶體。內部記憶體111耦接計算電路112。於一些實施例中,內部記憶體111的儲存容量小於外部記憶體120的儲存容量。於一實施例中,計算電路112用於分析生理特徵感測裝置所感測的生理特徵圖像。於一實施例中,計算電路112可基於卷積神經網路運算來分析臉部感測裝置所感測的臉部圖像。於一實施例中,計算電路112可基於卷積神經網路運算來分析指紋感測裝置所感測的指紋圖像或掌紋圖像。Fig. 4 is a schematic diagram of a processing device according to an embodiment of the creation of the present invention. Please refer to FIG. 4, the processing device 110 may include an internal memory 111, a calculation circuit 112, and a controller 113. The internal memory 111 is also called on-chip memory. The internal memory 111 is coupled to the calculation circuit 112. In some embodiments, the storage capacity of the internal memory 111 is smaller than the storage capacity of the external memory 120. In one embodiment, the calculation circuit 112 is used to analyze the physiological characteristic image sensed by the physiological characteristic sensing device. In one embodiment, the calculation circuit 112 may analyze the facial image sensed by the facial sensing device based on a convolutional neural network operation. In one embodiment, the calculation circuit 112 may analyze the fingerprint image or palmprint image sensed by the fingerprint sensor device based on a convolutional neural network operation.

計算電路112用以執行卷積神經網路運算中多個層的層運算,其可包括用以完成各種層運算的算術邏輯電路。可知的,計算電路112可包括乘法器陣列、累加器陣列等等用以完成卷積運算的算術邏輯電路。此外,計算電路112可包括權重緩衝器41。權重緩衝器用以暫存內部記憶體111所提供的權重資料,以利計算電路112內的算術邏輯電路可有效率地進行卷積運算。The calculation circuit 112 is used to perform layer operations of multiple layers in the convolutional neural network operation, and it may include arithmetic logic circuits for completing various layer operations. It can be understood that the calculation circuit 112 may include an arithmetic logic circuit such as a multiplier array, an accumulator array, etc., to complete a convolution operation. In addition, the calculation circuit 112 may include a weight buffer 41. The weight buffer is used to temporarily store the weight data provided by the internal memory 111 so that the arithmetic logic circuit in the calculation circuit 112 can efficiently perform convolution operations.

控制器113可以藉由中央處理器(Central Processing Unit,CPU)、微處理器、特殊應用積體電路(Application-specific integrated circuit, ASIC)、數位訊號處理器(digital signal processor, DSP)或是其他計算電路來實施,其可控制處理裝置110的整體運作。控制器113可管理卷積神經網路運算所需的運算參數,例如權重資料,以使處理裝置110可正常地執行卷積神經網路運算中各個層的運算。The controller 113 can be implemented by a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a digital signal processor (DSP), or other The calculation circuit is implemented, which can control the overall operation of the processing device 110. The controller 113 can manage the operation parameters required for the operation of the convolutional neural network, such as weight data, so that the processing device 110 can normally perform the operation of each layer in the operation of the convolutional neural network.

於一些實施例中,控制器113可控制內部記憶體111從外部記憶體120獲取所有卷積層的權重資料。於一些實施例中,控制器113可控制內部記憶體111從外部記憶體120於不同時間點獲取不同卷積層的權重資料。舉例而言,控制器113可控制內部記憶體111從外部記憶體120於第一時間點獲取第一卷積層的權重資料,並控制內部記憶體111從外部記憶體120於第二時間點獲取第二卷積層的權重資料,其中第一時間點相異於第二時間點。於第二時間點,內部記憶體111中第一卷積層的權重資料將被更新為第二卷積層的權重資料。於一些實施例中,控制器113可控制內部記憶體111從外部記憶體120於不同時間點獲取同一卷積層的權重資料的不同部份。舉例而言,控制器113可控制內部記憶體111從外部記憶體120於第一時間點獲取第一卷積層的權重資料的第一部份,並控制內部記憶體11從外部記憶體120於第二時間點獲取相同的第一卷積層的權重資料的第二部份,其中第一時間點相異於第二時間點。In some embodiments, the controller 113 can control the internal memory 111 to obtain the weight data of all convolutional layers from the external memory 120. In some embodiments, the controller 113 can control the internal memory 111 to obtain the weight data of different convolutional layers from the external memory 120 at different time points. For example, the controller 113 may control the internal memory 111 to obtain the weight data of the first convolutional layer from the external memory 120 at a first time point, and control the internal memory 111 to obtain the first convolutional layer weight data from the external memory 120 at a second time point. The weight data of the two convolutional layers, where the first time point is different from the second time point. At the second time point, the weight data of the first convolutional layer in the internal memory 111 will be updated to the weight data of the second convolutional layer. In some embodiments, the controller 113 can control the internal memory 111 to obtain different parts of the weight data of the same convolutional layer from the external memory 120 at different time points. For example, the controller 113 can control the internal memory 111 to obtain the first part of the weight data of the first convolutional layer from the external memory 120 at a first time point, and control the internal memory 11 to obtain the first part of the weight data of the first convolutional layer from the external memory 120 at the first time. The second part of the same weight data of the first convolutional layer is acquired at two time points, where the first time point is different from the second time point.

基於前述可知,卷積神經網路運算所需的所有權重資料可一起寫入內部記憶體111,卷積神經網路運算所需的權重資料可分成多個部份而依據於不同時間點寫入內部記憶體111。由此可知,用於儲存卷積神經網路運算的權重資料與中間運算結果(例如各卷積層的特徵圖)的內部記憶體111內的資料會頻繁地更新。基此,於本新型創作實施例中,在確保內部記憶體111內的權重資料可以被計算電路112取得的情況下,可容許內部記憶體111的記憶胞所記錄的資料隨時間而消逝。亦即,卷積神經網路運算的權重資料於內部記憶體111內保留一段時間即可。Based on the foregoing, all the weight data required for convolutional neural network operations can be written into the internal memory 111 together, and the weight data required for convolutional neural network operations can be divided into multiple parts and written at different time points. Internal memory 111. It can be seen that the data in the internal memory 111 used to store the weight data of the convolutional neural network operation and the intermediate operation result (for example, the feature map of each convolutional layer) is frequently updated. Based on this, in the inventive embodiment of the present invention, while ensuring that the weight data in the internal memory 111 can be obtained by the calculation circuit 112, the data recorded by the memory cell of the internal memory 111 can be allowed to elapse with time. That is, the weight data calculated by the convolutional neural network can be kept in the internal memory 111 for a period of time.

更具體而言,於本新型創作的實施例中,依據內部記憶體111的記憶胞的電路配置與元件特性,各記憶胞具有對應的資料保留時間。在資料寫入內部記憶體111的某一記憶胞之後,寫入資料可保留於該記憶胞內直至資料保留時間期滿。亦即,記憶胞所記錄的權重資料會在資料保留時間期滿時失效。以下將列舉實施例以清楚說明。More specifically, in the embodiment of the present invention, each memory cell has a corresponding data retention time according to the circuit configuration and component characteristics of the memory cell of the internal memory 111. After the data is written into a certain memory cell of the internal memory 111, the written data can be retained in the memory cell until the data retention time expires. That is, the weight data recorded by the memory cell will become invalid when the data retention time expires. Examples will be listed below for clear description.

圖5是依照本新型創作一實施例的內部儲存裝置的示意圖。請參照圖5,內部記憶體111可包括記憶胞陣列51、列解碼器52,以及行解碼器53。記憶胞陣列51中主要是由多條字元線WL與位元線BL以陣列方式交錯排列,而每個交錯點則有一記憶胞(Memory Cell)MC。亦即,記憶胞陣列51包括陣列排列的多個記憶胞MC。這些記憶胞MC是利用電容器的充放電原理來達到記錄資料的目的。當內部記憶體111收到存取列位址(Access Row Address)時,會先經過列解碼器52解碼以致能對應的字元線WL。於是,連接被致能字元線WL的記憶胞MC內的電容器的電荷可流至對應的位元線BL。行解碼器53可依據行位址(column Address)控制行選擇器,以將行位址所對應的資料讀出或寫入。需說明的是,於一些實施例中,記憶胞陣列51中的記憶胞MC可用以儲存一或多個卷積層的權重資料。亦即,一或多個卷積層的權重資料可寫入記憶胞陣列51中的多個記憶胞MC,且一或多個卷積層的權重資料可從記憶胞陣列51中的多個記憶胞MC被讀出。Fig. 5 is a schematic diagram of an internal storage device according to an embodiment of the invention. 5, the internal memory 111 may include a memory cell array 51, a column decoder 52, and a row decoder 53. In the memory cell array 51, a plurality of word lines WL and bit lines BL are mainly arranged alternately in an array manner, and each interlace point has a memory cell (Memory Cell) MC. That is, the memory cell array 51 includes a plurality of memory cells MC arranged in an array. These memory cells MC use the charge and discharge principle of capacitors to achieve the purpose of recording data. When the internal memory 111 receives the Access Row Address, it will be decoded by the column decoder 52 to enable the corresponding word line WL. Then, the charge of the capacitor in the memory cell MC connected to the enabled word line WL can flow to the corresponding bit line BL. The row decoder 53 can control the row selector according to the column address to read or write the data corresponding to the row address. It should be noted that, in some embodiments, the memory cell MC in the memory cell array 51 can be used to store the weight data of one or more convolutional layers. That is, the weight data of one or more convolutional layers can be written into the multiple memory cells MC in the memory cell array 51, and the weight data of one or more convolutional layers can be obtained from the multiple memory cells MC in the memory cell array 51. Is read out.

圖6A是依照本新型創作一實施例的記憶胞的示意圖。請參照圖6A,記憶胞陣列51中的各記憶胞MC可包括控制電路61與電容器C1。於一些實施例中,控制電路61可包括電晶體M1。電晶體M1的控制端耦接內部記憶體111的字元線WL,且電晶體M1的第一端耦接內部記憶體111的位元線BL,電晶體M1的第二端耦接電容器C1的一端。然而,於其他實施例中,控制電路61還可包括其他電子元件,本新型創作對此不限制。於一些實施例中,內部記憶體111是利用電容器C1內儲存電荷的多寡來代表一個二進位位元的‘1’或‘0’。Fig. 6A is a schematic diagram of a memory cell according to an embodiment of the creation of the present invention. 6A, each memory cell MC in the memory cell array 51 may include a control circuit 61 and a capacitor C1. In some embodiments, the control circuit 61 may include a transistor M1. The control terminal of the transistor M1 is coupled to the word line WL of the internal memory 111, the first terminal of the transistor M1 is coupled to the bit line BL of the internal memory 111, and the second terminal of the transistor M1 is coupled to the capacitor C1. One end. However, in other embodiments, the control circuit 61 may also include other electronic components, which is not limited by the present invention. In some embodiments, the internal memory 111 uses the amount of charge stored in the capacitor C1 to represent a binary bit "1" or "0".

值得注意的是,即使記憶胞MC內的電晶體M1為關閉的狀態,電容器C1所儲存之電荷也會隨時間逐漸消逝,造成資料流失。亦即,電容器C1會有漏電現象,使得其所記錄的資料流失。更詳細而言,控制電路61可具有漏電流路徑,電容器C1內的電荷可能從控制電路61的漏電流路徑漏掉。於本新型創作的實施例中,各記憶胞MC的資料保留時間是依據漏電流路徑上的漏電流與電容器C1的電容值而決定,其中資料保留時間會大於一預設需求時間。預設需求時間是依據計算電路112的計算速度與計算量而決定。計算電路112的計算速度越高,則預設需求時間越短。計算電路112的計算量越低,則預設需求時間越短。可知的,當預設需求時間越短,記憶胞MC的資料保留時間也可以越短。It is worth noting that even if the transistor M1 in the memory cell MC is turned off, the charge stored in the capacitor C1 will gradually disappear over time, causing data loss. That is, the capacitor C1 will have a leakage phenomenon, so that the recorded data will be lost. In more detail, the control circuit 61 may have a leakage current path, and the charge in the capacitor C1 may leak from the leakage current path of the control circuit 61. In the embodiment of the present invention, the data retention time of each memory cell MC is determined based on the leakage current on the leakage current path and the capacitance value of the capacitor C1, wherein the data retention time is greater than a predetermined required time. The preset required time is determined according to the calculation speed and calculation amount of the calculation circuit 112. The higher the calculation speed of the calculation circuit 112, the shorter the preset required time. The lower the calculation amount of the calculation circuit 112, the shorter the preset required time. It can be seen that when the preset demand time is shorter, the data retention time of the memory cell MC can also be shorter.

圖6B是依照本新型創作一實施例的記憶胞的示意圖。請參照圖6B,於一些實施例中,記憶胞陣列51中的各記憶胞MC可包括電容器C1、開關SW1、開關SW2、讀出放大器電路Amp1以及寫入放大器電路Amp2。開關SW1的一端耦接電容器C1的一端,而開關SW1的另一端可耦接內部記憶體111的位元線BL。開關SW2的一端耦接電容器C1的一端,開關SW2的另一端耦接讀出放大器電路Amp1的輸入端。電容器C1的另一端可耦接至參考地電壓。讀出放大器電路Amp1的輸出端可耦接內部記憶體111的位元線BL。寫入放大器電路Amp2的輸出端耦接開關SW2的一端與讀出放大器電路Amp1的輸入端,寫入放大器電路Amp2的輸入端耦接內部記憶體111的位元線BL。開關SW1與開關SW2的控制端可耦接內部記憶體111的字元線WL。內部記憶體111是利用電容器C1內儲存電荷的多寡來代表一個二進位位元的‘1’或‘0’。當要將資料寫入電容器C1時,開關SW1或開關SW2可導通,使寫入資料可經由開關SW1或寫入放大器電路Amp2與開關SW2而記錄於電容器C1。當要讀出電容器C1所記錄的資料時,開關SW2可導通,使電容器C1所記錄的資料可經由讀出放大器電路Amp1被讀取。Fig. 6B is a schematic diagram of a memory cell according to an embodiment of the creation of the present invention. 6B, in some embodiments, each memory cell MC in the memory cell array 51 may include a capacitor C1, a switch SW1, a switch SW2, a sense amplifier circuit Amp1, and a write amplifier circuit Amp2. One end of the switch SW1 is coupled to one end of the capacitor C1, and the other end of the switch SW1 can be coupled to the bit line BL of the internal memory 111. One end of the switch SW2 is coupled to one end of the capacitor C1, and the other end of the switch SW2 is coupled to the input end of the sense amplifier circuit Amp1. The other end of the capacitor C1 can be coupled to the reference ground voltage. The output terminal of the sense amplifier circuit Amp1 can be coupled to the bit line BL of the internal memory 111. The output terminal of the write amplifier circuit Amp2 is coupled to one end of the switch SW2 and the input terminal of the sense amplifier circuit Amp1, and the input terminal of the write amplifier circuit Amp2 is coupled to the bit line BL of the internal memory 111. The control ends of the switch SW1 and the switch SW2 can be coupled to the word line WL of the internal memory 111. The internal memory 111 uses the amount of charge stored in the capacitor C1 to represent a "1" or "0" of a binary bit. When data is to be written into the capacitor C1, the switch SW1 or the switch SW2 can be turned on, so that the written data can be recorded in the capacitor C1 through the switch SW1 or the write amplifier circuit Amp2 and the switch SW2. When the data recorded by the capacitor C1 is to be read, the switch SW2 can be turned on, so that the data recorded by the capacitor C1 can be read through the sense amplifier circuit Amp1.

如圖6B所示,電容器C1會有漏電現象而產生漏電流路徑L1(於此以漏電流源65表示),使得電容器C1所記錄的資料流失。此外,即便SW2沒有導通,開關SW2會有漏電現象而產生漏電流路徑L2(於此以漏電流源66表示),使得電容器C1所記錄的資料流失。於此,漏電流源65與漏電流源66的漏電流準位取決於電容器C1與開關SW2的元件特性。As shown in FIG. 6B, the capacitor C1 has a leakage phenomenon and generates a leakage current path L1 (represented by the leakage current source 65 here), so that the data recorded by the capacitor C1 is lost. In addition, even if the SW2 is not turned on, the switch SW2 will leak current and generate a leakage current path L2 (represented by the leakage current source 66 here), causing the data recorded by the capacitor C1 to be lost. Here, the leakage current levels of the leakage current source 65 and the leakage current source 66 depend on the element characteristics of the capacitor C1 and the switch SW2.

於一些實施例中,在計算電路112自內部記憶體111獲取一或多個卷積層的權重資料之後,各記憶胞MC所記錄的權重資料在資料保留時間期滿時失效。於此,卷積層的權重資料可包括至少一卷積核中部份或全部權重值。在將權重資料寫入記憶胞MC之後,在記憶胞MC的資料保留時間期間,計算電路112會從記憶胞MC獲取正確的權重資料,並將權重資料暫存於權重緩衝器41以供後續卷積運算使用。並且,在經過記憶胞MC的資料保留時間之後,記憶胞MC內電容器C1的電荷漏失過多導致其所記錄的權重資料已經失效。In some embodiments, after the calculation circuit 112 obtains the weight data of one or more convolutional layers from the internal memory 111, the weight data recorded by each memory cell MC becomes invalid when the data retention time expires. Here, the weight data of the convolutional layer may include part or all of the weight values in at least one convolution kernel. After the weight data is written into the memory cell MC, during the data retention time of the memory cell MC, the calculation circuit 112 will obtain the correct weight data from the memory cell MC, and temporarily store the weight data in the weight buffer 41 for subsequent volumes. Product operation is used. Moreover, after the data retention time of the memory cell MC has elapsed, too much charge leakage of the capacitor C1 in the memory cell MC causes the weight data recorded by the memory cell MC to become invalid.

於一些實施例中,各記憶胞MC的資料保留時間正相關於電容器C1的電容值。亦即,電容器C1的電容值越小,則記憶胞MC的資料保留時間越短。反之,電容器C1的電容值越大,則記憶胞MC的資料保留時間越長。基此,在確保資料保留時間大於預設需求時間的情況下,即便使用具備小電容值的電容器C1也是可允許的,因而可降低記憶體讀取的功耗與電路面積。In some embodiments, the data retention time of each memory cell MC is positively related to the capacitance value of the capacitor C1. That is, the smaller the capacitance value of the capacitor C1, the shorter the data retention time of the memory cell MC. Conversely, the larger the capacitance value of the capacitor C1, the longer the data retention time of the memory cell MC. Based on this, in the case of ensuring that the data retention time is greater than the preset required time, even the use of a capacitor C1 with a small capacitance value is allowable, thereby reducing the power consumption and circuit area of memory reading.

於一些實施例中,各記憶胞MC的資料保留時間負相關於漏電流的電流值。亦即,控制電路61所提供之漏電流路徑上漏電流的電容值越小,則記憶胞MC的資料保留時間越長。反之,控制電路61所提供之漏電流路徑上漏電流的電容值越大,則記憶胞MC的資料保留時間越短。基此,在確保資料保留時間大於預設需求時間的情況下,具備漏電流路徑的控制電路61的電路配置與內部元件設計可以更為彈性。In some embodiments, the data retention time of each memory cell MC is negatively related to the current value of the leakage current. That is, the smaller the capacitance value of the leakage current on the leakage current path provided by the control circuit 61 is, the longer the data retention time of the memory cell MC is. Conversely, the greater the capacitance value of the leakage current on the leakage current path provided by the control circuit 61, the shorter the data retention time of the memory cell MC. Based on this, under the condition that the data retention time is greater than the preset required time, the circuit configuration and internal component design of the control circuit 61 with leakage current path can be more flexible.

值得一提的是,相較於傳統的動態隨機存取記憶體,內部記憶體111不需要進入刷新(refresh)模式來對各記憶胞MC進行資料刷新動作。因此,在不具備刷新模式所需之相關電路的情況下,內部記憶體111的電路面積也可因而降低。It is worth mentioning that, compared with the traditional dynamic random access memory, the internal memory 111 does not need to enter a refresh mode to refresh the data of each memory cell MC. Therefore, the circuit area of the internal memory 111 can also be reduced in the absence of related circuits required for the refresh mode.

此外,基於前述可知,內部記憶體111自外部記憶體120獲取一或多個卷積層的權重資料。若要減少電容器C1的電容值且因而縮減記憶胞MC的資料保留時間,代表內部記憶體111內的權重資料的更新速度要加快。因此,於一些實施例中,卷積神經網路運算所需的權重資料可分批依序寫入處理裝置110的內部記憶體111,以加快權重資料的更新速度。在此情況下,自外部記憶體120獲取卷積層的權重資料的資料量正相關於電容器C1的電容值。In addition, based on the foregoing knowledge, the internal memory 111 obtains the weight data of one or more convolutional layers from the external memory 120. To reduce the capacitance value of the capacitor C1 and thereby reduce the data retention time of the memory cell MC, it means that the update speed of the weight data in the internal memory 111 should be increased. Therefore, in some embodiments, the weight data required for the convolutional neural network operation can be sequentially written into the internal memory 111 of the processing device 110 in batches to speed up the update speed of the weight data. In this case, the data amount of the weight data of the convolutional layer obtained from the external memory 120 is positively correlated with the capacitance value of the capacitor C1.

舉例而言,若要使用具備小電容值的電容器C1來降低讀取功耗時,內部記憶體111可先讀取多層卷積層其中一層的權重資料。內部記憶體111可保留多層卷積層其中一層的權重資料直至資料保留時間期滿,且內部記憶體111所記錄的權重資料會於資料保留時間期滿時失效。之後,內部記憶體111再讀取多層卷積層其中另一層的權重資料。相似的,內部記憶體111可保留多層卷積層其中另一層的權重資料直至資料保留時間期滿。For example, if a capacitor C1 with a small capacitance value is to be used to reduce reading power consumption, the internal memory 111 can first read the weight data of one of the multi-layer convolutional layers. The internal memory 111 can retain the weight data of one of the multi-layer convolutional layers until the data retention time expires, and the weight data recorded in the internal memory 111 will become invalid when the data retention time expires. After that, the internal memory 111 reads the weight data of another layer of the multi-layer convolutional layer. Similarly, the internal memory 111 can retain the weight data of the other layer of the multi-layer convolutional layer until the data retention time expires.

圖7是依照本新型創作一實施例的資料保留時間的示意圖。請參照圖7,於時間t1,卷積層的權重資料寫入內部記憶體111。例如,多個卷積層其中之一層的一或多個卷積核中的權重值可於時間t1寫入至內部記憶體111。或者,多個卷積層其中之一層的一個卷積核中的部份權重值可於時間t1寫入至內部記憶體111。於時間t2,計算電路112自內部記憶體111讀取卷積層的權重資料。在計算電路112自內部記憶體111獲取卷積層的權重資料之後,於時間點t3,各記憶胞MC所記錄的權重資料在資料保留時間∆T期滿時失效。在記憶胞MC所記錄的權重資料失效之後,於時間點t4,卷積層的其他權重資料寫入的內部記憶體111的記憶胞MC。於時間t5,計算電路112自內部記憶體111讀取卷積層的其他權重資料。於時間點t6,各記憶胞MC所記錄的其他權重資料在資料保留時間∆T期滿時失效。FIG. 7 is a schematic diagram of data retention time according to an embodiment of the creation of the present invention. Please refer to FIG. 7, at time t1, the weight data of the convolutional layer is written into the internal memory 111. For example, the weight value in one or more convolution kernels of one of the multiple convolution layers can be written to the internal memory 111 at time t1. Alternatively, part of the weight value in a convolution kernel of one of the multiple convolution layers can be written into the internal memory 111 at time t1. At time t2, the calculation circuit 112 reads the weight data of the convolutional layer from the internal memory 111. After the calculation circuit 112 obtains the weight data of the convolutional layer from the internal memory 111, at time t3, the weight data recorded by each memory cell MC becomes invalid when the data retention time ΔT expires. After the weight data recorded by the memory cell MC becomes invalid, at time t4, other weight data of the convolutional layer are written into the memory cell MC of the internal memory 111. At time t5, the calculation circuit 112 reads other weight data of the convolutional layer from the internal memory 111. At time t6, other weight data recorded by each memory cell MC becomes invalid when the data retention time ∆T expires.

圖8是依照本新型創作一實施例的用於執行卷積神經網路運算的處理方法的流程圖。請參照圖8,本實施例的方式適用於圖4之實施例中的處理裝置110,以下即搭配處理裝置110中的各項元件說明本實施例的詳細步驟。FIG. 8 is a flowchart of a processing method for performing convolutional neural network operations according to an embodiment of the new creation. Please refer to FIG. 8, the method of this embodiment is applicable to the processing device 110 in the embodiment of FIG. 4, and the detailed steps of this embodiment are described below with various components in the processing device 110.

於步驟S801,透過內部記憶體111自外部記憶體120獲取至少一卷積層的權重資料,並執行卷積層的卷積運算。於一些實施例中,處理裝置110可透過內部記憶體111從外部記憶體120於第一時間點獲取第一卷積層的權重資料,並透過內部記憶體111從外部記憶體120於第二時間點獲取第二卷積層的權重資料,其中第一時間點相異於第二時間點。於一些實施例中,處理裝置110可透過內部記憶體111從外部記憶體120於第一時間點獲取第一卷積層的權重資料的第一部份,並透過內部記憶體111從外部記憶體120於獲取第一卷積層的權重資料的第二部份,其中第一時間點相異於第二時間點。In step S801, the weight data of at least one convolutional layer is obtained from the external memory 120 through the internal memory 111, and the convolution operation of the convolutional layer is performed. In some embodiments, the processing device 110 may obtain the weight data of the first convolutional layer from the external memory 120 through the internal memory 111 at the first time point, and obtain the weight data of the first convolutional layer from the external memory 120 through the internal memory 111 at the second time point. Obtain the weight data of the second convolutional layer, where the first time point is different from the second time point. In some embodiments, the processing device 110 can obtain the first part of the weight data of the first convolutional layer from the external memory 120 through the internal memory 111 at a first time point, and from the external memory 120 through the internal memory 111 In the second part of obtaining the weight data of the first convolutional layer, the first time point is different from the second time point.

需注意的是,內部記憶體111中各記憶胞所記錄的至少一卷積層的權重資料,例如某一卷積層的所有權重資料或部份權重資料,會在資料保留時間期滿時失效。內部記憶體111中各記憶胞包括控制電路與電容器。此控制電路具有漏電流路徑,各記憶胞的資料保留時間依據漏電流路徑上的漏電流與電容器的電容值而決定。It should be noted that the weight data of at least one convolution layer recorded by each memory cell in the internal memory 111, such as all weight data or partial weight data of a certain convolution layer, will become invalid when the data retention time expires. Each memory cell in the internal memory 111 includes a control circuit and a capacitor. The control circuit has a leakage current path, and the data retention time of each memory cell is determined according to the leakage current on the leakage current path and the capacitance value of the capacitor.

綜上所述,於本新型創作實施例中,用以記錄卷積層的權重資料的內部記憶體的記憶胞具有資料保留時間。在經過資料保留時間之後,記憶胞所記錄的權重資料會因為電容器的漏電現象而失效。記憶胞的資料保留時間是依據漏電流與電容器的電容值而決定。基此,在確保記憶胞的資料保留時間大於預設需求時間的情況下,記憶胞可使用具備較小電容值的電容器,因而可降低記憶體讀取的功耗與電路面積。於是,設置於處理裝置內的內部記憶體的電路面積與消耗功率可以減少。In summary, in the creative embodiment of the present invention, the memory cell of the internal memory used to record the weight data of the convolutional layer has a data retention time. After the data retention time has elapsed, the weight data recorded by the memory cell will become invalid due to the leakage of the capacitor. The data retention time of the memory cell is determined by the leakage current and the capacitance value of the capacitor. Based on this, in the case of ensuring that the data retention time of the memory cell is greater than the preset required time, the memory cell can use a capacitor with a smaller capacitance value, thereby reducing the power consumption and circuit area of the memory read. Therefore, the circuit area and power consumption of the internal memory provided in the processing device can be reduced.

最後應說明的是:以上各實施例僅用以說明本新型創作的技術方案,而非對其限制;儘管參照前述各實施例對本新型創作進行了詳細的說明,本領域的普通技術人員應當理解:其依然可以對前述各實施例所記載的技術方案進行修改,或者對其中部分或者全部技術特徵進行等同替換;而這些修改或者替換,並不使相應技術方案的本質脫離本新型創作各實施例技術方案的範圍。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the new creation, not to limit it; although the new creation is described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand : It can still modify the technical solutions recorded in the foregoing embodiments, or equivalently replace some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the various embodiments of the invention The scope of the technical solution.

10:計算系統 110:處理裝置 120:外部記憶體 130:匯流排 d_i:輸入資料 d_o:輸出資料 20:卷積神經網路模型 L1~L3:卷積層 FM1、FM2、FM3、FM_i、FM_(i+1):特徵圖 WM、WM_1~WM_5:卷積核 31~35:子特徵圖 111:內部記憶體 112:計算電路 113:控制器 41:權重緩衝器 51:記憶胞陣列 52:列解碼器 53:行解碼器 WL:字元線 BL:位元線 MC:記憶胞 61:控制電路 M1:電晶體 C1:電容器 SW1, SW2:開關 L1, L2:漏電流路徑 65, 66:漏電流源 Amp1:讀出放大器電路 Amp2:寫入放大器電路 ∆T:資料保留時間 t1~t6:時間 S801:流程步驟 10: Computing system 110: processing device 120: External memory 130: bus d_i: input data d_o: output data 20: Convolutional Neural Network Model L1~L3: Convolutional layer FM1, FM2, FM3, FM_i, FM_(i+1): feature map WM, WM_1~WM_5: Convolution kernel 31~35: Sub-characteristic map 111: Internal memory 112: calculation circuit 113: Controller 41: weight buffer 51: Memory cell array 52: column decoder 53: Line decoder WL: Character line BL: bit line MC: memory cell 61: control circuit M1: Transistor C1: Capacitor SW1, SW2: switch L1, L2: leakage current path 65, 66: Leakage current source Amp1: sense amplifier circuit Amp2: Write amplifier circuit ∆T: data retention time t1~t6: time S801: Process steps

圖1是依照本新型創作一實施例的執行卷積神經網路運算的計算系統的示意圖。 圖2是依照本新型創作一實施例的卷積神經網路模型的示意圖。 圖3是依照本新型創作一實施例的卷積運算的示意圖。 圖4是依照本新型創作一實施例的處理裝置的示意圖。 圖5是依照本新型創作一實施例的內部儲存裝置的示意圖。 圖6A是依照本新型創作一實施例的記憶胞的示意圖。 圖6B是依照本新型創作一實施例的記憶胞的示意圖。 圖7是依照本新型創作一實施例的資料保留時間的示意圖。 圖8是依照本新型創作一實施例的用於執行卷積神經網路運算的處理方法的流程圖。 FIG. 1 is a schematic diagram of a computing system for performing convolutional neural network operations according to an embodiment of the new creation. Fig. 2 is a schematic diagram of a convolutional neural network model according to an embodiment of the new creation. Fig. 3 is a schematic diagram of a convolution operation according to an embodiment of the new creation. Fig. 4 is a schematic diagram of a processing device according to an embodiment of the creation of the present invention. Fig. 5 is a schematic diagram of an internal storage device according to an embodiment of the invention. Fig. 6A is a schematic diagram of a memory cell according to an embodiment of the creation of the present invention. Fig. 6B is a schematic diagram of a memory cell according to an embodiment of the creation of the present invention. FIG. 7 is a schematic diagram of data retention time according to an embodiment of the creation of the present invention. FIG. 8 is a flowchart of a processing method for performing convolutional neural network operations according to an embodiment of the new creation.

110:處理裝置 110: processing device

111:內部記憶體 111: Internal memory

112:計算電路 112: calculation circuit

113:控制器 113: Controller

120:外部記憶體 120: External memory

130:匯流排 130: bus

41:權重緩衝器 41: weight buffer

Claims (12)

一種用於執行卷積神經網路運算的處理裝置,所述卷積神經網路運算包括多個卷積層,所述處理裝置包括: 計算電路,執行各所述卷積層的卷積運算,所述計算電路用於分析生理特徵感測裝置所感測的生理特徵圖像;以及 內部記憶體,耦接所述計算電路並包括多個記憶胞,並用以儲存所述卷積層的權重資料, 其中,各所述記憶胞包括控制電路與電容器,所述控制電路具有漏電流路徑,各所述記憶胞的資料保留時間依據所述漏電流路徑上的漏電流與電容器的電容值而決定。 A processing device for performing convolutional neural network operations. The convolutional neural network operations include multiple convolutional layers. The processing device includes: A calculation circuit for performing the convolution operation of each of the convolution layers, and the calculation circuit is used to analyze the physiological characteristic image sensed by the physiological characteristic sensing device; and The internal memory is coupled to the calculation circuit and includes a plurality of memory cells, and is used to store the weight data of the convolutional layer, Wherein, each of the memory cells includes a control circuit and a capacitor, the control circuit has a leakage current path, and the data retention time of each of the memory cells is determined according to the leakage current on the leakage current path and the capacitance value of the capacitor. 如請求項1所述的用於執行卷積神經網路運算的處理裝置,其中在所述計算電路自所述內部記憶體獲取所述卷積層的權重資料之後,各所述記憶胞所記錄的權重資料在所述資料保留時間期滿時失效。The processing device for performing convolutional neural network operations according to claim 1, wherein after the calculation circuit obtains the weight data of the convolutional layer from the internal memory, the data recorded by each memory cell The weighted data becomes invalid when the said data retention time expires. 如請求項2所述的用於執行卷積神經網路運算的處理裝置,其中在所述記憶胞所記錄的權重資料失效之後,所述卷積層的其他權重資料寫入的所述內部記憶體的所述記憶胞。The processing device for performing convolutional neural network operations according to claim 2, wherein after the weight data recorded by the memory cell becomes invalid, the other weight data of the convolutional layer is written into the internal memory的The memory cell. 如請求項1所述的用於執行卷積神經網路運算的處理裝置,其中所述資料保留時間正相關於所述電容器的電容值。The processing device for performing convolutional neural network operations according to claim 1, wherein the data retention time is positively related to the capacitance value of the capacitor. 如請求項1所述的用於執行卷積神經網路運算的處理裝置,其中所述資料保留時間負相關於所述漏電流的電流值。The processing device for performing convolutional neural network operations according to claim 1, wherein the data retention time is negatively related to the current value of the leakage current. 如請求項1所述的用於執行卷積神經網路運算的處理裝置,其中所述內部記憶體自外部記憶體獲取所述卷積層的權重資料。The processing device for performing convolutional neural network operations according to claim 1, wherein the internal memory obtains the weight data of the convolutional layer from an external memory. 如請求項6所述的用於執行卷積神經網路運算的處理裝置,其中自外部記憶體獲取所述卷積層的權重資料的資料量正相關於所述電容器的電容值。The processing device for performing convolutional neural network operations according to claim 6, wherein the data amount of the weight data of the convolutional layer obtained from an external memory is positively related to the capacitance value of the capacitor. 如請求項1所述的用於執行卷積神經網路運算的處理裝置,其中所述卷積層的權重資料包括至少一卷積核中部份或全部權重值。The processing device for performing convolutional neural network operations according to claim 1, wherein the weight data of the convolution layer includes part or all of the weight values in at least one convolution kernel. 如請求項1所述的用於執行卷積神經網路運算的處理裝置,其中所述控制電路包括電晶體,所述電晶體的控制端耦接所述內部記憶體的字元線,且所述電晶體的第一端耦接所述內部記憶體的位元線,所述電晶體的第二端耦接所述電容器的一端。The processing device for performing convolutional neural network operations according to claim 1, wherein the control circuit includes a transistor, the control end of the transistor is coupled to the word line of the internal memory, and The first end of the transistor is coupled to the bit line of the internal memory, and the second end of the transistor is coupled to one end of the capacitor. 如請求項1所述的用於執行卷積神經網路運算的處理裝置,其中所述計算電路包括權重緩衝器,所述內部記憶體將所述卷積層的權重資料提供給所述權重緩衝器。The processing device for performing convolutional neural network operations according to claim 1, wherein the calculation circuit includes a weight buffer, and the internal memory provides weight data of the convolution layer to the weight buffer . 如請求項1所述的用於執行卷積神經網路運算的處理裝置,其中所述生理特徵感測裝置為指紋感測裝置,所述生理特徵圖像為指紋圖像或掌紋圖像。The processing device for performing convolutional neural network operations according to claim 1, wherein the physiological characteristic sensing device is a fingerprint sensing device, and the physiological characteristic image is a fingerprint image or a palm print image. 如請求項1所述的用於執行卷積神經網路運算的處理裝置,其中所述生理特徵感測裝置為臉部感測裝置,所述生理特徵圖像為臉部圖像。The processing device for performing convolutional neural network operations according to claim 1, wherein the physiological characteristic sensing device is a face sensing device, and the physiological characteristic image is a face image.
TW110203034U 2020-05-04 2021-03-22 Processing device for executing convolution neural network computation TWM614073U (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US202063019965P 2020-05-04 2020-05-04
US63/019,965 2020-05-04

Publications (1)

Publication Number Publication Date
TWM614073U true TWM614073U (en) 2021-07-01

Family

ID=75930528

Family Applications (2)

Application Number Title Priority Date Filing Date
TW110110149A TWI751931B (en) 2020-05-04 2021-03-22 Processing device and processing method for executing convolution neural network computation
TW110203034U TWM614073U (en) 2020-05-04 2021-03-22 Processing device for executing convolution neural network computation

Family Applications Before (1)

Application Number Title Priority Date Filing Date
TW110110149A TWI751931B (en) 2020-05-04 2021-03-22 Processing device and processing method for executing convolution neural network computation

Country Status (3)

Country Link
CN (1) CN112836815A (en)
TW (2) TWI751931B (en)
WO (1) WO2021223528A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI812117B (en) * 2021-08-27 2023-08-11 台灣積體電路製造股份有限公司 Memory device and method for computing-in-memory (cim)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113570034B (en) * 2021-06-18 2022-09-27 北京百度网讯科技有限公司 Processing device, neural network processing method and device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010025130A1 (en) * 2008-08-28 2010-03-04 Massachusetts Institute Of Technology Circuits and methods representative of spike timing dependent plasticity of neurons
CN106484362B (en) * 2015-10-08 2020-06-12 上海兆芯集成电路有限公司 Device for specifying two-dimensional fixed-point arithmetic operation by user
CN105760930B (en) * 2016-02-18 2018-06-05 天津大学 For the multilayer impulsive neural networks identifying system of AER
US10515302B2 (en) * 2016-12-08 2019-12-24 Via Alliance Semiconductor Co., Ltd. Neural network unit with mixed data and weight size computation capability
CN110622348A (en) * 2017-05-03 2019-12-27 株式会社半导体能源研究所 Neural network, electric power storage system, vehicle, and electronic device
CN107203808B (en) * 2017-05-08 2018-06-01 中国科学院计算技术研究所 A kind of two-value Convole Unit and corresponding two-value convolutional neural networks processor
US11256977B2 (en) * 2017-12-29 2022-02-22 Facebook, Inc. Lowering hardware for neural networks
US10910061B2 (en) * 2018-03-14 2021-02-02 Silicon Storage Technology, Inc. Method and apparatus for programming analog neural memory in a deep learning artificial neural network
CN108764467B (en) * 2018-04-04 2021-08-17 北京大学深圳研究生院 Convolution operation and full-connection operation circuit for convolution neural network
CN110880038B (en) * 2019-11-29 2022-07-01 中国科学院自动化研究所 System for accelerating convolution calculation based on FPGA and convolution neural network

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI812117B (en) * 2021-08-27 2023-08-11 台灣積體電路製造股份有限公司 Memory device and method for computing-in-memory (cim)

Also Published As

Publication number Publication date
TWI751931B (en) 2022-01-01
CN112836815A (en) 2021-05-25
TW202143116A (en) 2021-11-16
WO2021223528A1 (en) 2021-11-11

Similar Documents

Publication Publication Date Title
US11501109B2 (en) Non-volatile memory die with on-chip data augmentation components for use with machine learning
US11687454B2 (en) Memory circuit and cache circuit configuration
TWI766568B (en) Processing device for executing convolution neural network computation and operation method thereof
US11043259B2 (en) System and method for in-memory compute
WO2021223528A1 (en) Processing device and method for executing convolutional neural network operation
US11664061B2 (en) Memory devices including processing elements, and memory systems including memory devices
US20220413769A1 (en) Storage controller having data augmentation components for use with non-volatile memory die
CN109872735A (en) Memory device training method, the computing system and System on Chip/SoC for executing this method
WO2020073801A1 (en) Data reading/writing method and system in 3d image processing, storage medium, and terminal
US20230128653A1 (en) Memory device and method for controlling row hammer
KR20230043618A (en) Memory device and method for controlling row hammer
CN115985380A (en) FeFET array data verification method based on digital circuit control
CN109508782B (en) Neural network deep learning-based acceleration circuit and method
US11567690B2 (en) Semiconductor memory device and electronic system the same
US11942137B2 (en) Memory controller and memory system including the same
CN111801736A (en) Memory device with non-uniform refresh
US11967352B2 (en) Method of controlling row hammer and a memory device
US11380390B2 (en) Memory device, and electronic device including the same
Wu et al. Hetero layer fusion based architecture design and implementation for of deep learning accelerator
TWI833945B (en) Memory device, high bandwidth memory system and method of boosting overall performance of high bandwidth memory
US20230395132A1 (en) Sram cell configured to perform multiply-accumulate (mac) operation on multi-bit data based on charge sharing and method of operating the same
US20230195327A1 (en) Memory system and method of operating the same
CN117472295B (en) Memory, data processing method, device and medium
TWI715992B (en) Memory device, memory system and method of reading from memory device
US20240233801A1 (en) Method of controlling row hammer and a memory device