IP Library Granted Patent US 11,513,972
Granted Patent B2
US 11,513,972 · App. 16/538,351 · Granted Nov 29, 2022

TLB device supporting multiple data streams and updating method for TLB module

Inventors: Tianshi Chen (Beijing, CN); Qi Guo (Beijing, CN); Yunji Chen (Beijing, CN)
Assignee: CAMBRICON TECHNOLOGIES CORPORATION LIMITED
G06F12/1027G06N3/02G06F2212/68
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,513,972
App. No.
16/538,351
Granted
Nov 29, 2022
Kind
B2
Abstract

Aspects of managing Translation Lookaside Buffer (TLB) units are described herein. The aspects may include a memory management unit (MMU) that includes one or more TLB units and a control unit. The control unit may be configured to identify one from the one or more TLB units based on a stream identification (ID) included in a received virtual address and, further, to identify a frame number in the identified TLB unit. A physical address may be generated by the control unit based on the frame number and an offset included in the virtual address.

Claims (54)

1. A memory management unit, comprising:

one or more Translation Lookaside Buffers (TLBs),

wherein each of the TLBs is assigned to only one of multiple data types, wherein the multiple data types include input data, output data, weight values, and partial sums in a neural network, and

wherein each of the TLBs includes a plurality of page numbers; and

a control unit configured to:

receive a virtual address that identifies one of the multiple data types,

identify one of the one or more TLBs that corresponds to the data type identified by the virtual address, and

determine a TLB hit based on the virtual address and the plurality of page numbers in the identified TLB.

2. The memory management unit of claim 1 , wherein each of the TLBs includes a plurality of frame numbers that respectively correspond to the plurality of page numbers.

3. The memory management unit of claim 2 , wherein the virtual address includes a stream identification (ID) that identifies the data type among the multiple data types.

4. The memory management unit of claim 3 , wherein the virtual address further includes a virtual number.

5. The memory management unit of claim 4 , wherein the control unit is configured to identify the TLB that corresponds to the stream ID in the virtual address.

6. The memory management unit of claim 4 , wherein the control unit is configured to determine the TLB hit when one of the plurality of page numbers in the identified TLB matches the virtual page number in the virtual address.

7. The memory management unit of claim 6 , wherein the control unit is further configured to, based on the determination of the TLB hit, identify one of the plurality of page numbers that corresponds to the virtual page number in the virtual address.

8. The memory management unit of claim 7 , wherein the control unit is further configured to:

identify the frame number that corresponds to the identified page number, and

generate a physical address that includes the frame number and an offset included in the virtual address.

9. The memory management unit of claim 4 , wherein the control unit is further configured to:

determine a TLB miss when none of the page numbers in the identified TLB matches the virtual page number in the virtual address,

based on the determination of the TLB miss, identify an alternative page number in a main page table stored in a memory external to the memory management unit, wherein the alternative page number corresponds to the virtual page number in the virtual address,

identify an alternative frame number that corresponds to the alternative page number,

generate an alternative physical address that includes the alternative frame number and an offset included in the virtual address, and

based on the determination of the TLB miss, identify one of the TLBs that corresponds to the stream ID in the virtual address,

identify a target page number from the plurality of page numbers in the identified TLB and a target frame number from the plurality of frame numbers that corresponds to the identified target page number,

replace the target page number with the alternative page number, and

replace the target frame number with the alternative frame number,

wherein the target page number is randomly selected, and

wherein the target page number is least recently accessed among the plurality of page numbers.

10. A method for managing TLBs, comprising:

receiving, by a control unit, a virtual address that identifies one of multiple data types, wherein the multiple data types include input data, output data, weight values, and partial sums in a neural network;

identifying, by the control unit, one of one or more TLBs that is only assigned to the data type identified by the virtual address,

wherein each of the TLBs corresponds to one of the multiple data types, and

wherein each of the TLBs includes a plurality page numbers; and

determining a TLB hit based on the virtual address and the plurality of page numbers in the identified TLB.

11. The method of claim 10 , each of the TLBs includes a plurality of frame numbers that respectively correspond to the plurality of page numbers.

12. The method of claim 11 , wherein the virtual address includes a stream identification (ID) that identifies the data type among the multiple data types.

13. The method of claim 12 , wherein the virtual address further includes a virtual number.

14. The method of claim 13 , wherein the identifying further includes identifying the TLB that corresponds to the stream ID in the virtual address.

15. The method of claim 14 , wherein the determining further includes determining the TLB hit when one of the plurality of page numbers in the identified TLB matches the virtual page number in the virtual address.

16. The method of claim 15 , further comprising identifying, based on the determination of the TLB hit, one of the plurality of page numbers that corresponds to the virtual page number in the virtual address.

17. The method of claim 16 , further comprising:

identifying the frame number that corresponds to the identified page number, and

generating a physical address that includes the frame number and an offset included in the virtual address.

18. The method of claim 13 , further comprising:

determining a TLB miss when none of the page numbers in the identified TLB matches the virtual page number in the virtual address,

based on the determination of the TLB miss, identifying an alternative page number in a main page table stored in a memory external to the memory management unit, wherein the alternative page number corresponds to the virtual page number in the virtual address,

identifying an alternative frame number that corresponds to the alternative page number,

generating an alternative physical address that includes the alternative frame number and an offset included in the virtual address,

based on the determination of the TLB miss, identifying one of the TLBs that corresponds to the stream ID in the virtual address,

identifying a target page number from the plurality of page numbers in the identified TLB and a target frame number from the plurality of frame numbers that corresponds to the identified target page number,

replacing the target page number with the alternative page number, and

replacing the target frame number with the alternative frame number,

wherein the target page number is randomly selected, and

wherein the target page number is least recently accessed among the plurality of page numbers.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 12, 2019
From: CHEN, TIANSHI; GUO, QI; CHEN, YUNJI
To: CAMBRICON TECHNOLOGIES CORPORATION LIMITED
Reel/Frame 050028/0104 →
Priority Claims (1)
CN 201610738487.2 · Aug 26, 2016 · national
Continuity (3)
Continuation 16286361 · Feb 26, 2019
Continuation In Part PCTCN2017095845 · Aug 3, 2017
Related Publication 20190361816A1 · Nov 28, 2019