TWI657443B - Memory device and operation method thereof - Google Patents

Memory device and operation method thereof Download PDF

Info

Publication number
TWI657443B
TWI657443B TW107109299A TW107109299A TWI657443B TW I657443 B TWI657443 B TW I657443B TW 107109299 A TW107109299 A TW 107109299A TW 107109299 A TW107109299 A TW 107109299A TW I657443 B TWI657443 B TW I657443B
Authority
TW
Taiwan
Prior art keywords
image
filter
memory device
parameter
control circuit
Prior art date
Application number
TW107109299A
Other languages
Chinese (zh)
Other versions
TW201939498A (en
Inventor
林昱佑
李峰旻
Original Assignee
旺宏電子股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 旺宏電子股份有限公司 filed Critical 旺宏電子股份有限公司
Priority to TW107109299A priority Critical patent/TWI657443B/en
Application granted granted Critical
Publication of TWI657443B publication Critical patent/TWI657443B/en
Publication of TW201939498A publication Critical patent/TW201939498A/en

Links

Landscapes

  • Image Processing (AREA)

Abstract

本發明揭露一種記憶體裝置包括多條位元線、多條字元線及一控制電路。位元線用以接收一影像的多個畫素資料。各字元線耦接至多個參數單元。各字元線的參數單元依據一濾鏡的多個參數進行配置。各字元線的配置相互不同。當以濾鏡處理影像的一第一區域時,控制電路將位於影像的第一區域的畫素資料輸入位元線,並致能字元線的其中之一進行運算。當以濾鏡處理影像的一第二區域時,控制電路保持位於第二區域內與第一區域重疊的畫素資料輸入於位元線,並將位於第二區域內與第一區域未重疊的畫素資料輸入位元線,並致能字元線的其中另一以進行運算。 The invention discloses a memory device comprising a plurality of bit lines, a plurality of word lines and a control circuit. The bit line is used to receive a plurality of pixel data of an image. Each word line is coupled to a plurality of parameter units. The parameter unit of each character line is configured according to a plurality of parameters of a filter. The configuration of each character line is different from each other. When a first region of the image is processed by the filter, the control circuit inputs pixel data located in the first region of the image into the bit line and enables one of the word lines to operate. When processing a second region of the image with the filter, the control circuit keeps the pixel data located in the second region overlapping with the first region and inputs the pixel data to the bit line, and the second region does not overlap with the first region. The pixel data is input to the bit line and one of the word lines is enabled for operation.

Description

記憶體裝置及其操作方法 Memory device and method of operating same

本發明是有關於一種記憶體裝置及其操作方法。 The present invention relates to a memory device and method of operation thereof.

物件辨識(object recognition)被廣泛應用在各種領域,諸如自動駕駛(self-driving)、衛星影像分析、人臉辨識等。一般來說,在物件辨識的過程中,需要耗費大量的能量。在能量日益珍貴的未來,如何降低能量消耗是業界努力的目標之一。 Object recognition is widely used in various fields, such as self-driving, satellite image analysis, face recognition, and the like. In general, a lot of energy is required in the process of object identification. In an increasingly precious future, how to reduce energy consumption is one of the goals of the industry.

本發明的目的是提供一種可降低影像處理的能量消耗的記憶體裝置及其操作方法。 It is an object of the present invention to provide a memory device and method of operating the same that can reduce the energy consumption of image processing.

本發明的一實施例揭露一種記憶體裝置,包括多條位元線、多條字元線及一控制電路。位元線用以接收一影像的多個資料。各字元線耦接至多個參數單元,且各字元線通過參數單元耦接至位元線,其中各字元線的參數單元係依據一濾鏡的多個參數進行配置,且各字元線的參數單元的配置相互不同。控制電路耦接至字元線及位元線。當以濾鏡處理影像的一第一區域時,控制電路將位於影像的第一區域的資料輸入位元線,並致能字元線的其中之一以進行運算。當以 濾鏡處理影像的一第二區域時,控制電路保持位於影像的第二區域內與第一區域重疊的資料輸入於位元線,並將位於影像的第二區域內與第一區域未重疊的資料輸入位元線,並致能字元線的其中另一以進行運算。 An embodiment of the invention discloses a memory device comprising a plurality of bit lines, a plurality of word lines, and a control circuit. The bit line is used to receive a plurality of data of an image. Each word line is coupled to a plurality of parameter units, and each word line is coupled to the bit line by a parameter unit, wherein the parameter unit of each word line is configured according to a plurality of parameters of a filter, and each character element The configuration of the parameter units of the line are different from each other. The control circuit is coupled to the word line and the bit line. When a first region of the image is processed by the filter, the control circuit inputs the data located in the first region of the image into the bit line and enables one of the word lines to perform the operation. When When the filter processes a second region of the image, the control circuit keeps the data overlapping the first region in the second region of the image and inputs the data to the bit line, and does not overlap the first region in the second region of the image. The data is entered into the bit line and one of the word lines is enabled for operation.

本發明的一實施例揭露一種記憶體裝置的操作方法,包括:提供一影像,其中該影像包括複數個資料;當以一濾鏡處理該影像的一第一區域時,由該記憶體裝置的一控制電路將該影像的該第一區域的該些資料輸入該記憶體裝置的複數條位元線;由該控制電路致能該記憶體裝置的複數條字元線的其中之一,以該字元線與該影像的該第一區域的該些資料進行運算,其中各該字元線耦接至複數個參數單元,各該字元線的該些參數單元係依據該濾鏡的複數個參數進行配置,且該些字元線的該些參數單元的配置相互不同;當以該濾鏡處理該影像的一第二區域時,由該控制電路保持位於該影像的該第二區域內與該第一區域重疊的該些資料輸入於該些位元線,並將位於該影像的該第二區域內與該第一區域未重疊的該些資料輸入該些位元線;以及由該控制電路致能該些字元線的其中另一,以該另一字元線與該影像的該第二區域的該些資料進行運算。 An embodiment of the present invention provides a method for operating a memory device, including: providing an image, wherein the image includes a plurality of materials; and processing a first region of the image by a filter, by the memory device a control circuit for inputting the data of the first region of the image into a plurality of bit lines of the memory device; wherein the control circuit enables one of a plurality of word lines of the memory device to The character line is operated with the data of the first area of the image, wherein each of the word lines is coupled to a plurality of parameter units, and the parameter units of each of the word lines are based on the plurality of filters The parameters are configured, and the configuration of the parameter units of the word lines are different from each other; when the second area of the image is processed by the filter, the control circuit is kept in the second area of the image and The pieces of data overlapped by the first area are input to the bit lines, and the pieces of data that are not overlapped with the first area in the second area of the image are input to the bit lines; and by the control Circuit enable Wherein the other of wordlines, to the other word line and calculates the plurality of data of the second region of the image.

藉由本發明提出記憶體裝置及其操作方法,可有效減少影像處理時的能量消耗,甚至進一步縮短運算時間。 By the memory device and the operation method thereof, the energy consumption in image processing can be effectively reduced, and the calculation time can be further shortened.

為了對本發明之上述及其他方面有更佳的瞭解,下文特舉實施例,並配合所附圖式詳細說明如下: In order to better understand the above and other aspects of the present invention, the following detailed description of the embodiments and the accompanying drawings

1‧‧‧影像處理系統 1‧‧‧Image Processing System

12‧‧‧特徵抽取模組 12‧‧‧ Feature Extraction Module

14‧‧‧分類模組 14‧‧‧Classification module

122‧‧‧特徵匹配單元 122‧‧‧Feature matching unit

20‧‧‧記憶體裝置 20‧‧‧ memory device

BL1~BL8‧‧‧位元線 BL1~BL8‧‧‧ bit line

WL1~WL12‧‧‧字元線 WL1~WL12‧‧‧ character line

P11~P14、P21~P24‧‧‧參數單元 P11~P14, P21~P24‧‧‧ parameter unit

IMG‧‧‧影像 IMG‧‧‧ images

F1、F2‧‧‧濾鏡 F1, F2‧‧‧ filter

SL1~SL12‧‧‧源極線 SL1~SL12‧‧‧ source line

S501~S509‧‧‧步驟 S501~S509‧‧‧Steps

第1圖繪示依據本發明一實施例的影像處理系統的架構圖;第2A、2B圖繪示依據本發明一實施例的以濾鏡處理影像的示意圖;第3圖繪示依據本發明一實施例的記憶體裝置的方塊圖;第4圖繪示依據本發明一實施例的參數單元的方塊圖;第5圖繪示依據本發明一實施例的記憶體裝置的操作方法的流程圖;第6A圖繪示依據本發明另一實施例的以濾鏡處理影像的示意圖;以及第6B圖繪示依據本發明另一實施例的記憶體裝置的運作示意圖。 1 is a block diagram of an image processing system according to an embodiment of the present invention; 2A and 2B are schematic views showing a process of processing an image by a filter according to an embodiment of the present invention; and FIG. 3 is a view showing a method according to the present invention; FIG. 4 is a block diagram of a memory device according to an embodiment of the invention; FIG. 5 is a flow chart showing a method for operating a memory device according to an embodiment of the invention; 6A is a schematic diagram of processing an image by a filter according to another embodiment of the present invention; and FIG. 6B is a schematic diagram showing the operation of the memory device according to another embodiment of the present invention.

請參照第1圖,第1圖繪示依據本發明一實施例的影像處理系統的架構圖。影像處理系統1包括一特徵抽取模組12以及一分類模組14。影像處理系統1例如可應用於物件辨識(object recognition)或類神經網路(neural network)等技術中。影像處理系統1可用以處理一影像IMG。 Please refer to FIG. 1 . FIG. 1 is a block diagram of an image processing system according to an embodiment of the invention. The image processing system 1 includes a feature extraction module 12 and a classification module 14. The image processing system 1 can be applied, for example, to techniques such as object recognition or neural networks. The image processing system 1 can be used to process an image IMG.

特徵抽取模組12可包括多個特徵匹配單元122。各個特徵匹配單元122可例如以一濾鏡處理影像IMG,其中濾鏡可例如是方形、圓形、三角形等幾何圖案。在一實施例中,如第2A、2B圖所示,特徵匹配單元122是以一個大小為2×2的濾鏡F1對影像IMG進行處 理。濾鏡F1包括多個參數a1、a2、a3、a4。影像IMG是一大小為4x4的影像,包括多個畫素資料X11~X44。當以濾鏡F1處理影像IMG時,係將影像IMG與濾鏡F1做摺積(convolution)。如第2B圖所示,濾鏡F1與影像IMG之間有一相對位置,此相對位置為可改變的。所謂「相對位置」指的是濾鏡F1所要處理的影像IMG的區域。例如,當以濾鏡F1處理影像IMG的一第一區域時,可視作將濾鏡F1覆蓋於影像IMG的第一區域的畫素資料X11、X21、X12、X22上,並將濾鏡F1的參數a1~a4分別與畫素資料X11、X21、X12、X22相乘,特徵匹配單元122的輸出F11等於X11*a1+X21*a2+X12*a3+X22*a4。相似地,當濾鏡F1覆蓋於影像IMG的一第二區域的畫素資料X12、X22、X13、X23上,特徵匹配單元122的輸出F12等於X12*a1+X22*a2+X13*a3+X23*a4,以此類推。當完成特徵匹配的程序後,可得到特徵匹配結果F11~F33(如第2A圖所示)。這些結果會由分類模組14進行分類。 The feature extraction module 12 can include a plurality of feature matching units 122. Each feature matching unit 122 can process the image IMG, for example, with a filter, wherein the filter can be, for example, a geometric pattern such as a square, a circle, a triangle, or the like. In an embodiment, as shown in FIGS. 2A and 2B, the feature matching unit 122 performs the image IMG with a filter F1 having a size of 2×2. Reason. The filter F1 includes a plurality of parameters a1, a2, a3, a4. The image IMG is a 4x4 image, including multiple pixel data X11~X44. When the image IMG is processed by the filter F1, the image IMG is convolved with the filter F1. As shown in Fig. 2B, there is a relative position between the filter F1 and the image IMG, and the relative position is changeable. The "relative position" refers to the area of the image IMG to be processed by the filter F1. For example, when processing a first region of the image IMG with the filter F1, the filter F1 may be covered on the pixel data X11, X21, X12, X22 of the first region of the image IMG, and the filter F1 is The parameters a1 to a4 are multiplied by the pixel data X11, X21, X12, and X22, respectively, and the output F11 of the feature matching unit 122 is equal to X11*a1+X21*a2+X12*a3+X22*a4. Similarly, when the filter F1 covers the pixel data X12, X22, X13, X23 of a second region of the image IMG, the output F12 of the feature matching unit 122 is equal to X12*a1+X22*a2+X13*a3+X23 *a4, and so on. When the feature matching program is completed, the feature matching results F11~F33 can be obtained (as shown in FIG. 2A). These results are sorted by the classification module 14.

所述的特徵匹配單元122可用一或多個記憶體裝置來實現,其中記憶體裝置可為揮發性記憶體或非揮發性記憶體,例如NAND型或NOR型記憶體。請參照第3圖,第3圖繪示依據本發明一實施例的記憶體裝置的方塊圖。記憶體裝置20包括多條位元線BL1~BL4、多條源極線SL1、SL2、多條字元線WL1、WL2以及一控制電路CTL,其中控制電路CTL耦接至字元線WL1、WL2及位元線BL1~BL4。位元線BL1~BL4可提供給影像IMG的畫素資料作為輸入端。字元線WL1包括多個參數單元P11~P14,且字元線WL1通過參數單元P11~P14分別耦接至位元線BL1~BL4以及源極線SL1。字元線WL2包括多個參數單 元P21~P24,且字元線WL2通過參數單元P21~P24分別耦接至位元線BL1~BL4以及源極線SL2。 The feature matching unit 122 can be implemented by one or more memory devices, wherein the memory device can be a volatile memory or a non-volatile memory, such as a NAND type or a NOR type memory. Please refer to FIG. 3. FIG. 3 is a block diagram of a memory device according to an embodiment of the invention. The memory device 20 includes a plurality of bit lines BL1 BLBL4, a plurality of source lines SL1 and SL2, a plurality of word lines WL1 and WL2, and a control circuit CTL, wherein the control circuit CTL is coupled to the word lines WL1 and WL2. And bit lines BL1~BL4. The bit lines BL1 to BL4 can be supplied to the pixel data of the image IMG as an input terminal. The word line WL1 includes a plurality of parameter units P11 to P14, and the word line WL1 is coupled to the bit lines BL1 BLBL4 and the source line SL1 through the parameter units P11 to P14, respectively. Word line WL2 includes multiple parameter sheets The elements P21 to P24, and the word line WL2 are respectively coupled to the bit lines BL1 to BL4 and the source line SL2 through the parameter units P21 to P24.

字元線WL1的參數單元P11~P14依據濾鏡F1的參數a1~a4進行配置。相似地,字元線WL2的參數單元P21~P24亦依據濾鏡F1的參數a1~a4進行配置。然而,字元線WL1的參數單元P11~P14與字元線WL2的參數單元P21~P21係對應至參數a1~a4的不同排列方式。在本實施例中,參數單元P11對應至參數a1,參數單元P12對應至參數a2,參數單元P13對應至參數a3,且參數單元P14對應至參數a4。參數單元P21對應至參數a3,參數單元P22對應至參數a4,參數單元P23對應至參數a1,且參數單元P24對應至參數a2。 The parameter units P11 to P14 of the word line WL1 are arranged in accordance with the parameters a1 to a4 of the filter F1. Similarly, the parameter units P21 to P24 of the word line WL2 are also configured according to the parameters a1 to a4 of the filter F1. However, the parameter units P11 to P14 of the word line WL1 and the parameter units P21 to P21 of the word line WL2 correspond to different arrangements of the parameters a1 to a4. In the present embodiment, the parameter unit P11 corresponds to the parameter a1, the parameter unit P12 corresponds to the parameter a2, the parameter unit P13 corresponds to the parameter a3, and the parameter unit P14 corresponds to the parameter a4. The parameter unit P21 corresponds to the parameter a3, the parameter unit P22 corresponds to the parameter a4, the parameter unit P23 corresponds to the parameter a1, and the parameter unit P24 corresponds to the parameter a2.

如第4圖所示,在一實施例中,各參數單元P11~P14、P21~P24可包括一電晶體M及一(或多個)電阻R。當字元線被控制電路CTL致能(enable)時,該字元線上的參數單元的電晶體M會導通,致使該字元線(假設字元線WL1被致能)可與位元線BL1~BL4上的訊號進行運算,並通過源極線SL1輸出結果SUM1。電阻R的電阻值可依據此參數單元對應到的參數進行配置。例如,參數單元P11的電阻R的電阻值可依據參數a1進行配置,參數單元P12的電阻R的電阻值可依據參數a2進行配置,以此類推。 As shown in FIG. 4, in an embodiment, each parameter unit P11~P14, P21~P24 may include a transistor M and one (or more) resistors R. When the word line is enabled by the control circuit CTL, the transistor M of the parameter unit on the word line is turned on, so that the word line (assuming the word line WL1 is enabled) can be associated with the bit line BL1. The signal on ~BL4 is operated, and the result SUM1 is output through the source line SL1. The resistance value of the resistor R can be configured according to the parameter corresponding to the parameter unit. For example, the resistance value of the resistance R of the parameter unit P11 can be configured according to the parameter a1, the resistance value of the resistance R of the parameter unit P12 can be configured according to the parameter a2, and so on.

在一實施例中,參數單元P11~P14、P21~P24的配置可為固定的,且預先編程於記憶體裝置20中。在另一實施例中, 參數單元P11~P14、P21~P24的配置為可改變的,且可依據儲存於記憶體裝置20或一外部裝置(未繪示)的一參數配置表對參數單元P11~P14、P21~P24進行編程。外部裝置例如是一揮發性記憶體或非揮發性記憶體。參數配置表可記錄字元線WL1~WL2的參數單元P11~P14、P21~P24與濾鏡F1的參數a1~a4之間的對應關係。也就是說,參數配置表記錄了各字元線所對應的參數的排列方式。 In an embodiment, the configuration of the parameter units P11~P14, P21~P24 may be fixed and pre-programmed in the memory device 20. In another embodiment, The configuration of the parameter units P11~P14, P21~P24 is changeable, and the parameter units P11~P14, P21~P24 can be performed according to a parameter configuration table stored in the memory device 20 or an external device (not shown). program. The external device is, for example, a volatile memory or a non-volatile memory. The parameter configuration table can record the correspondence between the parameter units P11~P14, P21~P24 of the word line WL1~WL2 and the parameters a1~a4 of the filter F1. That is to say, the parameter configuration table records the arrangement of the parameters corresponding to each character line.

請參照第5圖,第5圖繪示記憶體裝置的操作方法的流程圖。本操作方法可用以操作記憶體裝置20。本操作方法包括步驟S501~S509。 Referring to FIG. 5, FIG. 5 is a flow chart showing a method of operating the memory device. This method of operation can be used to operate the memory device 20. The operation method includes steps S501 to S509.

在步驟S501中,提供一影像IMG,其中影像IMG包括多個畫素資料X11~X44。 In step S501, an image IMG is provided, wherein the image IMG includes a plurality of pixel data X11~X44.

在步驟S503中,當以濾鏡F1處理影像IMG的第一區域時,由控制電路CTL將影像IMG的第一區域的畫素資料X11、X21、X12、X22輸入位元線BL1~BL4。例如,控制電路CTL將畫素資料X11輸入位元線BL1,畫素資料X21輸入位元線BL2,畫素資料X12輸入位元線BL3,畫素資料X22輸入位元線BL4。 In step S503, when the first region of the image IMG is processed by the filter F1, the pixel data X11, X21, X12, and X22 of the first region of the image IMG are input to the bit lines BL1 to BL4 by the control circuit CTL. For example, the control circuit CTL inputs the pixel data X11 into the bit line BL1, the pixel data X21 into the bit line BL2, the pixel data X12 into the bit line BL3, and the pixel data X22 into the bit line BL4.

在步驟S505中,由控制電路CTL致能字元線的其中之一WL1,以字元線WL1與影像IMG的第一區域的畫素資料X11、X21、X12、X22進行運算。在一實施例中,畫素資料X11、X21、X12、X22是以電壓訊號(voltage signal)的形式輸入位元線BL1~BL4。當畫素資料X11經過參數單元P11的電阻R(電阻值依據參數a1設置)所產生的電 流會流入源極線SL1,其中所產生的電流即可視作X11*a1的結果。相似地,畫素資料X21經過參數單元P12的電阻R(電阻值依據參數a2設置)所產生的電流可視作X21*a2的結果,以此類推。各個畫素資料X11、X21、X12、X22經過參數單元P11~P14所產生的電流會匯集於源極線SL1上。再藉由一感測放大器(未繪示)感測源極線SL1上的總電流即可得到上述運算的結果SUM1(於此代表F11)。換言之,源極線SL1的輸出SUM1為代表X11*a1+X21*a2+X12*a3+X22*a4,也就是F11。 In step S505, one of the control word lines WL1 of the enable word line is operated by the word line WL1 and the pixel data X11, X21, X12, X22 of the first area of the image IMG. In one embodiment, the pixel data X11, X21, X12, and X22 are input to the bit lines BL1 BLBL4 in the form of voltage signals. When the pixel data X11 passes through the resistance R of the parameter unit P11 (the resistance value is set according to the parameter a1) The flow will flow into the source line SL1, and the generated current can be regarded as the result of X11*a1. Similarly, the current generated by the pixel data X21 through the resistance R of the parameter unit P12 (the resistance value is set according to the parameter a2) can be regarded as the result of X21*a2, and so on. The currents generated by the respective pixel data X11, X21, X12, and X22 through the parameter units P11 to P14 are collected on the source line SL1. The result of the above operation SUM1 (here, F11) is obtained by sensing the total current on the source line SL1 by a sense amplifier (not shown). In other words, the output SUM1 of the source line SL1 is represented by X11*a1+X21*a2+X12*a3+X22*a4, that is, F11.

在步驟S507中,當以濾鏡F1處理影像IMG的第二區域時,由控制電路CTL保持位於影像IMG的第二區域內與第一區域重疊的該些畫素資料X12、X22輸入於該些位元線BL3、BL4,並將位於影像IMG的第二區域內與第一區域未重疊的畫素資料X13、X23輸入位元線BL1、BL2。換言之,在更新位元線BL1~BL4的輸入時,控制電路CTL會保留位元線BL3、BL4上的輸入(即畫素資料X12、X22),只更新位元線BL1、BL2上的輸入,亦即將畫素資料X13輸入位元線BL1,並將畫素資料X23輸入位元線BL2。 In step S507, when the second region of the image IMG is processed by the filter F1, the pixel data X12, X22 that are overlapped with the first region in the second region of the image IMG are held by the control circuit CTL. The bit lines BL3 and BL4 input the pixel data X13 and X23 which are not overlapped with the first area in the second area of the image IMG, and are input to the bit lines BL1 and BL2. In other words, when updating the input of the bit lines BL1 BL BL4, the control circuit CTL retains the inputs on the bit lines BL3, BL4 (ie, the pixel data X12, X22), and updates only the inputs on the bit lines BL1, BL2. The pixel data X13 is also input to the bit line BL1, and the pixel data X23 is input to the bit line BL2.

在步驟S509中,由控制電路CTL致能字元線WL2,以字元線WL2與影像IMG的第二區域的畫素資料X12、X22、X13、X23進行運算。由於參數單元P21、P22、P23、P24被配置為分別對應至參數a3、a4、a1、a2,匯集於源極線SL2上的電流的總和(SUM2)可視作X13*a3+X23*a4+X12*a1+X22*a2的結果F12。 In step S509, the word line WL2 is enabled by the control circuit CTL, and the pixel data WL2 and the pixel data X12, X22, X13, and X23 of the second region of the image IMG are operated. Since the parameter units P21, P22, P23, and P24 are configured to correspond to the parameters a3, a4, a1, and a2, respectively, the sum of the currents (SUM2) collected on the source line SL2 can be regarded as X13*a3+X23*a4+X12. The result of *a1+X22*a2 is F12.

在一實施利中,控制電路CTL可依據濾鏡F1與影像IMG的一相對位置決定要用來運算的字元線。也就是說,控制電路CTL可根據位元線BL1~BL4上被保留的輸入及被更新的輸入選擇具有對應配置的參數單元的字元線,以得到正確的計算結果。在另一實施例中,控制電路CTL可依據參數配置表決定所要用來運算的字元線。 In an implementation, the control circuit CTL can determine the word line to be used for operation according to a relative position of the filter F1 and the image IMG. That is to say, the control circuit CTL can select the word line having the correspondingly configured parameter unit according to the reserved input on the bit lines BL1 BL BL4 and the updated input to obtain a correct calculation result. In another embodiment, the control circuit CTL can determine the word line to be used for the operation according to the parameter configuration table.

在一實施例中,濾鏡F1從影像IMG的一第一側邊界經一或多次橫向移動而到達影像IMG的一第二側邊界時,濾鏡F1可回到影像IMG的第一側邊界並往下方移動一個畫素單位。此時,控制電路CTL可更新所有位元線BL1~BL4上的輸入。例如,當完成以濾鏡F1處理影像IMG的畫素資料X13、X23、X14、X24後,濾鏡F1可移動至影像IMG的畫素資料X21、X31、X22、X32,而控制電路CTL可將位元線BL1~BL4上的輸入分別更新為畫素資料X21、X31、X22、X32,並以字元線WL1進行運算。 In an embodiment, when the filter F1 is laterally moved from a first side boundary of the image IMG to a second side boundary of the image IMG, the filter F1 may return to the first side boundary of the image IMG. And move one pixel unit down. At this time, the control circuit CTL can update the inputs on all of the bit lines BL1 BL BL4. For example, after the pixel data X13, X23, X14, and X24 of the image IMG are processed by the filter F1, the filter F1 can be moved to the pixel data X21, X31, X22, and X32 of the image IMG, and the control circuit CTL can The inputs on the bit lines BL1 to BL4 are updated to the pixel data X21, X31, X22, and X32, respectively, and are operated by the word line WL1.

依據上述的記憶體裝置及操作方法,當濾鏡由影像的第一區域移動至第二區域時,控制電路僅將影像的第一區域與第二區域未重疊的畫素資料更新至位元線,而不更動輸入於位元線上影像的第一區域與第二區域重疊的畫素資料,並以對應的字元線進行運算。因此,可有效地減少運算過程中所需要執行的資料搬動的次數,進而降低能量的消耗。 According to the above memory device and operation method, when the filter is moved from the first region of the image to the second region, the control circuit only updates the pixel data that is not overlapped between the first region and the second region of the image to the bit line. The pixel data overlapped between the first area and the second area of the image input on the bit line is not changed, and the operation is performed by the corresponding word line. Therefore, the number of times of data movement required to be performed in the calculation process can be effectively reduced, thereby reducing energy consumption.

請參照第6A、6B圖所示的另一實施例。本實施例的記憶體裝置可用以實現濾鏡F1及濾鏡F2。影像IMG及濾鏡F1、F2如第6A 圖所示,各字元線的參數單元的配置則如第6B圖所示。為了更清楚的說明,第6B圖中控制電路被省略,且參數單元被以所對應的濾鏡F1、F2的參數或0表示。 Please refer to another embodiment shown in FIGS. 6A and 6B. The memory device of this embodiment can be used to implement the filter F1 and the filter F2. Image IMG and filters F1, F2 as in 6A As shown in the figure, the configuration of the parameter unit of each character line is as shown in Fig. 6B. For a clearer explanation, the control circuit in Fig. 6B is omitted, and the parameter unit is represented by the parameter of the corresponding filter F1, F2 or 0.

在本實施例中,記憶體裝置的控制電路僅需更新兩次位元線上的輸入即可計算出影像IMG及濾鏡F1、F2的摺積。如第6B圖所示,於第一時間T1輸入至位元線BL1~BL8的分別是畫素資料X11、X21、X31、X41、X12、X22、X32、X42。於第二時間T2,控制電路保留了位元線BL5~BL8上的輸入,並將位元線BL1~BL4上的輸入分別更新為畫素資料X13、X23、X33、X43。於第三時間T3,控制電路保留了位元線BL1~BL4上的輸入,並將位元線BL5~BL8上的輸入分別更新為畫素資料X14、X24、X34、X44。 In this embodiment, the control circuit of the memory device only needs to update the input on the bit line twice to calculate the product IMG and the convolution of the filters F1 and F2. As shown in FIG. 6B, the pixel data BL1 to BL8 input to the bit lines BL1 to BL8 at the first time T1 are pixel data X11, X21, X31, X41, X12, X22, X32, and X42, respectively. At the second time T2, the control circuit retains the inputs on the bit lines BL5~BL8, and updates the inputs on the bit lines BL1~BL4 to the pixel data X13, X23, X33, X43, respectively. At the third time T3, the control circuit retains the inputs on the bit lines BL1 BLBL4 and updates the inputs on the bit lines BL5 BLBL8 to the pixel data X14, X24, X34, X44, respectively.

於第一時間T1,控制電路致能字元線WL1、WL3、WL5、WL7、WL9、WL11,以獲得F11、F21、F31、G11、G21、G31。於第二時間T2,控制電路致能字元線WL2、WL4、WL6、WL8、WL10、WL12,以獲得F12、F22、F32、G12、G22、G32。於第三時間T3,控制電路致能字元線WL1、WL3、WL5、WL7、WL9、WL11,以獲得F13、F23、F33、G13、G23、G33。 At the first time T1, the control circuit enables the word lines WL1, WL3, WL5, WL7, WL9, WL11 to obtain F11, F21, F31, G11, G21, G31. At the second time T2, the control circuit enables the word lines WL2, WL4, WL6, WL8, WL10, WL12 to obtain F12, F22, F32, G12, G22, G32. At the third time T3, the control circuit enables the word lines WL1, WL3, WL5, WL7, WL9, WL11 to obtain F13, F23, F33, G13, G23, G33.

在本實施例中,藉由濾鏡F1、F2的參數以不同的排列方式配置於不同的字元線上,不僅能夠減少能量消耗,還能夠縮短運算所需的時間。 In the present embodiment, by arranging the parameters of the filters F1 and F2 on different word lines in different arrangement manners, not only the energy consumption can be reduced, but also the time required for the calculation can be shortened.

需要注意的是,上述的各實施例僅是為了說明而已,影像IMG的大小雖然以4×4為例,濾鏡F1、F2雖然以2×2為例,但本發明 可應用於任何大小的影像及濾鏡。此外,記憶體裝置的位元線、字元線及參數單元的數量,皆可依據不同的需求進行設計。 It should be noted that the foregoing embodiments are for illustrative purposes only. The size of the image IMG is 4×4, and the filters F1 and F2 are 2×2, but the present invention. Can be applied to images and filters of any size. In addition, the number of bit lines, word lines, and parameter units of the memory device can be designed according to different needs.

綜上所述,雖然本發明已以實施例揭露如上,然其並非用以限定本發明。本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾。因此,本發明之保護範圍當視後附之申請專利範圍所界定者為準。 In conclusion, the present invention has been disclosed in the above embodiments, but it is not intended to limit the present invention. A person skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.

Claims (10)

一種記憶體裝置,包括:複數條位元線,用以接收一影像的複數個資料;複數條字元線,各該字元線耦接至複數個參數單元,且各該字元線通過該些參數單元耦接至該些位元線,其中各該字元線的該些參數單元係依據一濾鏡的複數個參數進行配置,且該些字元線的該些參數單元的配置相互不同;以及一控制電路,耦接至該些字元線及該些位元線,其中當以該濾鏡處理該影像的一第一區域時,該控制電路將位於該影像的該第一區域的該些資料輸入該些位元線,並致能該些字元線的其中之一以進行運算;當以該濾鏡處理該影像的一第二區域時,該控制電路保持位於該影像的該第二區域內與該第一區域重疊的該些資料輸入於該些位元線,並將位於該影像的該第二區域內與該第一區域未重疊的該些資料輸入該些位元線,並致能該些字元線的其中另一以進行運算。 A memory device includes: a plurality of bit lines for receiving a plurality of data of an image; a plurality of word lines, each of the word lines being coupled to a plurality of parameter units, and each of the word lines passing through the The parameter units are coupled to the bit lines, wherein the parameter units of each of the word lines are configured according to a plurality of parameters of a filter, and the configuration of the parameter units of the word lines are different from each other. And a control circuit coupled to the word lines and the bit lines, wherein when a first region of the image is processed by the filter, the control circuit is located in the first region of the image Inputting the data into the bit lines and enabling one of the word lines to perform an operation; when processing a second region of the image with the filter, the control circuit maintains the image located at the image The data overlapping the first area in the second area is input to the bit lines, and the pieces of data that are not overlapped with the first area in the second area of the image are input to the bit lines And enabling one of the other character lines to proceed Count. 如申請專利範圍第1項所述之記憶體裝置,其中該些參數單元的配置係為固定的,且預先編程於該記憶體裝置中;或者該些參數單元的配置係為可改變的,且依據儲存於該記憶體裝置或一外部裝置的一參數配置表對該些參數單元進行編程。 The memory device of claim 1, wherein the configuration of the parameter units is fixed and pre-programmed in the memory device; or the configuration of the parameter units is changeable, and The parameter units are programmed according to a parameter configuration table stored in the memory device or an external device. 如申請專利範圍第1項所述之記憶體裝置,其中該控制電路依據該濾鏡與該影像的一相對位置或一參數配置表決定要用來運算的該字元線。 The memory device of claim 1, wherein the control circuit determines the word line to be used for operation according to a relative position of the filter and the image or a parameter configuration table. 如申請專利範圍第1項所述之記憶體裝置,其中各該參數單元包括一或多個電阻,該一或多個電阻的電阻值係依據該濾鏡的該些參數決定。 The memory device of claim 1, wherein each of the parameter units includes one or more resistors, and the resistance values of the one or more resistors are determined according to the parameters of the filter. 如申請專利範圍第1項所述之記憶體裝置,其中對應於該些字元線的該些參數單元的配置係對應於該濾鏡的該些參數的不同排列方式。 The memory device of claim 1, wherein the configuration of the parameter units corresponding to the word lines corresponds to different arrangements of the parameters of the filter. 一種記憶體裝置的操作方法,包括:提供一影像,其中該影像包括複數個資料;當以一濾鏡處理該影像的一第一區域時,由該記憶體裝置的一控制電路將該影像的該第一區域的該些資料輸入該記憶體裝置的複數條位元線;由該控制電路致能該記憶體裝置的複數條字元線的其中之一,以該字元線與該影像的該第一區域的該些資料進行運算,其中各該字元線耦接至複數個參數單元,各該字元線的該些參數單元係依據該濾鏡的複數個參數進行配置,且該些字元線的該些參數單元的配置相互不同;當以該濾鏡處理該影像的一第二區域時,由該控制電路保持位於該影像的該第二區域內與該第一區域重疊的該些資料輸入於該些位元線,並將位於該影像的該第二區域內與該第一區域未重疊的該些資料輸入該些位元線;以及由該控制電路致能該些字元線的其中另一,以該另一字元線與該影像的該第二區域的該些資料進行運算。 A method of operating a memory device, comprising: providing an image, wherein the image includes a plurality of data; when processing a first region of the image with a filter, the image is controlled by a control circuit of the memory device The data of the first area is input to a plurality of bit lines of the memory device; and the control circuit enables one of the plurality of word lines of the memory device to use the word line and the image The data of the first area is calculated, wherein each of the word lines is coupled to a plurality of parameter units, and the parameter units of each of the word lines are configured according to a plurality of parameters of the filter, and the The configuration of the parameter units of the word line are different from each other; when the second area of the image is processed by the filter, the control circuit maintains the overlap with the first area in the second area of the image And inputting the data to the bit lines, and inputting the data that is not overlapped with the first area in the second area of the image into the bit lines; and enabling the characters by the control circuit One of the other Performing operations on said plurality of data of the second region and the word line of the other image. 如申請專利範圍第6項所述之操作方法,其中該些參數單元的配置係為固定的,且預先編程於該記憶體裝置中;或者該些參數單元的配置係為可改變的,且依據儲存於該記憶體裝置或一外部裝置的一參數配置表對該些參數單元進行編程。 The method of operation of claim 6, wherein the configuration of the parameter units is fixed and pre-programmed in the memory device; or the configuration of the parameter units is changeable, and A parameter configuration table stored in the memory device or an external device programs the parameter units. 如申請專利範圍第6項所述之操作方法,其中該控制電路依據該濾鏡與該影像的一相對位置或一參數配置表決定要用來運算的該字元線。 The operating method of claim 6, wherein the control circuit determines the word line to be used for calculation according to a relative position of the filter and the image or a parameter configuration table. 如申請專利範圍第6項所述之操作方法,其中各該參數單元包括一或多個電阻,該一或多個電阻的電阻值係依據該濾鏡的該些參數決定。 The method of operation of claim 6, wherein each of the parameter units includes one or more resistors, and the resistance values of the one or more resistors are determined according to the parameters of the filter. 如申請專利範圍第6項所述之操作方法,其中對應於該些字元線的該些參數單元的配置係對應於該濾鏡的該些參數的不同排列方式。 The method of operation of claim 6, wherein the configuration of the parameter units corresponding to the word lines corresponds to a different arrangement of the parameters of the filter.
TW107109299A 2018-03-19 2018-03-19 Memory device and operation method thereof TWI657443B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107109299A TWI657443B (en) 2018-03-19 2018-03-19 Memory device and operation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107109299A TWI657443B (en) 2018-03-19 2018-03-19 Memory device and operation method thereof

Publications (2)

Publication Number Publication Date
TWI657443B true TWI657443B (en) 2019-04-21
TW201939498A TW201939498A (en) 2019-10-01

Family

ID=66996014

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107109299A TWI657443B (en) 2018-03-19 2018-03-19 Memory device and operation method thereof

Country Status (1)

Country Link
TW (1) TWI657443B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200509367A (en) * 2003-08-14 2005-03-01 Toshiba Corp Semiconductor memory apparatus having magneto-resistive device and its method of writing data
CN1286115C (en) * 2001-11-29 2006-11-22 株式会社东芝 Magnetic random access storage device and its read-out circuit and producing method thereof
CN104465694A (en) * 2013-09-25 2015-03-25 爱思开海力士有限公司 Electronic device
WO2016068920A1 (en) * 2014-10-29 2016-05-06 Hewlett Packard Enterprise Development Lp Memristive dot product engine for vector processing
CN106158017A (en) * 2016-06-20 2016-11-23 北京大学 The method and apparatus realizing logic and arithmetical operation based on resistance computing
CN106530210A (en) * 2016-10-31 2017-03-22 北京大学 Equipment and method for realizing parallel convolution calculation based on resistive random access memory array
CN106847335A (en) * 2016-12-27 2017-06-13 北京大学 Convolutional calculation storage integration apparatus and method based on resistance-change memory array

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1286115C (en) * 2001-11-29 2006-11-22 株式会社东芝 Magnetic random access storage device and its read-out circuit and producing method thereof
TW200509367A (en) * 2003-08-14 2005-03-01 Toshiba Corp Semiconductor memory apparatus having magneto-resistive device and its method of writing data
CN104465694A (en) * 2013-09-25 2015-03-25 爱思开海力士有限公司 Electronic device
WO2016068920A1 (en) * 2014-10-29 2016-05-06 Hewlett Packard Enterprise Development Lp Memristive dot product engine for vector processing
CN106158017A (en) * 2016-06-20 2016-11-23 北京大学 The method and apparatus realizing logic and arithmetical operation based on resistance computing
CN106530210A (en) * 2016-10-31 2017-03-22 北京大学 Equipment and method for realizing parallel convolution calculation based on resistive random access memory array
CN106847335A (en) * 2016-12-27 2017-06-13 北京大学 Convolutional calculation storage integration apparatus and method based on resistance-change memory array

Also Published As

Publication number Publication date
TW201939498A (en) 2019-10-01

Similar Documents

Publication Publication Date Title
US20210342999A1 (en) System and method for training a damage identification model
TWI632526B (en) Image enhancement device and method for convolutional network apparatus
US20180341829A1 (en) Image classification system and method, classification data creation system and method, and storage medium
CN107274442A (en) A kind of image-recognizing method and device
CN110289029B (en) Memory device and operation method thereof
CN111738045A (en) Image detection method and device, electronic equipment and storage medium
TWI640011B (en) Non-volatile memory device and error compensation method for verifying therefor
CN113808108B (en) Visual detection method and system for defects of printing film
CN113378976A (en) Target detection method based on characteristic vertex combination and readable storage medium
CN111951210A (en) Data processing method, device and equipment
TWI657443B (en) Memory device and operation method thereof
WO2020047316A1 (en) System and method for training a damage identification model
CN112085708B (en) Method and equipment for detecting defects of straight line edges in outer contour of product
CN116625239A (en) Step hole detection method, device and system based on image processing
CN114972268A (en) Defect image generation method and device, electronic equipment and storage medium
KR20200065909A (en) Apparatus for detection wiring mismatch of mof and wattmeter and control method thereof
CN114612427A (en) Nameplate defect detection method and device, electronic equipment and storage medium
CN112801067A (en) Method for detecting iris light spot and computing equipment
CN115439426A (en) Width information determination method and device and electronic equipment
US10460444B2 (en) Memory device and operation method thereof
CN116977783A (en) Training method, device, equipment and medium of target detection model
CN110020351B (en) Click thermodynamic diagram anomaly detection method and device
CN113409375B (en) Image processing method, image processing apparatus, and non-volatile storage medium
JP2015201674A5 (en)
CN110222688B (en) Instrument positioning method based on multi-level correlation filtering