Dynamic Language to HDL Translation via SSA Type Resolution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The translation of programs from dynamically-typed languages to hardware description languages is challenging due to type variability in dynamically-typed languages, which does not align with the strong-typed nature of hardware description languages, making direct conversion difficult.

Innovation Solution

The process involves converting a program from a dynamically-typed language to a single static assignment format, resolving data type assignments, and then translating it into a hardware description language by using control flow graphs, phi functions, and data type analysis to ensure each variable receives only one assignment and compatible data types are used.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If direct translation from dynamically-typed language to HDL is attempted, then translation simplicity is maintained, but translation correctness deteriorates due to type variability conflicts with strong-typed HDL requirements

Engineering Contradiction:
Improvetranslation simplicityVSAvoidtranslation correctness
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The patent introduces SSA form as an intermediary representation between dynamically-typed source code and strongly-typed HDL. The SSA form acts as a mediator that resolves type variability issues by creating static type assignments, allowing translation from dynamically-typed languages to strongly-typed HDL without direct conflict. This intermediary stage enables type resolution through control flow analysis and phi function insertion, bridging the gap between the two type systems.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary type resolution by converting the dynamically-typed program to SSA form before final HDL translation. This preliminary action involves analyzing control flow graphs, inserting phi functions at join points, and resolving variable types statically. By performing these type-resolution actions beforehand, the patent ensures that the subsequent HDL translation works with statically-typed assignments, avoiding type conflicts during hardware synthesis.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If SSA form conversion with type resolution is performed, then translation correctness is improved, but device complexity increases due to additional translation steps

Engineering Contradiction:
Improvetranslation correctnessVSAvoidtranslation process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the translation process into distinct phases: control flow graph construction, SSA form conversion, type resolution, and HDL code generation. By dividing the complex translation task into manageable segments, each phase can be handled independently with specialized algorithms. This segmentation makes the overall complex process more tractable and implementable, as each segment addresses a specific aspect of the translation challenge.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS7895584B1Translation of a program in a dynamically-typed language to a program in a hardware description language
Publication Date: 2011.02.22 XILINX INC
  • US7895584B1 patent drawing
  • US7895584B1 patent drawing
  • US7895584B1 patent drawing

AI summary

Method and apparatus for translating a first program in a dynamically-typed language to a program in a hardware description language. From the dynamically-typed-language first program, a second program in single static assignment format is generated. For cases where a variable is assigned different data types at different places in the program, the assignments of the different data types are resolved for the variable. The second program is then translated to a program in the hardware description language.