Iterative Memory Boundary Configuration for Minimum RAM Determination
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing solutions fail to accurately determine the minimum RAM memory requirements for a runtime platform to ensure proper execution of firmware or code developed on a larger development platform, especially in constrained environments like IoT devices, and are often cumbersome and inefficient, lacking comprehensive detection of both read and write access errors to forbidden memory regions.
Innovation Solution
A system that utilizes a Memory Protection Unit (MPU/MMU) to dynamically configure and enforce memory access boundaries, allowing only authorized RAM regions to be accessed, with a Fault Detector and Iterative Memory-Boundaries Configurator to determine the minimum required RAM size through iterative testing, ensuring the code runs without memory access faults.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the runtime platform is equipped with a large-size RAM memory to match the development platform, then code compatibility is improved, but device complexity and cost increase
Solution Approach 1:
The system performs preliminary detection of memory access patterns during code execution, identifying which memory regions are actually accessed before finalizing the required memory size. This allows the runtime platform to be configured with the minimum necessary memory rather than matching the full development platform size.
Solution Approach 2:
The system dynamically adjusts the memory size parameter based on detected access patterns. By monitoring which memory addresses are accessed during code execution, the system determines the actual minimum memory requirement and configures the runtime platform accordingly, rather than using a fixed large memory size.
2Measurement precision
If manual testing on multiple hardware configurations is performed to determine memory requirements, then accuracy is improved, but time consumption and complexity increase
Solution Approach 1:
Instead of physically creating multiple hardware configurations for testing, the system uses software-based simulation to replicate different memory size scenarios. The detection mechanism runs on a single platform but simulates various memory constraints, eliminating the need for multiple physical devices while maintaining testing accuracy.
Solution Approach 2:
The detection system is designed to be universal and can determine memory requirements for different code types and configurations using the same mechanism. A single detection system handles various scenarios (different memory sizes, access patterns, and code types) without requiring separate testing setups for each case.
3Reliability
If memory access boundaries are strictly enforced to prevent faults, then reliability is improved, but flexibility in memory usage decreases
Solution Approach 1:
The memory boundary enforcement is dynamic rather than static. The system initially enforces strict boundaries to prevent faults, then gradually relaxes them based on detected safe access patterns. This allows the system to maintain reliability while adapting to the actual memory usage requirements of the executed code.
Data Source
AI summary
Device, system, and method of determining memory requirements and tracking memory usage. A method includes: dynamically modifying, in an iterative process including two or more iterations, a maximum size of Random Access Memory (RAM) that a Memory Protection Unit (MPU) authorizes an executable program code to access. In each iteration, the method includes running that executable program code while the MPU enforces a different maximum size of RAM, and monitoring whether the executable program code attempted to access a RAM memory address that is beyond that maximum size of RAM in that iteration. Based on such iterations, the method determines a minimum size of RAM that is required for that executable program code to run without causing a memory access fault.


