Physical-Address Memory State Recovery in No-MMU CPU Emulation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The challenge of memory state recovery in an MMU-free environment during CPU chip simulation is addressed to facilitate efficient processor design evaluation.
Innovation Solution
A method involving VMA relocation, memory access data recovery, stack state recovery, and general register value recovery is employed, utilizing physical addresses to restore memory states without an MMU, including steps to relocate VMAs, recover memory access data and stack frames, and restore register values based on physical addresses.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If application slicing is used to run on specific processor design instances, then simulation time is shortened and processor design is accelerated, but memory state recovery becomes more difficult without an MMU
Solution Approach 1:
The patent extracts the MMU functionality from the system by directly using physical addresses instead of virtual addresses. The memory state recovery process takes out the address conversion step that would normally be performed by an MMU, simplifying the recovery process for MMU-free environments while maintaining the ability to evaluate processor designs efficiently
Solution Approach 2:
The patent changes the address parameter from virtual addresses to physical addresses in the memory state recovery process. This parameter change eliminates the need for address translation during recovery, reducing complexity while preserving productivity benefits of application slicing
2Reliability
If virtual addresses are used in memory state recovery, then address translation is required, but this increases recovery complexity and time in MMU-free environments
Solution Approach 1:
The patent removes the address translation step from the memory state recovery process by directly using physical addresses. This extraction of the translation function eliminates unnecessary processing time while maintaining recovery accuracy through direct physical address mapping
Solution Approach 2:
Instead of converting virtual addresses to physical addresses through an MMU, the patent inverts the approach by directly using physical addresses from the start. This inversion eliminates the conversion step and reduces recovery time while maintaining accuracy
Data Source
AI summary
A memory state recovery method for a no-MMU environment in emulated CPU chip acceleration includes relocation of a virtual memory area, which involves performing relocation on each virtual memory area in an available physical memory space, converting a base address, which is represented by a virtual address of the virtual memory area, into a physical address, and keeping the length of the address unchanged. The method also includes recovery of memory access data, wherein for each memory access read record, a recovery rule for a storage position is the base address after relocation of the virtual memory area plus an offset; recovery of a stack state, wherein for each stack frame, a recovery rule for a storage position is the base address after relocation of the virtual memory area plus an offset; and recovery of the value of a general register.


