Profiler-Based Code Optimization for Embedded Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing tools for optimizing embedded code for execution performance on target processors require manual interpretation of profiler feedback, making it cumbersome for users to achieve optimal performance.

Innovation Solution

A technical computing environment (TCE) that automatically generates and regenerates embedded code based on profiler feedback, using target processor information to optimize execution and memory performance through a profiler-based optimizer and automatic code generator.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If manual interpretation of profiler feedback is used, then code optimization can be achieved, but user effort and complexity increase

Engineering Contradiction:
Improvecode optimization qualityVSAvoiduser effort
Core Design Contradiction:
Manufacturing precisionVSEase of operation

Solution Approach 1:

The system performs automatic code regeneration based on profiler feedback without requiring manual user intervention. The code generator automatically interprets profiler statistics and regenerates optimized code, allowing the system to serve itself rather than requiring user expertise in interpreting profiler data and setting optimization options.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

An automatic code generation interface acts as an intermediary between the profiler and the code. This intermediary automatically processes profiler feedback statistics and translates them into code regeneration decisions, eliminating the need for users to directly interpret profiler data and manually configure optimization parameters.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If profiler feedback is automatically processed, then user effort is reduced, but system complexity increases

Engineering Contradiction:
Improveuser effortVSAvoidsystem complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The code generation system is enhanced to perform multiple functions: it not only generates code from models but also automatically processes profiler feedback, analyzes execution performance, and iteratively regenerates optimized code. This multi-functionality consolidates what would otherwise require separate manual tools and processes into a single integrated system.

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

Solution Approach 2:

The system implements an automatic feedback loop where profiler execution statistics are fed back to the code generator, which then automatically adjusts optimization parameters and regenerates code. This closed-loop feedback mechanism enables the system to self-optimize without increasing operational complexity for users.

Inventive Principle:
Principle #23Feedback

3Speed

If iterative code regeneration is performed, then execution performance improves, but processing time increases

Engineering Contradiction:
Improveexecution performanceVSAvoidoptimization time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The system performs preliminary code generation with default optimization settings before iterative regeneration based on profiler feedback. This preliminary action provides a baseline that may already be sufficiently optimized, potentially reducing the number of iterative regeneration cycles needed and thus minimizing the time loss while still achieving good execution performance.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9015684B1Profiler-based optimization of automatically generated code
Publication Date: 2015.04.21 MATHWORKS INC
  • US9015684B1 patent drawing
  • US9015684B1 patent drawing
  • US9015684B1 patent drawing

AI summary

A device generates code with a technical computing environment (TCE) based on a model and information associated with a target processor, registers an algorithm with the TCE, automatically sets optimization parameters applied during generation of the code based on the algorithm, executes the generated code, receives feedback based on execution of the generated code, and uses the feedback to automatically update the optimization parameters and to automatically regenerate the code with the TCE until an optimal code is achieved for the target processor.