IP Library Granted Patent US 12,032,841
Granted Patent B2
US 12,032,841 · App. 17/484,408 · Granted Jul 9, 2024

Memory coupled compiling method and system of reconfigurable chip

Inventors: Zhen Zhang (Beijing, CN); Peng Ouyang (Beijing, CN); Junbao Hu (Beijing, CN)
Assignee: BEIJING TSINGMICRO INTELLIGENT TECHNOLOGY CO., LTD.
G06F3/0635G06F3/0604G06F3/0673G06F8/433G06F9/5066G06F8/451
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 12,032,841
App. No.
17/484,408
Granted
Jul 9, 2024
Kind
B2
Abstract

Provided are a memory coupled compiling method and system of a reconfigurable chip. The memory coupled compiling method includes: acquiring a cycle number of a data flow graph (DFG); acquiring a linear transformation vector of the cycle number through a mapping time difference; determining whether a linear array of the linear transformation vector is acquired by a heuristic algorithm; acquiring a memory mapping result through a current DFG or acquiring a cycle number of the current DFG until the linear array is acquired, depending on the determination result.

Claims (166)

1. A memory coupled compiling method of a reconfigurable chip, comprising:

acquiring a data flow graph by processing arrays to be computed in a dependency analysis pass implemented in Clang and low level virtual machine (LLVM) compiler framework;

acquiring a cycle number of the data flow graph according to a cycle number of a load node and a store node in the data flow graph;

acquiring a linear transformation vector of the cycle number of the data flow graph through a mapping time difference;

determining whether a linear array of the linear transformation vector is acquired by a heuristic algorithm;

acquiring a memory mapping result through a current data flow graph if the linear array of the linear transformation vector is acquired by the heuristic algorithm;

adjusting the current data flow graph and acquiring a cycle number of the current data flow graph until the linear array is acquired, if the linear array of the linear transformation vector is not acquired by the heuristic algorithm; and

performing compilation for the reconfigurable chip by a backend compiler based on the acquired memory mapping result, or the acquired cycle number of the current data flow graph.

2. The memory coupled compiling method according to claim 1 , wherein the adjusting the current data flow graph and acquiring the cycle number of the current data flow graph comprises:

adjusting nodes in the data flow graph based on a principle that a cycle number of a longest path is unchanged to acquire the current data flow graph.

3. The memory coupled compiling method according to claim 2 , wherein the adjusting nodes in the data flow graph based on the principle that the cycle number of the longest path is unchanged to acquire the current data flow graph comprises:

determining whether a node that makes the cycle number of the longest path unchanged exists in the data flow graph;

adjusting the nodes in the data flow graph based on the principle that the cycle number of the longest path is unchanged to acquire the current data flow graph, if the node that makes the cycle number of the longest path unchanged exists in the data flow graph; and

adjusting the nodes in the data flow graph based on a principle that the cycle number of the longest path is increased by several cycles to acquire the current data flow graph, if the node that makes the cycle number of the longest path unchanged does not exist in the data flow graph.

4. A non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor, cause the memory coupled compiling method according to claim 3 to be performed.

5. A non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor, cause the memory coupled compiling method according to claim 2 to be performed.

6. The memory coupled compiling method according to claim 1 , wherein the heuristic algorithm is expressed as:

gcd

(

α

*

Δ

0

T

,

α

*

Δ

1

T

,

,

α

*

Δ

l

-

1

T

,

N

)

?

α

*

Δ

l

T

where {right arrow over (α)} represents a linear vector; T represents transposition; l represents a dimensionality of an array; gcd represents a greatest common divisor; N represents a number of banks; Δ represents a difference; and ? represents questioning whether an intersection exists and determining whether a condition is met.

7. A non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor, cause the memory coupled compiling method according to claim 6 to be performed.

8. A non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor, cause the memory coupled compiling method according to claim 1 to be performed.

9. A memory coupled compiling system of a reconfigurable chip, comprising a processor and a memory storing instructions which, when executed by the processor, cause the processor to:

acquire a data flow graph by processing arrays to be computed in a dependency analysis pass implemented in Clang and low level virtual machine (LLVM) compiler framework;

acquire a cycle number of the data flow graph according to a cycle number of a load node and a store node in the data flow graph;

acquire a linear transformation vector of the cycle number of the data flow graph through a mapping time difference;

determine whether a linear array of the linear transformation vector is acquired by a heuristic algorithm;

acquire a memory mapping result through a current data flow graph if the linear array of the linear transformation vector is acquired by the heuristic algorithm; or adjust the current data flow graph and acquire a cycle number of the current data flow graph until the linear array is acquired, if the linear array of the linear transformation vector is not acquired by the heuristic algorithm; and

performing compilation for the reconfigurable chip by a backend compiler based on the acquired memory mapping result, or the acquired cycle number of the current data flow graph.

10. The memory coupled compiling system according to claim 9 , wherein the processor is configured to adjust the current data flow graph and acquire the cycle number of the current data flow graph by:

adjusting nodes in the data flow graph based on a principle that a cycle number of a longest path is unchanged to acquire the current data flow graph.

11. The memory coupled compiling system according to claim 10 , wherein the adjusting nodes in the data flow graph based on the principle that the cycle number of the longest path is unchanged to acquire the current data flow graph comprises:

determining whether a node that makes the cycle number of the longest path unchanged exists in the data flow graph;

adjusting the nodes in the data flow graph based on the principle that the cycle number of the longest path is unchanged to acquire the current data flow graph, if the node that makes the cycle number of the longest path unchanged exists in the data flow graph; and

adjusting the nodes in the data flow graph based on a principle that the cycle number of the longest path is increased by several cycles to acquire the current data flow graph, if the node that makes the cycle number of the longest path unchanged does not exist in the data flow graph.

12. The memory coupled compiling system according to claim 9 , wherein the heuristic algorithm is expressed as:

gcd

(

α

*

Δ

0

T

,

α

*

Δ

1

T

,

,

α

*

Δ

l

-

1

T

,

N

)

?

α

*

Δ

l

T

where {right arrow over (α)} represents a linear vector; T represents transposition; l represents a dimensionality of an array; gcd represents a greatest common divisor; N represents a number of banks; Δ represents a difference; and ? represents questioning whether an intersection exists and determining whether a condition is met.

13. A memory coupled compiling method of a reconfigurable chip, comprising:

acquiring a cycle number of a data flow graph;

acquiring a linear transformation vector of the cycle number of the data flow graph through a mapping time difference;

determining whether a linear array of the linear transformation vector is acquired by a heuristic algorithm;

acquiring a memory mapping result through a current data flow graph if the linear array of the linear transformation vector is acquired by the heuristic algorithm;

adjusting the current data flow graph and acquiring a cycle number of the current data flow graph until the linear array is acquired, if the linear array of the linear transformation vector is not acquired by the heuristic algorithm,

wherein the adjusting the current data flow graph and acquiring the cycle number of the current data flow graph comprises:

determining whether a node that makes a cycle number of a longest path unchanged exists in the data flow graph;

adjusting nodes in the data flow graph based on a principle that the cycle number of the longest path is unchanged to acquire the current data flow graph, if the node that makes the cycle number of the longest path unchanged exists in the data flow graph;

adjusting the nodes in the data flow graph based on a principle that the cycle number of the longest path is increased by several cycles to acquire the current data flow graph, if the node that makes the cycle number of the longest path unchanged does not exist in the data flow graph; and

performing compilation for the reconfigurable chip by a backend compiler based on the acquired memory mapping result, or the acquired cycle number of the current data flow graph.

14. The memory coupled compiling method according to claim 13 , wherein the heuristic algorithm is expressed as:

gcd

(

α

*

Λ

0

T

,

α

*

Δ

1

T

,

,

α

*

,

Δ

l

-

1

T

,

N

)

?

α

*

Δ

l

T

where {right arrow over (α)} represents a linear vector; T represents transposition; l represents a dimensionality of an array; god represents a greatest common divisor; N represents a number of banks; Δ represents a difference; and ? represents questioning whether an intersection exists and determining whether a condition is met.

15. A non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor, cause the memory coupled compiling method according to claim 14 to be performed.

16. A memory coupled compiling system of a reconfigurable chip comprising a processor and a memory storing instructions which, when executed by the processor, cause the processor to perform the method according to claim 14 .

17. A non-transitory computer-readable storage medium having stored therein instructions that, when executed by a processor, cause the memory coupled compiling method according to claim 13 to be performed.

18. A memory coupled compiling system of a reconfigurable chip comprising a processor and a memory storing instructions which, when executed by the processor, cause the processor to perform the method according to claim 13 .

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 4, 2026
From: BEIJING TSINGMICRO INTELLIGENT TECHNOLOGY CO., LTD.
To: BEIJING TSINGMICRO INTELLIGENT TECHNOLOGY CO., LTD.; TSINGHUA UNIVERSITY
Reel/Frame 074846/0453 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 4, 2021
From: ZHANG, ZHEN; OUYANG, PENG; HU, JUNBAO
To: BEIJING TSINGMICRO INTELLIGENT TECHNOLOGY CO., LTD.
Reel/Frame 057689/0884 →
Priority Claims (1)
CN 202011554667.8 · Dec 24, 2020 · national
Continuity (2)
Continuation PCTCN2021078941 · Mar 3, 2021
Related Publication 20220206697A1 · Jun 30, 2022
Cited By (1)
US 12,189,570