Hardware-Specific Code Generation for Graphical Models
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Productivity
If processor-specific optimizations are implemented, then execution performance on target hardware is improved, but code portability to other hardware is reduced
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.
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.
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
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.
Data Source
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.


