IP Library Granted Patent US 10,545,739
Granted Patent B2
US 10,545,739 · App. 15/091,093 · Granted Jan 28, 2020

LLVM-based system C compiler for architecture synthesis

Inventors: Minsik Cho (Austin, TX); Brian R. Konigsburg (Glen Burnie, MD); Indira Nair (Briarcliff Manor, NY); Haoxing Ren (Austin, TX); Jeonghee Shin (Sunnyvale, CA)
Assignee: International Business Machines Corporation
G06F8/44G06F8/40
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 10,545,739
App. No.
15/091,093
Granted
Jan 28, 2020
Kind
B2
Abstract

A low level virtual machine (LLVM)-based system C compiler for architecture synthesis is provided. In one aspect, a method for translating a system C model to hardware description language (HDL) is provided. The method includes the steps of: generating a hardware connection model (HCM) from the system C model, wherein the HCM defines modules and interconnects in a hardware system; parsing the system C model into a LLVM intermediate representation (IR); converting the LLVM IR to a system LLVM IR which records correspondence information between the LLVM IR and the HCM; and generating the HDL based on direct mapping of processes from the system LLVM IR and the HCM.

Claims (44)

1. A method for translating a system C model to hardware description language (HDL), comprising:

generating a hardware connection model (HCM) from the system C model, wherein the HCM defines modules and interconnects in a hardware system;

after the HCM has been generated, separately parsing the system C model into a low level virtual machine (LLVM) intermediate representation (IR);

converting the LLVM IR to a system LLVM IR which records correspondence information between the LLVM IR and the HCM by converting system C ports and signals into global pointer variables that are correlated with the HCM in the system LLVM IR; and

generating the HDL based on direct mapping of processes from the system LLVM IR and the HCM.

2. The method of claim 1 , wherein generating the HCM from the system C model comprises:

overwriting the classes in the system C model to create objects for the HCM.

3. The method of claim 2 , wherein the classes comprise one or more of modules, ports, and signals.

4. The method of claim 2 , wherein the classes are overwritten by a wrapper class that creates the objects for the HCM.

5. The method of claim 1 , wherein the system C model is parsed into the LLVM IR using a front end compiler.

6. The method of claim 1 , wherein converting the LLVM IR to the system LLVM IR further comprises:

replacing read methods in system C with load commands; and

replacing write methods in system C with store commands.

7. The method of claim 1 , wherein converting the LLVM IR to the system LLVM IR comprises:

converting system C datatype variables into LLVM native datatypes.

8. The method of claim 1 , wherein converting the LLVM IR to the system LLVM IR comprises:

converting function calls on system C datatype variables into LLVM native instructions.

9. The method of claim 1 , wherein converting the LLVM IR to the system LLVM IR comprises:

converting system C member functions to custom functions for register transfer level (RTL) compiler generation.

10. The method of claim 1 , wherein generating the HDL comprises:

generating finite state machines (FSMs) mapped to HDL processes.

11. The method of claim 10 , further comprising:

creating FSM functions for each of the processes mapped from the system LLVM IR and the HCM.

12. The method of claim 10 , further comprising:

converting each of the FSMs to HDL procedures.

13. The method of claim 12 , further comprising:

generating HDL code for each of FSM functions that are created.

14. The method of claim 10 , further comprising:

instantiating library elements.

15. The method of claim 14 , further comprising:

mapping one or more modules in the HCM as predefined modules in HDL.

16. A computer program product for translating a system C model to HDL, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a computer to cause the computer to:

generate an HCM from the system C model, wherein the HCM defines modules and interconnects in a hardware system;

after the HCM has been generated, separately parse the system C model into a LLVM IR;

convert the LLVM IR to a system LLVM IR which records correspondence information between the LLVM IR and the HCM by converting system C ports and signals into global pointer variables that are correlated with the HCM in the system LLVM IR; and

generate the HDL based on direct mapping of processes from the system LLVM IR and the HCM.

17. The computer program product of claim 16 , wherein the program instructions when converting the LLVM IR code to the system LLVM IR further cause the computer to:

convert system C datatype variables into LLVM native datatypes; and

convert system C member functions to custom functions for RTL compiler generation.

18. The computer program product of claim 16 , wherein the program instructions when generating the HDL further cause the computer to:

generate FSMs mapped to HDL processes; and

convert each of the FSMs to HDL procedures.

19. The computer program product of claim 16 , wherein the program instructions when generating the HDL further cause the computer to:

instantiate library elements.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 5, 2016
From: CHO, MINSIK; KONIGSBURG, BRIAN R.; NAIR, INDIRA; REN, HAOXING; SHIN, JEONGHEE
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 038196/0123 →
Continuity (1)
Related Publication 20170286079A1 · Oct 5, 2017