Hardware-Specific Code Generation for Graphical Models

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current graphical modeling tools generate generic program codes that fail to leverage specific performance-enhancing features of various computing hardware, resulting in suboptimal performance across different processors.

Innovation Solution

A method for generating hardware-specific code by translating graphical models into code, performing lookups in a hardware-specific library to match graphical model code functions with hardware-specific functions, and modifying the code accordingly, allowing for optimal utilization of processor-specific optimizations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If generic program code is generated to run on multiple processor types, then compatibility across different hardware is improved, but performance optimization for specific hardware is lost

Engineering Contradiction:
ImprovecompatibilityVSAvoidperformance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent segments the code generation process into multiple target-specific code paths, where each path is optimized for a specific processor type. The system divides the monolithic generic code generation into separate generation processes for different hardware targets, allowing each segment to be optimized independently while maintaining overall compatibility through a unified framework.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamic code generation where the code generation process adapts based on the target processor type. The system dynamically selects and applies appropriate optimization strategies, instruction sets, and compilation parameters based on the specified hardware target, enabling the same graphical model to generate optimized code for different processors without manual intervention.

Inventive Principle:
Principle #15Dynamics

2Productivity

If processor-specific optimizations are implemented, then execution performance on target hardware is improved, but code portability to other hardware is reduced

Engineering Contradiction:
Improveexecution performanceVSAvoidportability
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent applies local quality by implementing processor-specific optimizations only at the points where they are needed, rather than throughout the entire codebase. The system identifies specific code regions, functions, or operations that benefit from hardware-specific optimizations and applies targeted transformations, leaving the rest of the code generic and portable.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent utilizes parameter changes by allowing the code generation process to adjust compilation parameters, optimization flags, and code generation settings based on the target processor. The system changes parameters such as instruction set architecture, optimization levels, and code generation options dynamically according to the specified hardware target, enabling portability while achieving local optimizations.

Inventive Principle:
Principle #35Parameter changes

3Device complexity

If a single generic code is compiled for multiple processors, then development complexity is reduced, but performance potential of specific hardware is not utilized

Engineering Contradiction:
Improvedevelopment complexityVSAvoidhardware utilization
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent implements universality by creating a unified code generation framework that handles multiple processor types through a single interface. The system provides a universal graphical model representation and a unified code generation process that automatically adapts to different target processors, eliminating the need for separate development processes while maintaining the ability to generate optimized code for each specific hardware platform.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS8701081B2Hardware specific code generation
Publication Date: 2014.04.15 MATHWORKS INC
  • US8701081B2 patent drawing
  • US8701081B2 patent drawing
  • US8701081B2 patent drawing

AI summary

A computer-implemented method for generating code based on a graphical model may include: translating the graphical model into a graphical model code, the graphical model code including a first graphical model code function; performing a lookup of the first graphical model code function in a hardware specific library, the hardware specific library comprising a plurality of relationships between graphical model code functions and hardware specific functions, where the first graphical model code function is one of the graphical model code functions; obtaining a matched hardware specific function based on the lookup, wherein the matched hardware specific function is one of the hardware specific functions from the hardware specific library; and modifying the graphical model code based on the matched hardware specific function.