Macro-Based Memory Map Wrapper for Automated Interface Code Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In technical computing environments, manually writing and maintaining custom interface code between models and larger systems for simulation is time-consuming and inefficient.

Innovation Solution

A memory map interface is generated using a macro language to map signals and operations between models and systems, with a preprocessor component expanding the code to create a memory map interface wrapper that simplifies the interface creation process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If manually writing custom interface code is used to simulate model interaction with larger systems, then the simulation can be performed, but the process is time-consuming and inefficient

Engineering Contradiction:
Improvesimulation setup efficiencyVSAvoidtime required for interface code creation
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system automatically generates the interface code between the model and larger systems without requiring manual intervention. The preprocessor macro system self-configures the memory map interface wrapper, eliminating the need for developers to manually write and maintain interface code while maintaining full simulation functionality.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The invention uses parameterized macro definitions where interface characteristics (data types, signal names, memory addresses) are defined as configurable parameters. By changing these parameters in a template rather than rewriting code, the system adapts to different simulation requirements efficiently, reducing creation time while maintaining correctness.

Inventive Principle:
Principle #35Parameter changes

2Ease of manufacture

If manually writing custom interface code is used, then the interface can be created, but the complexity and maintenance burden increase

Engineering Contradiction:
Improveinterface code creation easeVSAvoidinterface code complexity
Core Design Contradiction:
Ease of manufactureVSDevice complexity

Solution Approach 1:

The interface code is segmented into modular components: a template-based macro system for general interface structure, and instance-specific parameterizations for model-specific details. This segmentation allows the complex interface to be constructed from simple, reusable building blocks, reducing overall complexity while maintaining functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The preprocessor macro system acts as an intermediary between the model definition and the final interface code. It translates high-level model specifications into detailed interface implementations automatically, shielding developers from low-level code complexity while maintaining full control over interface behavior.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If manually maintaining interface code is required, then the interface functionality is maintained, but the development process becomes inefficient

Engineering Contradiction:
Improveinterface functionalityVSAvoiddevelopment efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The interface code structure is prepared in advance through template macros that define the general pattern for all interfaces. Common functionality is pre-implemented in the template, and only model-specific parameters need to be configured. This preliminary preparation eliminates repetitive maintenance work while ensuring consistent, reliable interface behavior across different models.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8839187B1Automatic generation of hardware simulation interface code using pre-processor macros
Publication Date: 2014.09.16 MATHWORKS INC
  • US8839187B1 patent drawing
  • US8839187B1 patent drawing
  • US8839187B1 patent drawing

AI summary

A memory map wrapper may be used to provide an interface between a model and a system with which the model interacts. The memory map wrapper may be designed to provide an interface for source code implementing the model. The memory-map wrapper may include a source code section that describes a mapping between memory regions corresponding to first and second sets of signals and between the source code implementing the model, the mapping defined using macros in memory map wrapper code in which configuration information describing the first and second signals is provided as one or more parameters associated with the source code section. Additionally, a preprocessor component may expand the macros in the memory map wrapper code based on the provided one or more parameters to output expanded memory map wrapper code.