TWI822145B - Storage circuit, chip, data processing method, and electronic device - Google Patents

Storage circuit, chip, data processing method, and electronic device Download PDF

Info

Publication number
TWI822145B
TWI822145B TW111123987A TW111123987A TWI822145B TW I822145 B TWI822145 B TW I822145B TW 111123987 A TW111123987 A TW 111123987A TW 111123987 A TW111123987 A TW 111123987A TW I822145 B TWI822145 B TW I822145B
Authority
TW
Taiwan
Prior art keywords
data
input
output
value
flag signal
Prior art date
Application number
TW111123987A
Other languages
Chinese (zh)
Other versions
TW202401231A (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 TW111123987A priority Critical patent/TWI822145B/en
Application granted granted Critical
Publication of TWI822145B publication Critical patent/TWI822145B/en
Publication of TW202401231A publication Critical patent/TW202401231A/en

Links

Images

Landscapes

  • Dram (AREA)
  • Credit Cards Or The Like (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A storage circuit, a chip, a data processing method, and an electronic device are disclosed. The storage circuit includes: an input control circuit and a memory. The input control circuit is configured to: receive n input data and an input control signal; perform first data processing on the n input data based on the input control signal to obtain n intermediate data corresponding to the n input data one by one; and write the n intermediate data and a sign signal corresponding to the n input data into the memory; the memory is configured to store the n intermediate data and the sign signal; different values of the sign signal respectively represent different processing processes of the first data processing, and n is a positive integer.

Description

儲存電路、晶片、資料處理方法和電子設備Storage circuits, chips, data processing methods and electronic devices

本公開的實施例涉及一種儲存電路、晶片、資料處理方法和電子設備。 [相關申請交叉引用] Embodiments of the present disclosure relate to a storage circuit, a chip, a data processing method and an electronic device. [Related Application Cross-Reference]

本申請要求於2021年7月2日遞交的中國專利申請第202110750668.8號的優先權,在此全文引用上述中國專利申請公開的內容以作為本申請的一部分。This application claims priority from Chinese Patent Application No. 202110750668.8 submitted on July 2, 2021. The disclosure of the above Chinese patent application is hereby cited in its entirety as part of this application.

高速緩衝記憶體(cache)是位於晶片的中央處理器(Central Processing Unit,CPU)和主記憶體(Dynamic Random Access Memory,DRAM)之間的一種記憶體,其規模較小,但是運行速度很快,通常,高速緩衝記憶體由靜態記憶體(Static Random Access Memory,SRAM)組成。Cache is a memory located between the chip's Central Processing Unit (CPU) and main memory (Dynamic Random Access Memory, DRAM). It is small in size but runs very fast. , Usually, the cache memory is composed of static memory (Static Random Access Memory, SRAM).

提供該內容部分以便以簡要的形式介紹構思,這些構思將在後面的具體實施方式部分被詳細描述。該內容部分並不旨在標識要求保護的技術方案的關鍵特徵或必要特徵,也不旨在用於限制所要求的保護的技術方案的範圍。This content is provided to introduce in a simplified form the concepts that are later described in detail in the Detailed Description. This content part is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.

本公開至少一實施例提供一種儲存電路包括:輸入控制電路和記憶體。輸入控制電路被配置為:接收n個輸入資料和輸入控制信號;基於所述輸入控制信號,對所述n個輸入資料進行第一資料處理,以得到與所述n個輸入資料一一對應的n個中間資料;將所述n個中間資料和與所述n個輸入資料對應的標誌信號寫入所述記憶體;所述記憶體被配置為儲存所述n個中間資料和所述標誌信號;所述標誌信號的不同值分別表示所述第一資料處理的不同處理過程,n為正整數。At least one embodiment of the present disclosure provides a storage circuit including: an input control circuit and a memory. The input control circuit is configured to: receive n input data and an input control signal; based on the input control signal, perform first data processing on the n input data to obtain a one-to-one correspondence with the n input data. n intermediate data; writing the n intermediate data and the flag signal corresponding to the n input data into the memory; the memory is configured to store the n intermediate data and the flag signal ; Different values of the flag signal respectively represent different processing processes of the first data processing, and n is a positive integer.

本公開至少一實施例還提供一種晶片,包括根據上述任一實施例所述的儲存電路。At least one embodiment of the present disclosure further provides a chip including the storage circuit according to any of the above embodiments.

本公開至少一實施例還提供一種資料處理方法,應用於本公開任一實施例所述的儲存電路,包括:接收所述n個輸入資料和所述輸入控制信號;基於所述輸入控制信號,對所述n個輸入資料進行所述第一資料處理,以得到與所述n個輸入資料一一對應的所述n個中間資料;儲存所述n個中間資料和與所述n個輸入資料對應的標誌信號,其中,n為正整數。At least one embodiment of the present disclosure also provides a data processing method, applied to the storage circuit according to any embodiment of the present disclosure, including: receiving the n input data and the input control signal; based on the input control signal, Perform the first data processing on the n input data to obtain the n intermediate data corresponding to the n input data; store the n intermediate data and the n input data The corresponding flag signal, where n is a positive integer.

本公開至少一實施例還提供一種電子設備,包括:處理裝置。所述處理裝置包括根據上述任一實施例所述的儲存電路。At least one embodiment of the present disclosure also provides an electronic device, including: a processing device. The processing device includes a storage circuit according to any of the above embodiments.

下面將參照附圖更詳細地描述本公開的實施例。雖然附圖中顯示了本公開的某些實施例,然而應當理解的是,本公開可以通過各種形式來實現,而且不應該被解釋為限於這裡闡述的實施例,相反提供這些實施例是為了更加透徹和完整地理解本公開。應當理解的是,本公開的附圖及實施例僅用於示例性作用,並非用於限制本公開的保護範圍。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather these embodiments are provided for greater understanding. A thorough and complete understanding of this disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.

應當理解,本公開的方法實施方式中記載的各個步驟可以按照不同的順序執行,和/或並行執行。此外,方法實施方式可以包括附加的步驟和/或省略執行示出的步驟。本公開的範圍在此方面不受限制。It should be understood that various steps described in the method implementations of the present disclosure may be executed in different orders and/or in parallel. Furthermore, method embodiments may include additional steps and/or omit performance of illustrated steps. The scope of the present disclosure is not limited in this regard.

本文使用的術語“包括”及其變形是開放性包括,即“包括但不限於”。術語“基於”是“至少部分地基於”。術語“一個實施例”表示“至少一個實施例”;術語“另一實施例”表示“至少一個另外的實施例”;術語“一些實施例”表示“至少一些實施例”。其他術語的相關定義將在下文描述中給出。需要注意,本公開中提及的“第一”、“第二”等概念僅用於對不同的裝置、模塊或單元進行區分,並非用於限定這些裝置、模塊或單元所執行的功能的順序或者相互依存關係。As used herein, the term "include" and its variations are open-ended, ie, "including but not limited to." The term "based on" means "based at least in part on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; and the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that concepts such as “first” and “second” mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units. Or interdependence.

需要注意,本公開中提及的“一個”、“多個”的修飾是示意性而非限制性的,本領域技術人員應當理解,除非在上下文另有明確指出,否則應該理解為“一個或多個”。It should be noted that the modifications of "one" and "plurality" mentioned in this disclosure are illustrative and not restrictive. Those skilled in the art will understand that unless the context clearly indicates otherwise, it should be understood as "one or Multiple”.

本公開實施方式中的多個裝置之間所交互的消息或者信息的名稱僅用於說明性的目的,而並不是用於對這些消息或信息的範圍進行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information.

研究發現,從架構層面上對高速緩衝記憶體進行抗老化設計核心是保持SRAM單元儲存資料的占空比為50%。但是,已有的技術結構複雜,需要對高速緩衝記憶體進行較大的改動,帶來很大的面積開銷。The study found that the core of anti-aging design of cache memory from the architectural level is to keep the duty cycle of the SRAM unit to store data at 50%. However, the existing technology has a complex structure and requires major changes to the cache memory, resulting in a large area overhead.

本公開至少一實施例提供一種儲存電路、晶片、資料處理方法和電子設備。該儲存電路包括輸入控制電路和記憶體。輸入控制電路被配置為:接收n個輸入資料和輸入控制信號;基於輸入控制信號,對n個輸入資料進行第一資料處理,以得到與n個輸入資料一一對應的n個中間資料;將n個中間資料和與n個輸入資料對應的標誌信號寫入記憶體;記憶體被配置為儲存n個中間資料和標誌信號。標誌信號的不同值分別表示第一資料處理的不同處理過程,n為正整數。At least one embodiment of the present disclosure provides a storage circuit, a chip, a data processing method and an electronic device. The storage circuit includes an input control circuit and a memory. The input control circuit is configured to: receive n input data and input control signals; perform first data processing on the n input data based on the input control signal to obtain n intermediate data corresponding to the n input data; The n intermediate data and the flag signals corresponding to the n input data are written into the memory; the memory is configured to store the n intermediate data and the flag signals. Different values of the flag signal respectively represent different processing processes of the first data processing, and n is a positive integer.

在本公開的實施例提供的儲存電路中,基於輸入控制信號對輸入資料進行第一資料處理以得到中間資料,從而使得儲存到記憶體中的中間資料滿足使用者的需求,例如,在記憶體為高速緩衝出記憶體時,基於該輸入控制信號可以將儲存到高速緩衝記憶體中的輸入資料不斷進行反相,保證高速緩衝記憶體儲存資料的占空比接近或等於50%,從而延緩了高速緩衝記憶體的老化,有效的降低了老化效應對高速緩衝記憶體的影響,大大延長了高速緩衝記憶體的使用壽命,降低設計開銷。此外,通過標誌信號標識該第一資料處理的類型,從而在輸出該中間資料時,可以基於標誌信號對中間資料進行處理,以得到準確的輸出資料(例如,與輸入資料相同)。In the storage circuit provided by the embodiment of the present disclosure, the input data is subjected to first data processing based on the input control signal to obtain intermediate data, so that the intermediate data stored in the memory meets the user's needs, for example, in the memory When buffering the memory, the input data stored in the cache memory can be continuously inverted based on this input control signal to ensure that the duty cycle of the data stored in the cache memory is close to or equal to 50%, thereby delaying the The aging of the cache memory effectively reduces the impact of the aging effect on the cache memory, greatly extending the service life of the cache memory and reducing design overhead. In addition, the flag signal is used to identify the type of the first data processing, so that when the intermediate data is output, the intermediate data can be processed based on the flag signal to obtain accurate output data (for example, the same as the input data).

下面結合附圖對本公開的實施例進行詳細說明,但是本公開並不限於這些具體的實施例。為了保持本公開實施例的以下說明清楚且簡明,本公開省略了部分已知功能和已知部件的詳細說明。The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings, but the present disclosure is not limited to these specific embodiments. In order to keep the following description of the embodiments of the present disclosure clear and concise, the present disclosure omits detailed descriptions of some well-known functions and well-known components.

圖1A為本公開至少一實施例提供的一種儲存電路的示意圖;圖1B為本公開至少一實施例提供的另一種儲存電路的示意圖。FIG. 1A is a schematic diagram of a storage circuit provided by at least one embodiment of the present disclosure; FIG. 1B is a schematic diagram of another storage circuit provided by at least one embodiment of the present disclosure.

如圖1A所示,在本公開的一些實施例中,儲存電路10包括輸入控制電路100和記憶體200。例如,記憶體200可以為高速緩衝記憶體,例如,一級高速緩衝記憶體(L1Cache)、二級高速緩衝記憶體(L2Cache)。需要說明的是,記憶體200還可以為其他類型的記憶體,本公開對此不作限定。As shown in FIG. 1A , in some embodiments of the present disclosure, the storage circuit 10 includes an input control circuit 100 and a memory 200 . For example, the memory 200 may be a cache memory, such as a first-level cache memory (L1 Cache) or a second-level cache memory (L2 Cache). It should be noted that the memory 200 can also be other types of memory, which is not limited in this disclosure.

例如,輸入控制電路100被配置為:接收n個輸入資料和輸入控制信號;基於輸入控制信號,對n個輸入資料進行第一資料處理,以得到與n個輸入資料一一對應的n個中間資料;將n個中間資料和與n個輸入資料對應的標誌信號寫入記憶體200。記憶體200被配置為儲存n個中間資料和標誌信號。For example, the input control circuit 100 is configured to: receive n pieces of input data and input control signals; based on the input control signals, perform first data processing on the n pieces of input data to obtain n intermediate pieces corresponding to the n pieces of input data. Data; write n intermediate data and flag signals corresponding to n input data into the memory 200. The memory 200 is configured to store n intermediate data and flag signals.

例如,標誌信號的不同值分別表示第一資料處理的不同處理過程,n為正整數。For example, different values of the flag signal respectively represent different processing processes of the first data processing, and n is a positive integer.

例如,每個輸入資料可以為一位(1位元,1 bit)資料,例如,每個輸入資料可以為二進制數,每個輸入資料的值可以為二進制數1或0。需要說明的是,本公開不限於此,每個輸入資料也可以為兩位資料(即2 bit)、三位資料(即3 bit)等。For example, each input data can be one bit (1 bit) data. For example, each input data can be a binary number, and the value of each input data can be a binary number 1 or 0. It should be noted that the present disclosure is not limited to this, and each input data can also be two-bit data (ie, 2 bit), three-bit data (ie, 3 bit), etc.

例如,在一些實施例中,輸入控制電路100還被配置為:基於輸入控制信號,確定與n個輸入資料對應的標誌信號。For example, in some embodiments, the input control circuit 100 is further configured to: determine a flag signal corresponding to the n input data based on the input control signal.

例如,在一些實施例中,輸入控制信號可以為一位資料(即1 bit),標誌信號也可以為一位資料,輸入控制信號和標誌信號可以為二進制數,例如,輸入控制信號可以為0或1,標誌信號也可以為0或1。但本公開不限於此,輸入控制信號和標誌信號也可以為兩位資料(即2 bit)、三位資料(即3 bit)等,例如,輸入控制信號可以為00、01、10或11,標誌信號也可以為00、01、10或11。此外,輸入控制信號和標誌信號也可以三進制數、四進制數、十進制數。本公開對於輸入控制信號和標誌信號的具體表現形式和數值不作限制。For example, in some embodiments, the input control signal can be one bit of data (ie, 1 bit), and the flag signal can also be one bit of data. The input control signal and the flag signal can be binary numbers, for example, the input control signal can be 0. or 1, the flag signal can also be 0 or 1. However, the present disclosure is not limited to this. The input control signal and the flag signal can also be two-bit data (i.e. 2 bit), three-bit data (i.e. 3 bit), etc. For example, the input control signal can be 00, 01, 10 or 11, The flag signal can also be 00, 01, 10 or 11. In addition, the input control signals and flag signals can also be ternary numbers, quaternary numbers, or decimal numbers. This disclosure does not limit the specific expression forms and numerical values of the input control signals and flag signals.

例如,在一些示例中,標誌信號與輸入控制信號相同,即輸入控制電路100直接將輸入控制信號輸入到記憶體200中以作為標誌信號,此時,若輸入控制信號為1,則標誌信號為1;若輸入控制信號為0,則標誌信號為0。又例如,在另一些示例中,標誌信號和輸入控制信號可以彼此反相,即輸入控制電路100可以對輸入控制信號進行反相處理以得到標誌信號,此時,若輸入控制信號為1,則標誌信號為0;若輸入控制信號為0,則標誌信號為1。需要說明的是,在本公開的實施例中,以輸入控制信號和標誌信號相同,且均為一位資料為例進行描述。For example, in some examples, the flag signal is the same as the input control signal, that is, the input control circuit 100 directly inputs the input control signal into the memory 200 as the flag signal. At this time, if the input control signal is 1, then the flag signal is 1; if the input control signal is 0, the flag signal is 0. For another example, in other examples, the flag signal and the input control signal can be inverted to each other, that is, the input control circuit 100 can perform inversion processing on the input control signal to obtain the flag signal. At this time, if the input control signal is 1, then The flag signal is 0; if the input control signal is 0, the flag signal is 1. It should be noted that in the embodiment of the present disclosure, the input control signal and the flag signal are the same and both are one-bit data for description.

例如,如圖1B所示,儲存電路10還包括:輸入控制信號生成器300。輸入控制信號生成器300被配置為生成輸入控制信號,並將輸入控制信號輸出至輸入控制電路100。在該實施例提供的儲存電路中,通過位於記憶體200外部的輸入控制信號生成器300生成輸入控制信號,並基於該輸入控制信號控制對輸入資料進行第一資料處理,獲取輸入控制信號的方式簡單且靈活,通過輸入控制信號生成器300輸出滿足不同需求的輸入控制信號,即可實現對輸入資料進行不同的資料處理,便於實現不同的設計需求。For example, as shown in FIG. 1B , the storage circuit 10 further includes an input control signal generator 300 . The input control signal generator 300 is configured to generate an input control signal and output the input control signal to the input control circuit 100 . In the storage circuit provided in this embodiment, the input control signal is generated by the input control signal generator 300 located outside the memory 200, and based on the input control signal, the first data processing of the input data is controlled to obtain the input control signal. It is simple and flexible. By outputting input control signals that meet different needs through the input control signal generator 300, different data processing of the input data can be implemented to facilitate the realization of different design requirements.

例如,標誌信號的不同值為隨機產生的值,標誌信號的不同值包括第一值和第二值,第一值可以為1,第二值可以為0,從而標誌信號可以為由0和1構成的隨機數序列,例如,標誌信號可以表示為00011010110111010010…。例如,在整體上,比如在高速緩衝記憶體的整個壽命週期中,標誌信號的第一值和第二值的比例在預定範圍內,預定範圍可以為2/3~3/2,由此,在該標誌信號的隨機數序列中,第一值的數量和隨機數序列中的數值的總數(即隨機數序列中包括的資料(一個bit)的數量)之間的比例可以為40%~60%。本公開的實施例以第一值為1,第二值為0為例進行說明。For example, the different values of the flag signal are randomly generated values. The different values of the flag signal include a first value and a second value. The first value may be 1 and the second value may be 0, so the flag signal may be composed of 0 and 1. The constituted random number sequence, for example, the flag signal can be expressed as 00011010110111010010…. For example, on the whole, such as in the entire life cycle of the cache memory, the ratio of the first value and the second value of the flag signal is within a predetermined range, and the predetermined range may be 2/3~3/2. Therefore, In the random number sequence of the flag signal, the ratio between the number of first values and the total number of values in the random number sequence (that is, the number of data (one bit) included in the random number sequence) can be 40% to 60 %. The embodiment of the present disclosure takes the first value as 1 and the second value as 0 as an example for description.

例如,在一些實施例中,標誌信號是一個第一值和第二值隨機出現的1位元隨機數序列,標誌信號中的相鄰兩個值的變化間隔為1分鐘。即標誌信號的變化可能是:在第一分鐘內標誌信號的值為第一值,在第二分鐘內標誌信號的值為第二值,在第三分鐘內標誌信號的值為第二值,在第四分鐘內標誌信號的值為第一值,等等。這個隨機數序列的占空比約為50%,即標誌信號在高速緩衝記憶體的整個壽命週期中有50%的時間為第一值。For example, in some embodiments, the flag signal is a 1-bit random number sequence in which the first value and the second value appear randomly, and the change interval between two adjacent values in the flag signal is 1 minute. That is, the change of the flag signal may be: the value of the flag signal is the first value in the first minute, the value of the flag signal is the second value in the second minute, and the value of the flag signal is the second value in the third minute. In the fourth minute the value of the flag signal is the first value, and so on. The duty cycle of this random number sequence is about 50%, that is, the flag signal has the first value 50% of the time during the entire life cycle of the cache memory.

例如,由於輸入控制信號和標誌信號相同,即輸入控制信號的不同值也可以包括第一值和第二值,在整體上,即在高速緩衝記憶體的整個壽命週期中,輸入控制信號的第一值和第二值的比例在預定範圍內。輸入控制信號生成器300可以每一分鐘隨機輸出輸入控制信號的一個值,也就是說,在第一分鐘內,輸入控制信號生成器300可以輸出第一值,此時,輸入控制信號的值為第一值,在第二分鐘內,輸入控制信號生成器300可以輸出第二值,此時,輸入控制信號的值為第二值,在第三分鐘內,輸入控制信號生成器300可以輸出第二值,在第四分鐘內,輸入控制信號生成器300可以輸出第一值,等等。例如,在一個月的時間段內,輸入控制信號的第一值和第二值的比例在預定範圍內。For example, since the input control signal and the flag signal are the same, that is, different values of the input control signal may also include a first value and a second value, on the whole, that is, in the entire life cycle of the cache memory, the third value of the input control signal The ratio of the first value to the second value is within a predetermined range. The input control signal generator 300 can randomly output a value of the input control signal every minute. That is to say, in the first minute, the input control signal generator 300 can output a first value. At this time, the value of the input control signal is The first value, within the second minute, the input control signal generator 300 can output the second value, at this time, the value of the input control signal is the second value, within the third minute, the input control signal generator 300 can output the second value. Two values, in the fourth minute, the input control signal generator 300 can output the first value, and so on. For example, within a period of one month, the ratio of the first value and the second value of the input control signal is within a predetermined range.

需要說明的是,本公開對於在各個時間段內輸入控制信號生成器300生成的輸入控制信號的具體值不作限制,例如,輸入控制信號生成器300可以在第一分鐘至第十分鐘(或第一分鐘至第六十分鐘等)內輸出第一值,即此時輸入控制信號的值為第一值,輸入控制信號生成器300可以在第十一分鐘至第二十五分鐘(或第六十分鐘至第八十五分鐘等)內輸出第二值,即此時輸入控制信號的值為第二值,等等。輸入控制信號生成器300隨機生成第一值或第二值,只要保證在整體上(在高速緩衝記憶體的壽命週期中),輸入控制信號的第一值和第二值的比例在預定範圍內即可。It should be noted that the present disclosure does not limit the specific value of the input control signal generated by the input control signal generator 300 in each time period. For example, the input control signal generator 300 can generate the input control signal between the first minute and the tenth minute (or the tenth minute). The first value is output from one minute to sixty minutes, etc.), that is, the value of the input control signal at this time is the first value. The input control signal generator 300 can output the first value from the eleventh minute to the twenty-fifth minute (or the sixth minute). The second value is output within ten minutes to eighty-five minutes, etc.), that is, the value of the input control signal at this time is the second value, and so on. The input control signal generator 300 randomly generates the first value or the second value, as long as it is ensured that overall (during the life cycle of the cache memory), the ratio of the first value and the second value of the input control signal is within a predetermined range. That’s it.

例如,輸入控制信號可以直接使用晶片中的隨機數產生單元生成,即輸入控制信號生成器300可以為晶片中的隨機數產生單元。For example, the input control signal can be directly generated using a random number generation unit in the chip, that is, the input control signal generator 300 can be a random number generation unit in the chip.

例如,標誌信號的值為第一值表示第一資料處理為反相處理;標誌信號的值為第二值表示第一資料處理為保持處理,反相處理的處理過程和保持處理的處理過程不相同。也就是說,在輸入控制信號的值為第一值時,第一資料處理為反相處理,在輸入控制信號的值為第二值時,第一資料處理為保持處理,此時,輸入控制電路100在執行基於輸入控制信號,對n個輸入資料進行第一資料處理,以得到與n個輸入資料一一對應的n個中間資料的步驟時,執行以下步驟:響應於輸入控制信號的值為第一值,對n個輸入資料進行反相處理,以得到n個中間資料;響應於輸入控制信號的值為第二值,對n個輸入資料進行保持處理,以得到n個中間資料,即直接將n個輸入資料作為n個中間資料。For example, if the value of the flag signal is the first value, it means that the first data processing is inversion processing; if the value of the flag signal is the second value, it means that the first data processing is maintenance processing. The processing process of the inversion processing and the processing process of the maintenance processing are different. same. That is to say, when the value of the input control signal is the first value, the first data processing is inversion processing; when the value of the input control signal is the second value, the first data processing is the holding process. At this time, the input control signal When the circuit 100 performs the first data processing on n input data based on the input control signal to obtain n intermediate data corresponding to the n input data, the circuit 100 performs the following steps: responding to the value of the input control signal is the first value, the n input data are inverted to obtain n intermediate data; in response to the value of the input control signal being the second value, the n input data are maintained and processed to obtain n intermediate data, That is, n input data are directly used as n intermediate data.

例如,在本公開的實施例中,對輸入資料進行反相處理得到的中間資料與該輸入資料不相同,而對輸入資料進行保持處理得到的中間資料與該輸入資料相同。以輸入資料為二進制資料為例,反相處理表示:若輸入資料為1,則對該輸入資料進行反相處理之後得到的中間資料為0,若輸入資料為0,則對該輸入資料進行反相處理之後得到的中間資料為1;保持處理表示:若輸入資料為1,則對該輸入資料進行保持處理之後得到的中間資料為1,若輸入資料為0,則對該輸入資料進行保持處理之後得到的中間資料為0。For example, in embodiments of the present disclosure, the intermediate data obtained by inverting the input data is different from the input data, and the intermediate data obtained by maintaining the input data is the same as the input data. Taking the input data as binary data as an example, inversion processing means: if the input data is 1, then the intermediate data obtained after inverting the input data is 0; if the input data is 0, then the input data is inverted. The intermediate data obtained after phase processing is 1; the retention processing means: if the input data is 1, then the intermediate data obtained after the retention processing of the input data is 1; if the input data is 0, the input data is retained. The intermediate data obtained after that is 0.

需要說明的是,本公開不限於上面描述的情況,在一些實施例中,標誌信號的值為第一值表示第一資料處理為基於第一映射表的映射處理;標誌信號的值為第二值表示第一資料處理為基於第二映射表的映射處理,基於第一映射表的映射處理的處理過程和基於第二映射表的映射處理的處理過程不相同。例如,在一些實施例中,輸入資料可以為2位的二進制數,基於第一映射表的映射處理表示:將資料00映射為資料11,將資料01映射為資料10,將資料10映射為資料01,將資料11映射為資料00;基於第二映射表的映射處理表示:將資料00映射為資料00,將資料01映射為資料01,將資料10映射為資料10,將資料11映射為資料11。此時,當輸入資料為00時,對輸入資料進行基於第一映射表的映射處理之後得到的中間資料為11,而對輸入資料進行基於第二映射表的映射處理之後得到的中間資料為00。It should be noted that the present disclosure is not limited to the situation described above. In some embodiments, the value of the flag signal is the first value, indicating that the first data processing is mapping processing based on the first mapping table; the value of the flag signal is the second value. The value indicates that the first data processing is mapping processing based on the second mapping table, and the processing process of the mapping processing based on the first mapping table is different from the processing process of the mapping processing based on the second mapping table. For example, in some embodiments, the input data may be a 2-digit binary number, and the mapping process based on the first mapping table means: map data 00 to data 11, map data 01 to data 10, map data 10 to data 01, map data 11 to data 00; the mapping processing based on the second mapping table means: map data 00 to data 00, map data 01 to data 01, map data 10 to data 10, map data 11 to data 11. At this time, when the input data is 00, the intermediate data obtained after mapping the input data based on the first mapping table is 11, and the intermediate data obtained after mapping the input data based on the second mapping table is 00 .

此外,除了第一值和第二值之外,標誌信號的不同值還可以包括第三值等,本公開的實施例對不同值的數量不作具體限制。例如,標誌信號的值為第三值表示第一資料處理為基於第三映射表的映射處理;基於第三映射表的映射處理的處理過程不同於基於第一映射表的映射處理的處理過程和基於第二映射表的映射處理的處理過程。In addition, in addition to the first value and the second value, the different values of the flag signal may also include a third value, etc., and the embodiments of the present disclosure do not specifically limit the number of different values. For example, the value of the flag signal is the third value, indicating that the first data processing is mapping processing based on the third mapping table; the processing process of the mapping processing based on the third mapping table is different from the processing process of the mapping processing based on the first mapping table. Processing process of mapping processing based on the second mapping table.

例如,如圖1B所示,儲存電路10還包括輸出控制電路400。輸出控制電路400被配置為:從記憶體200中讀取n個中間資料和標誌信號;基於標誌信號,對n個中間資料進行第二資料處理,以得到與n個中間資料一一對應的n個輸出資料;輸出該n個輸出資料。For example, as shown in FIG. 1B , the storage circuit 10 further includes an output control circuit 400 . The output control circuit 400 is configured to: read n intermediate data and flag signals from the memory 200; based on the flag signal, perform second data processing on the n intermediate data to obtain n corresponding to the n intermediate data one-to-one. output data; output the n output data.

例如,標誌信號的值為第一值表示第二資料處理為反相處理;標誌信號的值為第二值表示第二資料處理為保持處理。此時,輸出控制電路400執行基於標誌信號,對n個中間資料進行第二資料處理,以得到與n個中間資料一一對應的n個輸出資料的步驟時,執行以下步驟:響應於標誌信號的值為第一值,對n個中間資料進行反相處理,以得到n個輸出資料;響應於標誌信號的值為第二值,對n個中間資料進行保持處理,以得到n個輸出資料,即直接將n個中間資料作為n個輸出資料。For example, if the value of the flag signal is a first value, it means that the second data processing is an inversion process; if the value of the flag signal is a second value, it means that the second data processing is a holding process. At this time, when the output control circuit 400 performs the second data processing on the n intermediate data based on the flag signal to obtain n output data corresponding to the n intermediate data, the following steps are performed: In response to the flag signal The value of is the first value, and the n intermediate data are inverted to obtain n output data; the value in response to the flag signal is the second value, and the n intermediate data are maintained and processed to obtain n output data. , that is, directly use n intermediate data as n output data.

例如,n個輸入資料和n個輸出資料相同,從而保證輸出的資料和儲存到該記憶體中的輸入資料相同。例如,若n為10,且n個輸入資料為0110001010,則n個輸出資料也為0110001010。For example, n input data and n output data are the same, thereby ensuring that the output data is the same as the input data stored in the memory. For example, if n is 10, and n input data are 0110001010, then n output data are also 0110001010.

圖2為本公開一些實施例提供的一種儲存電路的結構示意圖。FIG. 2 is a schematic structural diagram of a storage circuit provided by some embodiments of the present disclosure.

例如,如圖2所示,輸入控制電路100包括與n個輸入資料一一對應的n個輸入子電路101。記憶體200還包括寫入資料介面和輸出資料介面,寫入資料介面包括與n個輸入子電路一一對應的n個寫入資料位201,例如,圖2中的每個黑色矩形塊表示一個寫入資料位201。For example, as shown in FIG. 2 , the input control circuit 100 includes n input sub-circuits 101 corresponding to n input data one-to-one. The memory 200 also includes a write data interface and an output data interface. The write data interface includes n write data bits 201 corresponding to n input sub-circuits. For example, each black rectangular block in Figure 2 represents a Write data bit 201.

例如,每個輸入子電路101的第一輸入端接收對應的一個輸入資料Is,每個輸入子電路101的第二輸入端接收輸入控制信號Cs,每個輸入子電路101的輸出端連接至寫入資料介面中的對應的寫入資料位201,每個輸入子電路101被配置為基於輸入控制信號Cs,對輸入資料Is進行第一資料處理,以得到與輸入資料Is對應的中間資料Ms,將中間資料寫入該寫入資料位201。例如,在圖2所示的示例中,輸入控制信號Cs直接被輸出至記憶體200以作為與輸入資料對應的標誌信號。For example, the first input terminal of each input sub-circuit 101 receives a corresponding input data Is, the second input terminal of each input sub-circuit 101 receives the input control signal Cs, and the output terminal of each input sub-circuit 101 is connected to the write The corresponding write data bit 201 in the input data interface, each input sub-circuit 101 is configured to perform first data processing on the input data Is based on the input control signal Cs, to obtain the intermediate data Ms corresponding to the input data Is, Intermediate data is written into the write data bit 201. For example, in the example shown in FIG. 2 , the input control signal Cs is directly output to the memory 200 as a flag signal corresponding to the input data.

例如,如圖2所示,輸出控制電路400包括與n個中間資料一一對應的n個輸出子電路401,輸出資料介面包括與n個輸出子電路401一一對應的n個輸出資料位202,例如,圖2中的每個具有斜線陰影的矩形塊表示一個輸出資料位202。For example, as shown in Figure 2, the output control circuit 400 includes n output sub-circuits 401 that correspond to n intermediate data in a one-to-one manner, and the output data interface includes n output data bits 202 that correspond to the n output sub-circuits 401 in a one-to-one manner. For example, each rectangular block with diagonal hatching in Figure 2 represents an output data bit 202.

例如,每個輸出子電路401的第一輸入端連接至輸出資料介面中的對應的輸出資料位202以接收對應的一個中間資料Ms,每個輸出子電路401的第二輸入端接收標誌信號Ss,每個輸出子電路401的輸出端用於輸出與中間資料Ms對應的輸出資料Os,每個輸出子電路401被配置為基於標誌信號Ss,對中間資料Ms進行第二資料處理,以得到與中間資料Ms對應的輸出資料Os,並輸出該輸出資料Os。For example, the first input terminal of each output sub-circuit 401 is connected to the corresponding output data bit 202 in the output data interface to receive a corresponding intermediate data Ms, and the second input terminal of each output sub-circuit 401 receives the flag signal Ss. , the output end of each output sub-circuit 401 is used to output the output data Os corresponding to the intermediate data Ms, and each output sub-circuit 401 is configured to perform second data processing on the intermediate data Ms based on the flag signal Ss to obtain the The output data Os corresponding to the intermediate data Ms is output.

需要說明的是,在本公開的實施例中,第一資料處理和第二資料處理可以為任何合適的處理,只要保證高速緩衝記憶體儲存的資料的占空比接近或等於50%即可,本公開對其不作具體限制。上述關於第一資料處理的說明,在不矛盾的情況下也適用於第二資料處理。It should be noted that in the embodiment of the present disclosure, the first data processing and the second data processing can be any suitable processing, as long as the duty cycle of the data stored in the cache memory is ensured to be close to or equal to 50%. This disclosure does not place specific restrictions on it. The above description regarding the processing of the first data also applies to the processing of the second data unless there is any contradiction.

例如,每個輸入子電路101包括一個互斥或閘,該互斥或閘包括兩個輸入端和一個輸出端,此時,若輸入控制信號的值為第一值,即1,則當輸入資料為1時,輸入子電路101輸出的與該輸入資料對應的中間資料為0;當輸入資料為0時,輸入子電路101輸出的與該輸入資料對應的中間資料為1,由此實現對輸入資料進行反相處理;若輸入控制信號的值為第二值,即0,則當輸入資料為1時,輸入子電路101輸出的與該輸入資料對應的中間資料為1;當輸入資料為0時,輸入子電路101輸出的與該輸入資料對應的中間資料為0,由此,實現對輸入資料進行保持處理。For example, each input subcircuit 101 includes a mutually exclusive OR gate, which includes two input terminals and one output terminal. At this time, if the value of the input control signal is a first value, that is, 1, then when the input When the data is 1, the intermediate data corresponding to the input data output by the input sub-circuit 101 is 0; when the input data is 0, the intermediate data corresponding to the input data output by the input sub-circuit 101 is 1, thereby realizing the The input data is inverted; if the value of the input control signal is the second value, that is, 0, then when the input data is 1, the intermediate data corresponding to the input data output by the input sub-circuit 101 is 1; when the input data is When 0, the intermediate data corresponding to the input data output by the input sub-circuit 101 is 0, thereby realizing the holding process of the input data.

例如,每個輸出子電路401包括一個互斥或閘,該互斥或閘包括兩個輸入端和一個輸出端,此時,若標誌信號的值為第一值,即1,則當中間資料為1時,輸出子電路401輸出的與該中間資料對應的輸出資料為0;當中間資料為0時,輸出子電路401輸出的與該中間資料對應的輸出資料為1,由此實現對中間資料進行反相處理;若標誌信號的值為第二值,即0,則當中間資料為1時,輸出子電路401輸出的與該中間資料對應的輸出資料為1;當中間資料為0時,輸出子電路401輸出的與該中間資料對應的輸出資料為0,由此,實現對輸入資料進行保持處理。For example, each output subcircuit 401 includes a mutually exclusive OR gate, which includes two input terminals and one output terminal. At this time, if the value of the flag signal is the first value, that is, 1, then when the intermediate data When is 1, the output data corresponding to the intermediate data output by the output sub-circuit 401 is 0; when the intermediate data is 0, the output data corresponding to the intermediate data output by the output sub-circuit 401 is 1, thereby realizing the intermediate data The data is inverted; if the value of the flag signal is the second value, that is, 0, then when the intermediate data is 1, the output data corresponding to the intermediate data output by the output sub-circuit 401 is 1; when the intermediate data is 0 , the output data corresponding to the intermediate data output by the output sub-circuit 401 is 0, thereby realizing the holding process of the input data.

需要說明的是,本公開不限於此,輸入子電路101也可以實現為同或閘等,此時,輸入控制信號的第一值為0,輸入控制信號的第二值為1;輸出子電路401也可以實現為同或閘,此時,標誌信號的第一值為0,標誌信號的第二值為1。輸入子電路101和/或輸出子電路401還可以實現為其他電路結構,只要能夠實現上述功能即可。It should be noted that the present disclosure is not limited to this. The input sub-circuit 101 can also be implemented as an exclusive OR gate, etc. In this case, the first value of the input control signal is 0, and the second value of the input control signal is 1; the output sub-circuit 401 can also be implemented as an exclusive OR gate. In this case, the first value of the flag signal is 0 and the second value of the flag signal is 1. The input subcircuit 101 and/or the output subcircuit 401 can also be implemented as other circuit structures, as long as the above functions can be achieved.

例如,記憶體200可以為高速緩衝記憶體,如圖2所示,高速緩衝記憶體包括多個資料靜態記憶體210和多個標誌靜態記憶體220。n個中間資料Ms分別被儲存在多個資料靜態記憶體210中對應的n個資料靜態記憶體210,標誌信號Ss被儲存在多個標誌靜態記憶體220中對應的一個標誌靜態記憶體220。For example, the memory 200 may be a cache memory. As shown in FIG. 2 , the cache memory includes a plurality of data static memories 210 and a plurality of flag static memories 220 . The n intermediate data Ms are respectively stored in corresponding n data static memories 210 among the plurality of data static memories 210 , and the flag signal Ss is stored in a corresponding flag static memory 220 among the plurality of flag static memories 220 .

例如,輸入控制電路100執行將n個中間資料和標誌信號寫入記憶體200的步驟時,包括執行以下操作:獲取與n個輸入資料對應的第一寫位址和與標誌信號對應的第二寫位址;基於第一寫位址,確定n個資料靜態記憶體;基於第二寫位址,確定標誌靜態記憶體;將n個中間資料一一對應寫入n個資料靜態記憶體,以及將標誌信號寫入標誌靜態記憶體。For example, when the input control circuit 100 performs the step of writing n pieces of intermediate data and the flag signal into the memory 200, it includes performing the following operations: acquiring the first writing address corresponding to the n pieces of input data and the second writing address corresponding to the flag signal. write address; determine n data static memories based on the first write address; determine flag static memories based on the second write address; write n intermediate data into n data static memories in one-to-one correspondence, and Write the flag signal to the flag static memory.

例如,輸出控制電路400執行讀取n個中間資料和標誌信號的步驟時,包括執行以下操作:獲取與n個中間資料對應的第一讀位址和與標誌信號對應的第二讀位址;基於第一讀位址,確定儲存n個中間資料的n個資料靜態記憶體;基於第二讀位址,確定儲存標誌信號的標誌靜態記憶體;從n個資料靜態記憶體中讀取n個中間資料,以及從標誌靜態記憶體中讀取標誌信號。For example, when the output control circuit 400 performs the step of reading n intermediate data and the flag signal, it includes performing the following operations: obtaining the first read address corresponding to the n intermediate data and the second read address corresponding to the flag signal; Based on the first read address, determine n data static memories that store n intermediate data; based on the second read address, determine the flag static memory that stores the flag signal; read n data static memories from the n data static memories Intermediate data, and read the flag signal from the flag static memory.

例如,第一讀位址和第一寫位址相同,第二讀位址和第二寫位址相同。For example, the first read address and the first write address are the same, and the second read address and the second write address are the same.

例如,多個資料靜態記憶體210和多個標誌靜態記憶體220構成多個靜態記憶體行,n個資料靜態記憶體和標誌靜態記憶體位於同一靜態記憶體行。例如,在一些實施例中,n個資料靜態記憶體和標誌靜態記憶體可以構成一個靜態記憶體行,此時,每個靜態記憶體行中的靜態記憶體的數量為n+1,每個靜態記憶體行用於儲存n個中間資料和一個標誌信號;在另一些實施例中,n個資料靜態記憶體和標誌靜態記憶體可以為一個靜態記憶體行中的部分靜態記憶體,例如,每個靜態記憶體行可以包括(2n+2)個靜態記憶體,此時,每個靜態記憶體行包括2n個資料靜態記憶體和2個標誌靜態記憶體。本公開對於記憶體200中的資料靜態記憶體和標誌靜態記憶體的數量和排布方式不作限定。For example, multiple data static memories 210 and multiple flag static memories 220 constitute multiple static memory rows, and n data static memories and flag static memories are located in the same static memory row. For example, in some embodiments, n data static memories and flag static memories may constitute a static memory row. At this time, the number of static memories in each static memory row is n+1, and each The static memory row is used to store n intermediate data and a flag signal; in other embodiments, the n data static memories and flag static memories can be part of the static memory in a static memory row, for example, Each static memory row can include (2n+2) static memories. At this time, each static memory row includes 2n data static memories and 2 flag static memories. This disclosure does not limit the number and arrangement of data static memories and flag static memories in the memory 200 .

例如,每個靜態記憶體行中的資料靜態記憶體的數量和標誌靜態記憶體的數量由硬體決定,例如,在一些實施例中,靜態記憶體行包括64個資料靜態記憶體和2個標誌靜態記憶體,32個輸入資料可以被同時寫入第1至第32個資料靜態記憶體,則該第1至第32個資料靜態記憶體中儲存的資料對應一個標誌信號,該標誌信號被儲存在該靜態記憶體行中的2個標誌靜態記憶體中的一個標誌靜態記憶體;另外32個輸入資料被同時寫入第33至第64個資料靜態記憶體,則該第33至第64個資料靜態記憶體中儲存的資料對應一個標誌信號,該標誌信號被儲存在該靜態記憶體行中的2個標誌靜態記憶體中的另一個標誌靜態記憶體。For example, the number of data static memories and the number of flag static memories in each static memory row are determined by the hardware. For example, in some embodiments, the static memory row includes 64 data static memories and 2 Flag static memory, 32 input data can be written into the 1st to 32nd data static memory at the same time, then the data stored in the 1st to 32nd data static memory corresponds to a flag signal, and the flag signal is One of the two flag static memories stored in the static memory row; the other 32 input data are simultaneously written into the 33rd to 64th data static memories, then the 33rd to 64th data static memories The data stored in each data static memory corresponds to a flag signal, and the flag signal is stored in the other of the two flag static memories in the static memory row.

例如,如圖2所示,儲存電路10還包括外部寫入資料介面500和外部讀取資料介面550,外部寫入資料介面500被配置為輸出n個輸入資料Is至輸入控制電路100,外部讀取資料介面550被配置為接收從輸出控制電路400輸出的n個輸出資料Os。For example, as shown in Figure 2, the storage circuit 10 also includes an external data writing interface 500 and an external reading data interface 550. The external writing data interface 500 is configured to output n input data Is to the input control circuit 100. The external reading data interface 500 is configured to output n input data Is to the input control circuit 100. The data acquisition interface 550 is configured to receive n pieces of output data Os output from the output control circuit 400 .

現有的高速緩衝記憶體中,每一靜態記憶體行僅包括多個靜態記憶體以用於儲存輸入的資料,相對於現有的高速緩衝記憶體,本公開實施例提供的高速緩衝記憶體的每一靜態記憶體行可以包括多個靜態記憶體(即資料靜態記憶體)以用於儲存輸入的資料,還包括至少一個靜態記憶體(即標誌靜態記憶體)以用於儲存與輸入的資料對應的標誌信號。In the existing cache memory, each static memory row only includes a plurality of static memories for storing input data. Compared with the existing cache memory, each static memory row provided by the embodiment of the present disclosure has A static memory row may include a plurality of static memories (i.e., data static memory) for storing input data, and at least one static memory (i.e., flag static memory) for storing data corresponding to the input. sign signal.

例如,假設高速緩衝記憶體的每一靜態記憶體行包括有n個靜態記憶體,即能儲存n位資料,即n個輸入資料,外部同時寫入高速緩衝記憶體的資料或者高速緩衝記憶體同時輸出的資料也是n位,那麼,輸入控制電路100包括n個具有兩個輸入端的互斥或閘,輸出控制電路400也包括n個具有兩個輸入端的互斥或閘。For example, assume that each static memory line of the cache memory includes n static memories, that is, it can store n bits of data, that is, n input data, and the external data written to the cache memory at the same time or the cache memory At the same time, the output data is also n bits, so the input control circuit 100 includes n mutually exclusive OR gates with two input terminals, and the output control circuit 400 also includes n mutually exclusive OR gates with two input terminals.

在輸入控制電路100中,每個互斥或閘的第一輸入端與外部寫入資料介面500對應的位連接,每個互斥或閘的輸出端與高速緩衝記憶體的寫入資料介面中對應的寫入資料位201連接,即第i個互斥或閘的第一輸入端與外部寫入資料介面500的第i位連接,第i個互斥或閘的輸出端與高速緩衝記憶體中的寫入資料介面的第i個寫入資料位201連接,所有互斥或閘的第二輸入端接收輸入控制信號。當輸入控制信號的值為第一值時,輸入資料被反相之後再寫入高速緩衝記憶體,例如,若輸入資料為1(高準位),則通過互斥或閘之後,實際輸入到高速緩衝記憶體的中間資料為0(低準位);當輸入控制信號的值為第二值時,輸入資料保持原樣被寫入高速緩衝記憶體,例如,若輸入資料為1(高準位),則通過互斥或閘之後,實際輸入到高速緩衝記憶體的中間資料為1(高準位)。In the input control circuit 100, the first input end of each exclusive OR gate is connected to the corresponding bit of the external write data interface 500, and the output end of each exclusive OR gate is connected to the write data interface of the cache memory. The corresponding write data bit 201 is connected, that is, the first input end of the i-th mutex OR gate is connected to the i-th bit of the external write data interface 500, and the output end of the i-th mutex OR gate is connected to the cache memory. The i-th write data bit 201 of the write data interface is connected, and the second input terminals of all mutually exclusive OR gates receive input control signals. When the value of the input control signal is the first value, the input data is inverted and then written into the cache memory. For example, if the input data is 1 (high level), then after passing the mutual exclusion OR gate, the input data is actually input to the cache memory. The intermediate data in the cache memory is 0 (low level); when the value of the input control signal is the second value, the input data remains unchanged and is written into the cache memory. For example, if the input data is 1 (high level) ), then after passing the mutex or gate, the intermediate data actually input to the cache memory is 1 (high level).

例如,在輸出控制電路400中,每個互斥或閘的第一輸入端與高速緩衝記憶體的輸出資料介面中對應的輸出資料位202連接,每個互斥或閘的輸出端與外部讀取資料介面550中對應的位連接,每個互斥或閘的第二輸入端用於接收高速緩衝記憶體輸出的標誌信號(例如,標誌信號也可以通過一個輸出資料位202輸出至輸出控制電路400),即第i個互斥或閘的輸出端與外部讀取資料介面550中的第i位連接,第i個互斥或閘的第一輸入端與高速緩衝記憶體的第i個輸出資料位202連接,所有互斥或閘的第二輸入端接收標誌信號。For example, in the output control circuit 400, the first input end of each exclusive OR gate is connected to the corresponding output data bit 202 in the output data interface of the cache memory, and the output end of each exclusive OR gate is connected to the external read Connecting the corresponding bits in the data interface 550, the second input terminal of each exclusive OR gate is used to receive the flag signal output by the cache memory (for example, the flag signal can also be output to the output control circuit through an output data bit 202 400), that is, the output terminal of the i-th mutually exclusive OR gate is connected to the i-th bit in the external data reading interface 550, and the first input terminal of the i-th mutually exclusive OR gate is connected to the i-th output of the cache memory. Data bit 202 is connected, and the second input terminal of all exclusive OR gates receives the flag signal.

例如,在本公開實施例提供的高速緩衝記憶體中,增加用於儲存標誌信號的靜態記憶體,以記錄該標誌信號對應的資料是否被反相。例如,原有高速緩衝記憶體中的每個靜態記憶體行包括n個靜態記憶體,增加用於儲存標誌信號的靜態記憶體後,每個靜態記憶體行包括n+1個靜態記憶體。當標誌信號的值為第一值時,表示標誌信號對應的資料都被反相保存;當標誌信號的值為第二值時,則表示標誌信號對應的資料都保持原有狀態。For example, in the cache memory provided by the embodiment of the present disclosure, a static memory for storing a flag signal is added to record whether the data corresponding to the flag signal is inverted. For example, each static memory line in the original cache memory includes n static memories. After adding the static memory for storing flag signals, each static memory line includes n+1 static memories. When the value of the flag signal is the first value, it means that the data corresponding to the flag signal are all inverted and saved; when the value of the flag signal is the second value, it means that the data corresponding to the flag signal remain in their original state.

由此,在本公開的實施例中,根據輸入控制信號的值的不同,從外部寫入資料介面500寫入到高速緩衝記憶體中的資料被反相或者保持原樣,保存在高速緩衝記憶體的對應資料靜態記憶體中,同時該資料對應的標誌信號保存在標誌靜態記憶體中,標誌信號用來指示該儲存在高速緩衝記憶體中的資料是否被反相。在從高速緩衝記憶體讀出儲存的資料時,根據待讀出的資料對應的標誌信號,若是待讀出的資料被反相,就將資料再次反相後輸出給外部讀取資料介面550;若待讀出的資料未被反相,就將資料直接輸出給外部讀取資料介面550。Therefore, in the embodiment of the present disclosure, depending on the value of the input control signal, the data written into the cache memory from the external data writing interface 500 is inverted or remains unchanged and stored in the cache memory. The corresponding data is stored in the static memory, and the flag signal corresponding to the data is stored in the flag static memory. The flag signal is used to indicate whether the data stored in the cache memory is inverted. When reading stored data from the cache memory, according to the flag signal corresponding to the data to be read, if the data to be read is inverted, the data is inverted again and output to the external data reading interface 550; If the data to be read is not inverted, the data is directly output to the external data reading interface 550.

假設在未對高速緩衝記憶體進行抗老化處理之前,在高速緩衝記憶體的壽命週期內,高速緩衝記憶體中的某一個靜態記憶體儲存資料的占空比為x,基於本公開實施例提供的儲存電路,由於標誌信號是一個占空比為50%的隨機數序列,從而高速緩衝記憶體中的該靜態記憶體的占空比被調節為50%*x+50%*(1-x)=50%,由此實現了高速緩衝記憶體中的每一個靜態記憶體保存資料的占空比達到50%的目標,降低了老化對於高速緩衝記憶體的影響,延長了高速緩衝記憶體的使用壽命。Assume that before anti-aging processing is performed on the cache memory, during the life cycle of the cache memory, the duty cycle of a certain static memory in the cache memory to store data is x. Based on the embodiments of the present disclosure, it is provided Storage circuit, since the flag signal is a random number sequence with a duty cycle of 50%, the duty cycle of the static memory in the cache memory is adjusted to 50%*x+50%* (1-x ) = 50%, thereby achieving the goal of having a duty cycle of 50% for each static memory in the cache memory, reducing the impact of aging on the cache memory and extending the life of the cache memory. service life.

在本公開的實施例中,對於二進制資料,「占空比」表示在單位時間內該靜態記憶體儲存資料1的時間和單位時間的比值。占空比通常小於1。「單位時間」根據實際需求設置,可以為1天、兩天、一個月、一年、靜態記憶體的壽命週期等。In the embodiment of the present disclosure, for binary data, "duty cycle" represents the ratio of the time the static memory stores data 1 to the unit time within the unit time. The duty cycle is usually less than 1. "Unit time" is set according to actual needs, and can be one day, two days, one month, one year, the life cycle of static memory, etc.

在本公開的實施例提供的儲存電路中,僅需對高速緩衝記憶體增加額外的靜態記憶體用來記錄標誌信號,相比使用多位糾錯碼對出現錯誤的位進行校驗糾錯(糾正一位錯誤資料需要七位糾錯碼)而言,減少糾錯碼的使用,大大降低了設計開銷;同時不會影響高速緩衝記憶體的緩存一致性,外部介面無需做任何改變,直接對高速緩衝記憶體進行讀寫即可,兼容性較好。In the storage circuit provided by the embodiment of the present disclosure, only additional static memory is added to the cache memory to record the flag signal. Compared with using a multi-bit error correction code to verify and correct the erroneous bits ( In terms of correcting one bit of erroneous data (a seven-bit error correction code is required), this reduces the use of error correction codes and greatly reduces design overhead; at the same time, it does not affect the cache consistency of the cache memory, and the external interface does not need to make any changes. The high-speed buffer memory can be read and written, and the compatibility is good.

需要說明的是,在本公開中,儲存電路10中的輸入控制電路100、記憶體200、輸入控制信號生成器300、輸出控制電路400等可以採用硬體電路實現,例如,硬體電路可以包括電阻、電容、二極體、三極管等元件。It should be noted that in the present disclosure, the input control circuit 100, the memory 200, the input control signal generator 300, the output control circuit 400, etc. in the storage circuit 10 can be implemented using hardware circuits. For example, the hardware circuits can include Resistors, capacitors, diodes, transistors and other components.

圖3為本公開至少一實施例提供的一種晶片的示意圖。FIG. 3 is a schematic diagram of a wafer provided by at least one embodiment of the present disclosure.

如圖3所示,本公開一些實施例還提供一種晶片20,該晶片20為積體電路,晶片20包括上述任一實施例所述的儲存電路10。As shown in FIG. 3 , some embodiments of the present disclosure also provide a wafer 20 , which is an integrated circuit. The wafer 20 includes the storage circuit 10 described in any of the above embodiments.

例如,在一些實施例中,晶片20還包括基底,儲存電路10設置在基底上。例如,基底可以為半導體晶圓。For example, in some embodiments, the wafer 20 further includes a substrate on which the storage circuit 10 is disposed. For example, the substrate may be a semiconductor wafer.

例如,晶片20可以整合在中央處理器內部或主板上。For example, the chip 20 can be integrated inside a central processing unit or on a motherboard.

關於晶片20可以實現的技術效果可以參考上述儲存電路的實施例中的相關描述,重複之處不再贅述。Regarding the technical effects that can be achieved by the chip 20 , reference may be made to the relevant descriptions in the above embodiments of the storage circuit, and repeated descriptions will not be repeated.

圖4為本公開至少一實施例提供的一種資料處理方法的流程圖。Figure 4 is a flow chart of a data processing method provided by at least one embodiment of the present disclosure.

例如,本公開提供的資料處理方法可以應用於上述任一實施例所述的儲存電路10。如圖4所示,資料處理方法包括以下步驟S40到步驟S42。For example, the data processing method provided by the present disclosure can be applied to the storage circuit 10 described in any of the above embodiments. As shown in Figure 4, the data processing method includes the following steps S40 to S42.

步驟S40:接收n個輸入資料和輸入控制信號。Step S40: Receive n input data and input control signals.

步驟S41:基於輸入控制信號,對n個輸入資料進行第一資料處理,以得到與n個輸入資料一一對應的n個中間資料。Step S41: Based on the input control signal, perform first data processing on the n input data to obtain n intermediate data corresponding to the n input data.

步驟S42:儲存n個中間資料和與n個輸入資料對應的標誌信號。Step S42: Store n intermediate data and flag signals corresponding to n input data.

例如,標誌信號的不同值分別表示第一資料處理的不同處理過程,n為正整數。For example, different values of the flag signal respectively represent different processing processes of the first data processing, and n is a positive integer.

例如,在一些實施例中,資料處理方法還包括:基於輸入控制信號,確定標誌信號。標誌信號的不同值包括第一值和第二值。For example, in some embodiments, the data processing method further includes: determining a flag signal based on the input control signal. Different values of the flag signal include a first value and a second value.

例如,基於輸入控制信號,對n個輸入資料進行第一資料處理,以得到與n個輸入資料一一對應的n個中間資料,包括:響應於基於輸入控制信號確定的標誌信號的值為第一值,將n個輸入資料進行反相以得到n個中間資料;響應於基於輸入控制信號確定的標誌信號的值為第二值,將n個輸入資料作為n個中間資料。For example, based on the input control signal, performing first data processing on n pieces of input data to obtain n pieces of intermediate data that correspond one-to-one to the n pieces of input data includes: responding to the value of the flag signal determined based on the input control signal being the first First value, n input data are inverted to obtain n intermediate data; in response to the value of the flag signal determined based on the input control signal being a second value, n input data are used as n intermediate data.

例如,在一些實施例中,資料處理方法還包括:讀取n個中間資料和標誌信號;基於標誌信號,對n個中間資料進行第二資料處理,以得到與n個中間資料一一對應的n個輸出資料;輸出n個輸出資料。For example, in some embodiments, the data processing method further includes: reading n intermediate data and a flag signal; based on the flag signal, performing second data processing on the n intermediate data to obtain a one-to-one correspondence with the n intermediate data. n output data; output n output data.

例如,在標誌信號的不同值包括第一值和第二值的情況下,基於標誌信號,對n個中間資料進行第二資料處理,以得到與n個中間資料一一對應的n個輸出資料,包括:響應於標誌信號的值為第一值,將n個中間資料進行反相以得到n個輸出資料;響應於標誌信號的值為第二值,將n個中間資料作為n個輸出資料。For example, in the case where different values of the flag signal include a first value and a second value, based on the flag signal, perform second data processing on the n intermediate data to obtain n output data corresponding to the n intermediate data. , including: in response to the value of the flag signal being the first value, inverting n intermediate data to obtain n output data; in response to the value of the flag signal being the second value, using n intermediate data as n output data .

關於資料處理方法可以實現的技術效果可以參考上述儲存電路的實施例中的相關描述,重複之處不再贅述。Regarding the technical effects that can be achieved by the data processing method, please refer to the relevant descriptions in the above embodiments of the storage circuit, and repeated details will not be repeated.

圖5為本公開至少一實施例提供的一種電子設備的示意圖。FIG. 5 is a schematic diagram of an electronic device provided by at least one embodiment of the present disclosure.

如圖5所示,本公開一些實施例還提供一種電子設備5000,該電子設備5000包括處理裝置5100,處理裝置5100包括上述任一實施例所述的儲存電路10。As shown in Figure 5, some embodiments of the present disclosure also provide an electronic device 5000. The electronic device 5000 includes a processing device 5100. The processing device 5100 includes the storage circuit 10 described in any of the above embodiments.

例如,處理裝置5100可以為中央處理器(CPU)、圖形處理器(GPU)等。儲存電路10可以整合在中央處理器的內部。處理裝置5100還可以為具有資料處理能力和/或程式執行能力的其它形式的處理單元,例如現場可程式化邏輯閘陣列(FPGA)或張量處理單元(TPU)等;例如,中央處理器可以具有X86或ARM架構等。For example, the processing device 5100 may be a central processing unit (CPU), a graphics processing unit (GPU), or the like. The storage circuit 10 can be integrated inside the central processing unit. The processing device 5100 can also be other forms of processing units with data processing capabilities and/or program execution capabilities, such as field programmable gate arrays (FPGA) or tensor processing units (TPU); for example, a central processing unit can With X86 or ARM architecture etc.

關於電子設備5000可以實現的技術效果可以參考上述儲存電路的實施例中的相關描述,重複之處不再贅述。Regarding the technical effects that can be achieved by the electronic device 5000, reference may be made to the relevant descriptions in the above embodiments of the storage circuit, and repeated descriptions will not be repeated.

下面參考圖6,圖6示出了適於用來實現本公開實施例的電子設備600的結構示意圖。本公開實施例中的電子設備可以包括但不限於諸如行動電話、筆記型電腦、數位廣播接收器、PDA(個人數位助理)、PAD(平板電腦)、PMP(便攜式多媒體播放器)、車載終端(例如車載導航終端)、可穿戴電子設備等等的移動終端以及諸如數位TV、臺式電腦、智能家居設備等等的固定終端。圖6示出的電子設備僅僅是一個示例,不應對本公開實施例的功能和使用範圍帶來任何限制。Referring now to FIG. 6 , FIG. 6 shows a schematic structural diagram of an electronic device 600 suitable for implementing embodiments of the present disclosure. Electronic devices in embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMP (portable multimedia players), vehicle-mounted terminals ( Mobile terminals such as car navigation terminals), wearable electronic devices, and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. The electronic device shown in FIG. 6 is only an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

例如,本公開提供的儲存電路10可以設置在該電子設備600中。For example, the storage circuit 10 provided by the present disclosure can be provided in the electronic device 600 .

如圖6所示,電子設備600可以包括處理裝置(例如中央處理器、圖形處理器等)601,其可以根據儲存在唯讀記憶體(ROM)602中的程式或者從儲存裝置608加載到隨機存取記憶體(RAM)603中的程式而執行各種適當的動作和處理。在RAM 603中,還儲存有電子設備600操作所需的各種程式和資料。處理裝置601、ROM 602以及RAM 603通過匯流排604彼此相連。輸入/輸出(I/O)介面605也連接至匯流排604。As shown in FIG. 6 , the electronic device 600 may include a processing device (such as a central processing unit, a graphics processor, etc.) 601 , which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 602 or from a storage device 608 . Access the program in the memory (RAM) 603 to perform various appropriate actions and processes. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, ROM 602 and RAM 603 are connected to each other through a bus 604. Input/output (I/O) interface 605 is also connected to bus 604 .

通常,以下裝置可以連接至I/O介面605:包括例如觸摸屏、觸摸板、鍵盤、鼠標、攝像頭、麥克風、加速度計、陀螺儀等的輸入裝置606;包括例如液晶顯示器(LCD)、揚聲器、振動器等的輸出裝置607;包括例如磁帶、硬盤等的儲存裝置608;以及通信裝置609。通信裝置609可以允許電子設備600與其他設備進行無線或有線通信以交換資料。雖然圖6示出了具有各種裝置的電子設備600,但是應理解的是,並不要求實施或具備所有示出的裝置。可以替代地實施或具備更多或更少的裝置。Generally, the following devices can be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 607 such as a computer; a storage device 608 including a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although FIG. 6 illustrates electronic device 600 with various means, it should be understood that implementation or availability of all illustrated means is not required. More or fewer means may alternatively be implemented or provided.

特別地,根據本公開的實施例,上文參考流程圖描述的過程可以被實現為電腦軟體程式。例如,本公開的實施例包括一種電腦程式產品,其包括承載在非暫態電腦可讀介質上的電腦程式,該電腦程式包含用於執行流程圖所示的方法的程式代碼,以執行根據上文所述的資料處理方法中的一個或多個步驟。在這樣的實施例中,該電腦程式可以通過通信裝置609從網絡上被下載和安裝,或者從儲存裝置608被安裝,或者從ROM 602被安裝。在該電腦程式被處理裝置601執行時,可以使得處理裝置601執行本公開實施例的資料處理方法中限定的上述功能。In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product that includes a computer program carried on a non-transitory computer-readable medium, the computer program including program code for executing the method illustrated in the flowchart to execute the method according to the above. One or more steps in the data processing method described in this article. In such an embodiment, the computer program may be downloaded and installed from the network via communication device 609, or from storage device 608, or from ROM 602. When the computer program is executed by the processing device 601, it can cause the processing device 601 to perform the above functions defined in the data processing method of the embodiment of the present disclosure.

需要說明的是,在本公開的上下文中,電腦可讀介質可以是有形的介質,其可以包含或儲存以供指令執行系統、裝置或設備使用或與指令執行系統、裝置或設備結合地使用的程式。電腦可讀介質可以是電腦可讀信號介質或者電腦可讀儲存介質或者是上述兩者的任意組合。電腦可讀儲存介質例如可以是,但不限於:電、磁、光、電磁、紅外線、或半導體的系統、裝置或元件,或者任意以上的組合。電腦可讀儲存介質的更具體的例子可以包括但不限於:具有一個或多個導線的電連接、便攜式電腦磁盤、硬盤、隨機存取記憶體(RAM)、唯讀記憶體(ROM)、可擦式可編程唯讀記憶體(EPROM或快閃記憶體)、光纖、便攜式緊湊磁盤唯讀記憶體(CD-ROM)、光記憶體件、磁記憶體件、或者上述的任意合適的組合。在本公開中,電腦可讀儲存介質可以是任何包含或儲存程式的有形介質,該程式可以被指令執行系統、裝置或者元件使用或者與其結合使用。而在本公開中,電腦可讀信號介質可以包括在基帶中或者作為載波一部分傳播的資料信號,其中承載了電腦可讀的程式代碼。這種傳播的資料信號可以採用多種形式,包括但不限於電磁信號、光信號或上述的任意合適的組合。電腦可讀信號介質還可以是電腦可讀儲存介質以外的任何電腦可讀介質,該電腦可讀信號介質可以發送、傳播或者傳輸用於由指令執行系統、裝置或者元件使用或者與其結合使用的程式。電腦可讀介質上包含的程式代碼可以用任何適當的介質傳輸,包括但不限於:電線、光纜、RF(射頻)等等,或者上述介質的任意合適的組合。It should be noted that, in the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or be stored for use by or in conjunction with an instruction execution system, apparatus, or device. program. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but is not limited to: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination of the above. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), Erasable programmable read-only memory (EPROM or flash memory), fiber optics, portable compact disk read-only memory (CD-ROM), optical memory devices, magnetic memory devices, or any suitable combination of the above. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, device, or component. In the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, device, or component . Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.

上述電腦可讀介質可以是上述電子設備中所包含的;也可以是單獨存在,而未裝配入該電子設備中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.

可以以一種或多種程式設計語言或其組合來編寫用於執行本公開的操作的電腦程式代碼,上述程式設計語言包括但不限於面向對象的程式設計語言,諸如Java、Smalltalk、C++,還包括常規的過程式程式設計語言,諸如“C”語言或類似的程式設計語言。程式代碼可以完全地在使用者電腦上執行、部分地在使用者電腦上執行、作為一個獨立的軟體包執行、部分在使用者電腦上部分在遠程電腦上執行、或者完全在遠程電腦或伺服器上執行。在涉及遠程電腦的情形中,遠程電腦可以通過任意種類的網絡(包括局域網(LAN)或廣域網(WAN))連接到使用者電腦,或者,可以連接到外部電腦(例如利用因特網服務提供商來通過因特網連接)。Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages such as Java, Smalltalk, C++, and conventional programming languages, or a combination thereof. A procedural programming language, such as "C" or a similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server execute on. In the case of a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through Internet connection).

附圖中的流程圖和方塊圖,圖示了按照本公開各種實施例的系統、方法和電腦程式產品的可能實現的體系架構、功能和操作。在這點上,流程圖或方塊圖中的每個方框可以代表一個模塊、程式段、或代碼的一部分,該模塊、程式段、或代碼的一部分包含一個或多個用於實現規定的邏輯功能的可執行指令。也應當注意,在有些作為替換的實現中,方框中所標注的功能也可以以不同於附圖中所標注的順序發生。例如,兩個接連地表示的方框實際上可以基本並行地執行,它們有時也可以按相反的順序執行,這依所涉及的功能而定。也要注意的是,方塊圖和/或流程圖中的每個方框、以及方塊圖和/或流程圖中的方框的組合,可以用執行規定的功能或操作的專用的基於硬體的系統來實現,或者可以用專用硬體與電腦指令的組合來實現。The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic for implementing the specified Function executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved. It will also be noted that each block in the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration, can be configured with dedicated hardware-based hardware that performs the specified function or operation. system, or can be implemented using a combination of dedicated hardware and computer instructions.

描述於本公開實施例中所涉及到的單元可以通過軟體的方式實現,也可以通過硬體的方式來實現。其中,單元的名稱在某種情況下並不構成對該單元本身的限定。The units involved in the embodiments of the present disclosure may be implemented in software or hardware. Among them, the name of a unit does not constitute a limitation on the unit itself under certain circumstances.

本文中以上描述的功能可以至少部分地由一個或多個硬體邏輯部件來執行。例如,非限制性地,可以使用的示範類型的硬體邏輯部件包括:現場可程式化邏輯閘陣列(FPGA)、專用積體電路(ASIC)、專用標準產品(ASSP)、片上系統(SOC)、複雜可編程邏輯設備(CPLD)等等。The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate array (FPGA), application specific integrated circuit (ASIC), application specific standard product (ASSP), system on chip (SOC) , Complex Programmable Logic Device (CPLD), etc.

根據本公開的一個或多個實施例,一種儲存電路,包括:輸入控制電路和記憶體。輸入控制電路被配置為:接收n個輸入資料和輸入控制信號;基於輸入控制信號,對n個輸入資料進行第一資料處理,以得到與n個輸入資料一一對應的n個中間資料;將n個中間資料和與n個輸入資料對應的標誌信號寫入記憶體;記憶體被配置為儲存n個中間資料和標誌信號;標誌信號的不同值分別表示第一資料處理的不同處理過程,n為正整數。According to one or more embodiments of the present disclosure, a storage circuit includes: an input control circuit and a memory. The input control circuit is configured to: receive n input data and input control signals; perform first data processing on the n input data based on the input control signal to obtain n intermediate data corresponding to the n input data; n intermediate data and flag signals corresponding to n input data are written into the memory; the memory is configured to store n intermediate data and flag signals; different values of the flag signals respectively represent different processing processes of the first data processing, n is a positive integer.

根據本公開的一個或多個實施例,儲存電路還包括:輸入控制信號生成器,輸入控制信號生成器被配置為生成輸入控制信號,並將輸入控制信號輸出至輸入控制電路。According to one or more embodiments of the present disclosure, the storage circuit further includes: an input control signal generator configured to generate the input control signal and output the input control signal to the input control circuit.

根據本公開的一個或多個實施例,標誌信號與輸入控制信號相同。According to one or more embodiments of the present disclosure, the flag signal is the same as the input control signal.

根據本公開的一個或多個實施例,標誌信號的不同值為隨機產生的值。According to one or more embodiments of the present disclosure, the different values of the flag signal are randomly generated values.

根據本公開的一個或多個實施例,標誌信號的不同值包括第一值和第二值,第一值和第二值的比例在預定範圍內。According to one or more embodiments of the present disclosure, the different values of the flag signal include a first value and a second value, and a ratio of the first value and the second value is within a predetermined range.

根據本公開的一個或多個實施例,標誌信號的值為第一值表示第一資料處理為反相處理;標誌信號的值為第二值表示第一資料處理為保持處理。According to one or more embodiments of the present disclosure, if the value of the flag signal is a first value, it indicates that the first data processing is inversion processing; if the value of the flag signal is a second value, it indicates that the first data processing is a holding process.

根據本公開的一個或多個實施例,預定範圍為2/3~3/2。According to one or more embodiments of the present disclosure, the predetermined range is 2/3~3/2.

根據本公開的一個或多個實施例,儲存電路還包括:輸出控制電路,輸出控制電路被配置為:從記憶體中讀取n個中間資料和標誌信號;基於標誌信號,對n個中間資料進行第二資料處理,以得到與n個中間資料一一對應的n個輸出資料;輸出n個輸出資料。According to one or more embodiments of the present disclosure, the storage circuit further includes: an output control circuit, the output control circuit is configured to: read n intermediate data and flag signals from the memory; based on the flag signal, process the n intermediate data Perform second data processing to obtain n pieces of output data corresponding to n pieces of intermediate data; output n pieces of output data.

根據本公開的一個或多個實施例,標誌信號的不同值包括第一值和第二值,第一值和第二值的比例在預定範圍內,標誌信號的值為第一值表示第二資料處理為反相處理;標誌信號的值為第二值表示第二資料處理為保持處理。According to one or more embodiments of the present disclosure, different values of the flag signal include a first value and a second value, the ratio of the first value and the second value is within a predetermined range, and the value of the flag signal being the first value represents the second value. The data processing is inversion processing; the value of the flag signal being the second value indicates that the second data processing is holding processing.

根據本公開的一個或多個實施例,輸入控制電路包括與n個輸入資料一一對應的n個輸入子電路,記憶體還包括寫入資料介面和輸出資料介面,寫入資料介面包括與n個輸入子電路一一對應的n個寫入資料位,每個輸入子電路的第一輸入端接收對應的一個輸入資料,每個輸入子電路的第二輸入端接收輸入控制信號,每個輸入子電路的輸出端連接至寫入資料介面中的對應的寫入資料位,每個輸入子電路被配置為基於輸入控制信號,對輸入資料進行第一資料處理,以得到與輸入資料對應的中間資料,將中間資料寫入寫入資料位;輸出控制電路包括與n個中間資料一一對應的n個輸出子電路,輸出資料介面包括與n個輸出子電路一一對應的n個輸出資料位,每個輸出子電路的第一輸入端連接至輸出資料介面中的對應的輸出資料位以接收對應的一個中間資料,每個輸出子電路的第二輸入端接收標誌信號,每個輸出子電路的輸出端用於輸出與中間資料對應的輸出資料,每個輸出子電路被配置為基於標誌信號,對中間資料進行第二資料處理,以得到與中間資料對應的輸出資料,並輸出該輸出資料。According to one or more embodiments of the present disclosure, the input control circuit includes n input sub-circuits corresponding to n input data one-to-one. The memory also includes a data writing interface and an output data interface. The data writing interface includes n There are n write data bits in one-to-one correspondence with each input sub-circuit. The first input terminal of each input sub-circuit receives a corresponding input data, and the second input terminal of each input sub-circuit receives an input control signal. Each input The output end of the sub-circuit is connected to the corresponding write data bit in the write data interface. Each input sub-circuit is configured to perform first data processing on the input data based on the input control signal to obtain an intermediate corresponding to the input data. data, write the intermediate data into the write data bit; the output control circuit includes n output sub-circuits that correspond to the n intermediate data one-to-one, and the output data interface includes n output data bits that correspond to the n output sub-circuits one-to-one , the first input terminal of each output sub-circuit is connected to the corresponding output data bit in the output data interface to receive a corresponding intermediate data, the second input terminal of each output sub-circuit receives the flag signal, and each output sub-circuit The output terminal is used to output output data corresponding to the intermediate data, and each output sub-circuit is configured to perform second data processing on the intermediate data based on the flag signal to obtain output data corresponding to the intermediate data, and output the output data .

根據本公開的一個或多個實施例,每個輸入子電路包括一個互斥或閘,每個輸出子電路包括一個互斥或閘。According to one or more embodiments of the present disclosure, each input subcircuit includes an exclusive OR gate, and each output subcircuit includes an exclusive OR gate.

根據本公開的一個或多個實施例,記憶體為高速緩衝記憶體,高速緩衝記憶體包括多個資料靜態記憶體和多個標誌靜態記憶體,n個中間資料分別被儲存在多個資料靜態記憶體中對應的n個資料靜態記憶體,標誌信號被儲存在多個標誌靜態記憶體中對應的一個標誌靜態記憶體。According to one or more embodiments of the present disclosure, the memory is a cache memory. The cache memory includes a plurality of data static memories and a plurality of flag static memories. The n intermediate data are respectively stored in the plurality of data static memories. In the corresponding n data static memories in the memory, the flag signal is stored in a corresponding flag static memory among the plurality of flag static memories.

根據本公開的一個或多個實施例,多個資料靜態記憶體和多個標誌靜態記憶體構成多個靜態記憶體行,n個資料靜態記憶體和標誌靜態記憶體位於同一靜態記憶體行。According to one or more embodiments of the present disclosure, multiple data static memories and multiple flag static memories constitute multiple static memory rows, and n data static memories and flag static memories are located in the same static memory row.

根據本公開的一個或多個實施例,儲存電路還包括外部寫入資料介面,外部寫入資料介面被配置為輸出n個輸入資料至輸入控制電路。According to one or more embodiments of the present disclosure, the storage circuit further includes an external write data interface configured to output n input data to the input control circuit.

根據本公開的一個或多個實施例,儲存電路還包括外部讀取資料介面,外部讀取資料介面被配置為接收從輸出控制電路輸出的n個輸出資料。According to one or more embodiments of the present disclosure, the storage circuit further includes an external data reading interface configured to receive n pieces of output data output from the output control circuit.

根據本公開的一個或多個實施例,一種晶片包括根據上述任一實施例所述的儲存電路。According to one or more embodiments of the present disclosure, a wafer includes the storage circuit according to any of the above embodiments.

根據本公開的一個或多個實施例,一種資料處理方法應用於本公開任一實施例所述的儲存電路,該資料處理方法包括:接收n個輸入資料和輸入控制信號;基於輸入控制信號,對n個輸入資料進行第一資料處理,以得到與n個輸入資料一一對應的n個中間資料;儲存n個中間資料和與n個輸入資料對應的標誌信號,其中,n為正整數。According to one or more embodiments of the present disclosure, a data processing method is applied to the storage circuit according to any embodiment of the present disclosure. The data processing method includes: receiving n input data and input control signals; based on the input control signals, Perform first data processing on the n input data to obtain n intermediate data corresponding to the n input data; store the n intermediate data and the flag signals corresponding to the n input data, where n is a positive integer.

根據本公開的一個或多個實施例,資料處理方法還包括:基於輸入控制信號,確定標誌信號;其中,標誌信號的不同值包括第一值和第二值,基於輸入控制信號,對n個輸入資料進行第一資料處理,以得到與n個輸入資料一一對應的n個中間資料,包括:響應於基於輸入控制信號確定的標誌信號的值為第一值,將n個輸入資料進行反相以得到n個中間資料;響應於基於輸入控制信號確定的標誌信號的值為第二值,將n個輸入資料作為n個中間資料。According to one or more embodiments of the present disclosure, the data processing method further includes: determining a flag signal based on the input control signal; wherein the different values of the flag signal include a first value and a second value, and based on the input control signal, for n The input data is subjected to first data processing to obtain n intermediate data corresponding to the n input data, including: in response to the value of the flag signal determined based on the input control signal being the first value, inverting the n input data. n pieces of intermediate data are obtained; in response to the value of the flag signal determined based on the input control signal being the second value, the n pieces of input data are used as n pieces of intermediate data.

根據本公開的一個或多個實施例,資料處理方法還包括:讀取n個中間資料和標誌信號;基於標誌信號,對n個中間資料進行第二資料處理,以得到與n個中間資料一一對應的n個輸出資料;輸出n個輸出資料。According to one or more embodiments of the present disclosure, the data processing method further includes: reading n intermediate data and a flag signal; based on the flag signal, performing second data processing on the n intermediate data to obtain the same data as the n intermediate data. One corresponding n output data; output n output data.

根據本公開的一個或多個實施例,標誌信號的不同值包括第一值和第二值,基於標誌信號,對n個中間資料進行第二資料處理,以得到與n個中間資料一一對應的n個輸出資料,包括:響應於標誌信號的值為第一值,將n個中間資料進行反相以得到n個輸出資料;響應於標誌信號的值為第二值,將n個中間資料作為n個輸出資料。According to one or more embodiments of the present disclosure, different values of the flag signal include a first value and a second value. Based on the flag signal, second data processing is performed on the n intermediate data to obtain a one-to-one correspondence with the n intermediate data. The n output data include: in response to the value of the flag signal being the first value, n intermediate data are inverted to obtain n output data; in response to the value of the flag signal being the second value, the n intermediate data are As n output data.

根據本公開的一個或多個實施例,一種電子設備包括處理裝置。處理裝置包括根據上述任一實施例所述的儲存電路。According to one or more embodiments of the present disclosure, an electronic device includes a processing device. The processing device includes a storage circuit according to any of the above embodiments.

以上描述僅為本公開的較佳實施例以及對所運用技術原理的說明。本領域技術人員應當理解,本公開中所涉及的公開範圍,並不限於上述技術特徵的特定組合而成的技術方案,同時也應涵蓋在不脫離上述公開構思的情況下,由上述技術特徵或其等同特徵進行任意組合而形成的其它技術方案。例如上述特徵與本公開中公開的(但不限於)具有類似功能的技術特徵進行互相替換而形成的技術方案。The above description is only a description of the preferred embodiments of the present disclosure and the technical principles applied. Those skilled in the art should understand that the disclosure scope involved in the present disclosure is not limited to technical solutions composed of specific combinations of the above technical features, but should also cover solutions composed of the above technical features or without departing from the above disclosed concept. Other technical solutions formed by any combination of equivalent features. For example, a technical solution is formed by replacing the above features with technical features with similar functions disclosed in this disclosure (but not limited to).

此外,雖然採用特定次序描繪了各操作,但是這不應當理解為要求這些操作以所示出的特定次序或以順序次序執行來執行。在一定環境下,多任務和並行處理可能是有利的。同樣地,雖然在上面論述中包含了若干具體實現細節,但是這些不應當被解釋為對本公開的範圍的限制。在單獨的實施例的上下文中描述的某些特徵還可以組合地實現在單個實施例中。相反地,在單個實施例的上下文中描述的各種特徵也可以單獨地或以任何合適的子組合的方式實現在多個實施例中。Furthermore, although operations are depicted in a specific order, this should not be understood as requiring that these operations be performed in the specific order shown or performed in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.

儘管已經採用特定於結構特徵和/或方法邏輯動作的語言描述了本主題,但是應當理解所附申請專利範圍中所限定的主題未必局限於上面描述的特定特徵或動作。相反,上面所描述的特定特徵和動作僅僅是實現申請專利範圍的示例形式。Although the present subject matter has been described in language specific to structural features and/or methodological logical acts, it is to be understood that the subject matter defined in the scope of the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claimed scope.

對於本公開,還有以下幾點需要說明:Regarding this disclosure, there are still several points that need to be explained:

(1)本公開實施例附圖只涉及到與本公開實施例涉及到的結構,其他結構可參考通常設計。(1) The drawings of the embodiments of this disclosure only refer to structures related to the embodiments of this disclosure, and other structures may refer to common designs.

(2)為了清晰起見,在用於描述本公開的實施例的附圖中,層或結構的厚度和尺寸被放大。可以理解,當諸如層、膜、區域或基板之類的元件被稱作位於另一元件“上”或“下”時,該元件可以“直接”位於另一元件 “上”或“下”,或者可以存在中間元件。(2) For clarity, in the drawings used to describe embodiments of the present disclosure, the thickness and size of layers or structures are exaggerated. It will be understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, it can be "directly on" or "under" the other element. Or intermediate elements may be present.

(3)在不衝突的情況下,本公開的實施例及實施例中的特徵可以相互組合以得到新的實施例。(3) If there is no conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other to obtain new embodiments.

以上所述僅為本公開的具體實施方式,但本公開的保護範圍並不局限於此,本公開的保護範圍應以所述申請專利範圍的保護範圍為准。The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. The protection scope of the present disclosure should be subject to the protection scope of the patent application.

10:儲存電路 20:晶片 100:輸入控制電路 101:輸入子電路 200:記憶體 201:寫入資料位 202:輸出資料位 210:資料靜態記憶體 220:標誌靜態記憶體 300:輸入控制信號生成器 400:輸出控制電路 401:輸出子電路 500:外部寫入資料介面 550:外部讀取資料介面 600:電子設備 601:處理裝置 602:ROM 603:RAM 604:匯流排 605:I/O介面 606:輸入裝置 607:輸出裝置 608:儲存裝置 609:通信裝置 5000:電子設備 5100:處理裝置 Cs:輸入控制信號 Ms:中間資料 Is:輸入資料 Os:輸出資料 S40、S41、S42:步驟 Ss:標誌信號 10:Storage circuit 20:wafer 100:Input control circuit 101:Input subcircuit 200:Memory 201: Write data bit 202: Output data bit 210: Data static memory 220: Flag static memory 300: Input control signal generator 400: Output control circuit 401: Output subcircuit 500: External data writing interface 550: External data reading interface 600: Electronic equipment 601: Processing device 602:ROM 603:RAM 604:Bus 605:I/O interface 606:Input device 607:Output device 608:Storage device 609: Communication device 5000: Electronic equipment 5100: Processing device Cs: input control signal Ms:Intermediate information Is: Enter data Os: output data S40, S41, S42: steps Ss: sign signal

結合附圖並參考以下具體實施方式,本公開各實施例的上述和其他特徵、優點及方面將變得更加明顯。貫穿附圖中,相同或相似的附圖標記表示相同或相似的元素。應當理解附圖是示意性的,元件和元素不一定按照比例繪製。 圖1A為本公開至少一實施例提供的一種儲存電路的示意圖。 圖1B為本公開至少一實施例提供的另一種儲存電路的示意圖。 圖2為本公開一些實施例提供的一種儲存電路的結構示意圖。 圖3為本公開至少一實施例提供的一種晶片的示意圖。 圖4為本公開至少一實施例提供的一種資料處理方法的流程圖。 圖5為本公開至少一實施例提供的一種電子設備的示意圖。 圖6為本公開至少一實施例提供的一種電子設備的結構示意圖。 The above and other features, advantages, and aspects of various embodiments of the present disclosure will become more apparent with reference to the following detailed description taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale. FIG. 1A is a schematic diagram of a storage circuit provided by at least one embodiment of the present disclosure. FIG. 1B is a schematic diagram of another storage circuit provided by at least one embodiment of the present disclosure. FIG. 2 is a schematic structural diagram of a storage circuit provided by some embodiments of the present disclosure. FIG. 3 is a schematic diagram of a wafer provided by at least one embodiment of the present disclosure. Figure 4 is a flow chart of a data processing method provided by at least one embodiment of the present disclosure. FIG. 5 is a schematic diagram of an electronic device provided by at least one embodiment of the present disclosure. FIG. 6 is a schematic structural diagram of an electronic device provided by at least one embodiment of the present disclosure.

10:儲存電路 10:Storage circuit

100:輸入控制電路 100:Input control circuit

200:記憶體 200:Memory

Claims (18)

一種儲存電路,包括:輸入控制電路和記憶體,其中,所述輸入控制電路被配置為:接收n個輸入資料和輸入控制信號;基於所述輸入控制信號,對所述n個輸入資料進行第一資料處理,以得到與所述n個輸入資料一一對應的n個中間資料;將所述n個中間資料和與所述n個輸入資料對應的標誌信號寫入所述記憶體;所述記憶體被配置為儲存所述n個中間資料和所述標誌信號;其中,所述標誌信號的不同值分別表示所述第一資料處理的不同處理過程,n為正整數,並且其中,所述標誌信號的不同值包括第一值和第二值,所述第一值和所述第二值的比例在預定範圍內,所述預定範圍為2/3~3/2。 A storage circuit, including: an input control circuit and a memory, wherein the input control circuit is configured to: receive n input data and input control signals; based on the input control signal, perform a first operation on the n input data. A data processing to obtain n intermediate data corresponding to the n input data; writing the n intermediate data and the flag signal corresponding to the n input data into the memory; The memory is configured to store the n intermediate data and the flag signal; wherein different values of the flag signal respectively represent different processing processes of the first data processing, n is a positive integer, and wherein, the Different values of the flag signal include a first value and a second value, and the ratio of the first value to the second value is within a predetermined range, and the predetermined range is 2/3~3/2. 如請求項1所述的儲存電路,還包括:輸入控制信號生成器,其中,所述輸入控制信號生成器被配置為生成所述輸入控制信號,並將所述輸入控制信號輸出至所述輸入控制電路。 The storage circuit of claim 1, further comprising: an input control signal generator, wherein the input control signal generator is configured to generate the input control signal and output the input control signal to the input control circuit. 如請求項1所述的儲存電路,其中,所述標誌信號與所述輸入控制信號相同。 The storage circuit of claim 1, wherein the flag signal is the same as the input control signal. 如請求項1所述的儲存電路,其中,所述標誌信號的不同值為隨機產生的值。 The storage circuit of claim 1, wherein the different values of the flag signal are randomly generated values. 如請求項1所述的儲存電路,其中,所述標誌信號的值為所述第一值表示所述第一資料處理為反相處理;所述標誌信號的值為所述第二值表示所述第一資料處理為保持處理。 The storage circuit according to claim 1, wherein the value of the flag signal is the first value, indicating that the first data processing is an inversion process; the value of the flag signal is the second value, indicating that the first data processing is an inversion process. The first data processing is retention processing. 如請求項1所述的儲存電路,還包括:輸出控制電路,其中,所述輸出控制電路被配置為:從所述記憶體中讀取所述n個中間資料和所述標誌信號;基於所述標誌信號,對所述n個中間資料進行第二資料處理,以得到與所述n個中間資料一一對應的n個輸出資料;輸出所述n個輸出資料。 The storage circuit according to claim 1, further comprising: an output control circuit, wherein the output control circuit is configured to: read the n intermediate data and the flag signal from the memory; based on the The flag signal is used to perform second data processing on the n intermediate data to obtain n output data corresponding to the n intermediate data one-to-one; and the n output data are output. 如請求項6所述的儲存電路,其中,所述標誌信號的不同值包括第一值和第二值,所述第一值和所述第二值的比例在預定範圍內,所述標誌信號的值為所述第一值表示所述第二資料處理為反相處理;所述標誌信號的值為所述第二值表示所述第二資料處理為保持處理。 The storage circuit of claim 6, wherein the different values of the flag signal include a first value and a second value, the ratio of the first value to the second value is within a predetermined range, and the flag signal If the value of the flag signal is the first value, it indicates that the second data processing is an inversion process; if the value of the flag signal is the second value, it indicates that the second data processing is a holding process. 如請求項6所述的儲存電路,其中,所述輸入控制電路包括與所述n個輸入資料一一對應的n個輸入子電路,所述記憶體還包括寫入資料介面和輸出資料介面,所述寫入資料介面包括與所述n個輸入子電路一一對應的n個寫入資料位, 每個輸入子電路的第一輸入端接收對應的一個輸入資料,每個輸入子電路的第二輸入端接收所述輸入控制信號,每個輸入子電路的輸出端連接至所述寫入資料介面中的對應的寫入資料位,每個輸入子電路被配置為基於所述輸入控制信號,對所述輸入資料進行所述第一資料處理,以得到與所述輸入資料對應的中間資料,將所述中間資料寫入所述寫入資料位;所述輸出控制電路包括與所述n個中間資料一一對應的n個輸出子電路,所述輸出資料介面包括與所述n個輸出子電路一一對應的n個輸出資料位,每個輸出子電路的第一輸入端連接至所述輸出資料介面中的對應的輸出資料位以接收對應的一個中間資料,每個輸出子電路的第二輸入端接收所述標誌信號,每個輸出子電路的輸出端用於輸出與所述中間資料對應的輸出資料,每個輸出子電路被配置為基於所述標誌信號,對所述中間資料進行所述第二資料處理,以得到與所述中間資料對應的輸出資料,並輸出所述輸出資料。 The storage circuit of claim 6, wherein the input control circuit includes n input sub-circuits corresponding to the n input data, and the memory also includes a data writing interface and an output data interface, The write data interface includes n write data bits corresponding to the n input sub-circuits one-to-one, The first input terminal of each input sub-circuit receives a corresponding input data, the second input terminal of each input sub-circuit receives the input control signal, and the output terminal of each input sub-circuit is connected to the writing data interface. corresponding written data bits in, each input sub-circuit is configured to perform the first data processing on the input data based on the input control signal to obtain intermediate data corresponding to the input data, and The intermediate data is written into the write data bit; the output control circuit includes n output sub-circuits corresponding to the n intermediate data, and the output data interface includes n output sub-circuits. n output data bits in one-to-one correspondence, the first input end of each output sub-circuit is connected to the corresponding output data bit in the output data interface to receive a corresponding intermediate data, and the second input end of each output sub-circuit The input terminal receives the flag signal, the output terminal of each output sub-circuit is used to output output data corresponding to the intermediate data, and each output sub-circuit is configured to perform all processing on the intermediate data based on the flag signal. The second data processing is performed to obtain output data corresponding to the intermediate data, and the output data is output. 如請求項8所述的儲存電路,其中,每個輸入子電路包括一個互斥或閘,每個輸出子電路包括一個互斥或閘。 The storage circuit of claim 8, wherein each input sub-circuit includes a mutual exclusive OR gate, and each output sub-circuit includes a mutual exclusive OR gate. 如請求項1-9任一項所述的儲存電路,其中,所述記憶體為高速緩衝記憶體,所述高速緩衝記憶體包括多個資料靜態記憶體和多個標誌靜態記憶體, 所述n個中間資料分別被儲存在所述多個資料靜態記憶體中對應的n個資料靜態記憶體,所述標誌信號被儲存在所述多個標誌靜態記憶體中對應的一個標誌靜態記憶體。 The storage circuit according to any one of claims 1 to 9, wherein the memory is a cache memory, and the cache memory includes a plurality of data static memories and a plurality of flag static memories, The n intermediate data are stored in corresponding n data static memories among the plurality of data static memories, and the flag signal is stored in a corresponding flag static memory among the plurality of flag static memories. body. 如請求項10所述的儲存電路,其中,所述多個資料靜態記憶體和所述多個標誌靜態記憶體構成多個靜態記憶體行,所述n個資料靜態記憶體和所述標誌靜態記憶體位於同一靜態記憶體行。 The storage circuit of claim 10, wherein the plurality of data static memories and the plurality of flag static memories constitute a plurality of static memory rows, and the n data static memories and the flag static memories The memory is located in the same static memory row. 如請求項6-9任一項所述的儲存電路,還包括外部寫入資料介面和外部讀取資料介面,其中,所述外部寫入資料介面被配置為輸出所述n個輸入資料至所述輸入控制電路,所述外部讀取資料介面被配置為接收從所述輸出控制電路輸出的所述n個輸出資料。 The storage circuit according to any one of claims 6-9, further comprising an external data writing interface and an external reading data interface, wherein the external data writing interface is configured to output the n input data to In the input control circuit, the external data reading interface is configured to receive the n output data output from the output control circuit. 一種晶片,包括根據請求項1-12任一項所述的儲存電路。 A chip including the storage circuit according to any one of claims 1-12. 一種資料處理方法,應用於請求項1-12任一項所述的儲存電路,包括:接收所述n個輸入資料和所述輸入控制信號;基於所述輸入控制信號,對所述n個輸入資料進行所述第一資料處理,以得到與所述n個輸入資料一一對應的所述n個中間資料;儲存所述n個中間資料和與所述n個輸入資料對應的標誌信號, 其中,n為正整數,並且其中,所述標誌信號的不同值包括第一值和第二值,所述第一值和所述第二值的比例在預定範圍內,所述預定範圍為2/3~3/2。 A data processing method, applied to the storage circuit described in any one of claims 1-12, including: receiving the n input data and the input control signal; based on the input control signal, processing the n input data Perform the first data processing on the data to obtain the n intermediate data corresponding to the n input data one-to-one; store the n intermediate data and the flag signals corresponding to the n input data, Wherein, n is a positive integer, and wherein the different values of the flag signal include a first value and a second value, the ratio of the first value and the second value is within a predetermined range, and the predetermined range is 2 /3~3/2. 如請求項14所述的資料處理方法,還包括:基於所述輸入控制信號,確定所述標誌信號;基於所述輸入控制信號,對所述n個輸入資料進行所述第一資料處理,以得到與所述n個輸入資料一一對應的所述n個中間資料,包括:響應於基於所述輸入控制信號確定的所述標誌信號的值為所述第一值,將所述n個輸入資料進行反相以得到所述n個中間資料;響應於基於所述輸入控制信號確定的所述標誌信號的值為所述第二值,將所述n個輸入資料作為所述n個中間資料。 The data processing method as described in claim 14, further comprising: determining the flag signal based on the input control signal; performing the first data processing on the n input data based on the input control signal, so as to Obtaining the n intermediate data corresponding to the n input data in a one-to-one manner includes: in response to the value of the flag signal determined based on the input control signal being the first value, converting the n input data The data is inverted to obtain the n pieces of intermediate data; in response to the value of the flag signal determined based on the input control signal being the second value, the n pieces of input data are used as the n pieces of intermediate data. . 如請求項14所述的資料處理方法,還包括:讀取所述n個中間資料和所述標誌信號;基於所述標誌信號,對所述n個中間資料進行第二資料處理,以得到與所述n個中間資料一一對應的n個輸出資料;輸出所述n個輸出資料。 The data processing method as described in claim 14, further comprising: reading the n intermediate data and the flag signal; performing second data processing on the n intermediate data based on the flag signal to obtain the n output data corresponding to the n intermediate data one-to-one; output the n output data. 如請求項16所述的資料處理方法,其中,基於所述標誌信號,對所述n個中間資料進行第二資料處理,以得到與所述n個中間資料一一對應的n個輸出資料,包括:響應於所述標誌信號的值為所述第一值,將所述n個中間資料進行反相以得到所述n個輸出資料; 響應於所述標誌信號的值為所述第二值,將所述n個中間資料作為所述n個輸出資料。 The data processing method as described in claim 16, wherein, based on the flag signal, second data processing is performed on the n intermediate data to obtain n output data corresponding to the n intermediate data one-to-one, The method includes: in response to the value of the flag signal being the first value, inverting the n intermediate data to obtain the n output data; In response to the value of the flag signal being the second value, the n intermediate data are used as the n output data. 一種電子設備,包括:處理裝置,其中,所述處理裝置包括根據請求項1-12任一項所述儲存電路。 An electronic device includes: a processing device, wherein the processing device includes the storage circuit according to any one of claims 1-12.
TW111123987A 2022-06-28 2022-06-28 Storage circuit, chip, data processing method, and electronic device TWI822145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111123987A TWI822145B (en) 2022-06-28 2022-06-28 Storage circuit, chip, data processing method, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111123987A TWI822145B (en) 2022-06-28 2022-06-28 Storage circuit, chip, data processing method, and electronic device

Publications (2)

Publication Number Publication Date
TWI822145B true TWI822145B (en) 2023-11-11
TW202401231A TW202401231A (en) 2024-01-01

Family

ID=89722367

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111123987A TWI822145B (en) 2022-06-28 2022-06-28 Storage circuit, chip, data processing method, and electronic device

Country Status (1)

Country Link
TW (1) TWI822145B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110103159A1 (en) * 2009-10-30 2011-05-05 Date Jan Willem Noorlag Degradation Equalization for a Memory
TW201403614A (en) * 2012-07-10 2014-01-16 Silicon Motion Inc Flash memory controllers and flash memory debug methods
TW201837711A (en) * 2017-04-05 2018-10-16 聯發科技股份有限公司 Memory device, memory controller and associated memory system
TW202137019A (en) * 2020-04-17 2021-10-01 大陸商深圳比特微電子科技有限公司 Computing device and computing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110103159A1 (en) * 2009-10-30 2011-05-05 Date Jan Willem Noorlag Degradation Equalization for a Memory
TW201403614A (en) * 2012-07-10 2014-01-16 Silicon Motion Inc Flash memory controllers and flash memory debug methods
TW201837711A (en) * 2017-04-05 2018-10-16 聯發科技股份有限公司 Memory device, memory controller and associated memory system
TW202137019A (en) * 2020-04-17 2021-10-01 大陸商深圳比特微電子科技有限公司 Computing device and computing system

Also Published As

Publication number Publication date
TW202401231A (en) 2024-01-01

Similar Documents

Publication Publication Date Title
US9224449B2 (en) Variable dynamic memory refresh
US20130159812A1 (en) Memory architecture for read-modify-write operations
US9830093B2 (en) Method and apparatus for improving immunity to defects in a non-volatile memory
US20110271038A1 (en) Indexed register access for memory device
EP3866003A1 (en) Deployment of bios to operating system data exchange
US11907064B2 (en) Memory controller and memory system including the same
TWI822145B (en) Storage circuit, chip, data processing method, and electronic device
WO2020118713A1 (en) Bit width matching circuit, data writing apparatus, data reading apparatus, and electronic device
US11669273B2 (en) Memory access management
KR20180106127A (en) Semiconductor Memory Apparatus and Circuit for Generating Flag and Method for Data Output Therefor
US11983110B2 (en) Storage circuit, chip, data processing method, and electronic device
CN111338827A (en) Method and device for pasting table data and electronic equipment
US20220269622A1 (en) Data processing methods, apparatuses, electronic devices and computer-readable storage media
US20220334801A1 (en) Weight stationary in-memory-computing neural network accelerator with localized data multiplexing
CN115099398A (en) Hardware accelerator operation optimization method and device, electronic equipment and storage medium
US8997044B2 (en) Overriding system attributes and function returns in a software subsystem
US20220406392A1 (en) Techniques for analog multibit data representation for in-memory computing
CN112216333A (en) Chip testing method and device
US10430326B2 (en) Precision data access using differential data
US11855656B2 (en) Detection circuit and detection method, electronic device, and computer-readable storage medium
US11989129B2 (en) Multiple virtual NUMA domains within a single NUMA domain via operating system interface tables
US20230251943A1 (en) Row repair and accuracy improvements in analog compute-in-memory architectures
CN111984645B (en) Data processing method, device, medium and electronic equipment
US20150160867A1 (en) Multidimenstional storage array access
TW201636978A (en) Image combination device and display system comprising the same