IP Library Granted Patent US 11,216,375
Granted Patent B2
US 11,216,375 · App. 16/849,913 · Granted Jan 4, 2022

Data caching

Inventors: Qilin Zheng (Hangzhou, CN); Shaodi Wang (Hangzhou, CN)
Assignee: Hangzhou Zhicun Intelligent Technology Co., Ltd.
G06F12/0802G06F9/30134G06N3/02G06F12/0893G06F2212/50G06F2212/608
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,216,375
App. No.
16/849,913
Granted
Jan 4, 2022
Kind
B2
Abstract

A data caching circuit and method are provided. The circuit is configured to cache data for a feature map calculated by a neural network, wherein a size of a convolution kernel of the neural network is K*K data, and a window corresponding to the convolution kernel slides at a step of S in the feature map, where K is a positive integer and S is a positive integer, the circuit comprising: a cache comprising K caching units, each caching unit being configured to respectively store a plurality of rows of the feature map, the plurality of rows comprising a corresponding row in every K consecutive rows of the feature map.

Claims (50)

1. A data caching circuit configured to cache data of a feature map calculated by a neural network, wherein a size of a convolution kernel of the neural network is K*K data, and a window corresponding to the convolution kernel slides at a step of S in the feature map, where K is a positive integer and S is a positive integer, the circuit comprising:

a cache comprising K caching units, each caching unit being configured to respectively store a plurality of rows of the feature map, the plurality of rows comprising a corresponding row in every K consecutive rows of the feature map.

2. The circuit of claim 1 , wherein for each row of the feature map, a remainder obtained by dividing a row address by K corresponds to the ordinal number of a caching unit that stores said row of the feature map.

3. The circuit of claim 1 , further comprising:

K register groups, each of the register groups being configured to receive data from a corresponding caching unit and output stored data to a calculation circuit.

4. The circuit of claim 1 , further comprising a cache controller, the cache controller being configured to:

select K consecutive rows of the feature map;

control the cache to output data in a matrix corresponding to the window;

cause the window to slide in the row direction in the K consecutive rows; and

control, after the window slides, the cache to output the last S columns in the matrix corresponding to the window.

5. The circuit of claim 4 , wherein each of the K consecutive rows corresponds to a corresponding row in a corresponding caching unit of the K caching units, and the cache controller being further configured to:

for each caching unit, control the caching unit to output, column by column based on column addresses, data in the corresponding row.

6. The circuit of claim 5 , wherein the cache controller is further configured to:

select, starting from the 1 st row address of the feature map, a respective set of K consecutive rows of the feature map;

reselect, after the window slides to the end of the respective set of K consecutive rows, K consecutive rows from the (S+1) th row to the K th row in the respective set of K consecutive rows of the feature map and S consecutive rows after the respective set of K consecutive rows of the feature map; and

control the cache to output, from the 1 st column address, the reselected K consecutive rows of the feature map.

7. The circuit of claim 5 , wherein the cache controller is further configured to:

after the window slides to the end of the K consecutive rows of the feature map, for a caching unit that outputs a row from the 1 st row to the S th row in the K consecutive rows of the feature map, select a next row stored therein, and for a caching unit that outputs a row from the (S+1) th row to the K th row in the K consecutive rows of the feature map, still select the currently selected row; and

control each caching unit to output, from the 1 st column address in the selected row, the selected row of the feature map.

8. The circuit of claim 3 , further comprising:

a multiplexer configured to transmit data from each caching unit to a corresponding register group.

9. The circuit of claim 3 , wherein each register group comprises:

a write register configured to receive data from a corresponding caching unit; and

a calculation register configured to receive data from the write register and output registered data to the calculation circuit.

10. The circuit of claim 9 , wherein each register group is configured such that

when the register group is in a data reading mode, the write register receives data from a corresponding caching unit, and the calculation register outputs registered data to the calculation circuit, and

when the register group is in a data shifting mode, the write register shifts registered data to the calculation register.

11. The circuit of claim 9 , wherein the calculation register comprises:

K register units, the last register unit of the K register units being configured to receive data from the write register,

wherein in response to receiving the data from the write register, each of the last (K−1) register units of the K register units shifts data registered therein to a previous register unit.

12. The circuit of claim 9 , wherein when a row output by any caching unit changes, the calculation register in each register group is cleared.

13. The circuit of claim 1 , wherein each data in the feature map comprises data with a same two-dimensional address on all channels, the two-dimensional address of each data comprising a row address and a column address of the data.

14. The circuit of claim 1 , wherein the cache comprises a random access memory (RAM).

15. The circuit of claim 3 , wherein the calculation circuit is a vector-matrix multiplication calculation circuit or a storage and calculation integrated circuit.

16. A data caching method, performed by an information processing device or system, that stores data of a feature map calculated by a neural network implemented in the information processing device or system, in a cache, wherein a size of a convolution kernel of the neural network is K*K data, a window corresponding to the convolution kernel slides at a step of S in the feature map, and the cache comprises K caching units, where K is a positive integer and S is a positive integer, the method comprising:

storing a plurality of rows of the feature map in each caching unit, the plurality of rows comprising a corresponding row in every K consecutive rows of the feature map.

17. The method of claim 16 , wherein

for each row of the feature map, a remainder obtained by dividing a row address by K corresponds to the ordinal number of a caching unit that stores said row of the feature map.

18. The method of claim 16 , further comprising:

for each of K register groups, receiving data from a corresponding caching unit, and outputting stored data to a calculation circuit.

19. The method of claim 16 , further comprising:

selecting, by a cache controller, K consecutive rows of the feature map;

controlling, by the cache controller, the cache to output data in a matrix corresponding to the window;

causing, by the cache controller, the window to slide in the row direction in the K consecutive rows; and

controlling, by the cache controller, the cache to output the last S columns in the matrix corresponding to the window each time after the window slides,

wherein each of the K consecutive rows corresponds to a corresponding row in a corresponding caching unit of the K caching units, and for each caching unit, the cache controller controls the caching unit to output, column by column based on column addresses, data in the corresponding row.

20. The method of claim 19 , wherein

the cache controller selects, starting from the 1 st row address of the feature map, a respective set of K consecutive rows,

after the window slides to the end of the respective set of K consecutive rows, the cache controller reselects K consecutive rows, from the (S+1) th row to the K th row in the K consecutive rows and S consecutive rows after the respective set of K rows, wherein for a caching units that outputs a row from the 1 st row to the S th row in the reselected K consecutive rows, the cache controller selects a next row stored therein, and for caching units that outputs a row from the (S+1) th row to the K th row in the K consecutive rows, the cache controller still selects the currently selected row, and

the cache controller controls the cache to output, from the 1 st column address, the reselected K consecutive rows, wherein the cache controller controls each caching unit to output, from the 1 st column address in a selected row, the selected row.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 21, 2026
From: HANGZHOU ZHICUN INTELLIGENT TECHNOLOGY CO., LTD.
To: HANGZHOU ZHICUN (WITMEM) TECHNOLOGY CO., LTD.
Reel/Frame 073527/0714 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 25, 2021
From: ZHENG, QILIN; WANG, SHAODI
To: HANGZHOU ZHICUN INTELLIGENT TECHNOLOGY CO., LTD.
Reel/Frame 057291/0023 →
Priority Claims (1)
CN 202010118620.0 · Feb 26, 2020 · national
Continuity (2)
Continuation PCTCN2020080318 · Mar 20, 2020
Related Publication 20210263849A1 · Aug 26, 2021