Intel® Simics® Simulator for Intel® FPGAs: User Guide

ID 784383
Date 12/04/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

5.4.4.1. Memory Mapping Inspection

A memory space is a fundamental abstraction in the Intel® Simics® simulator providing support for generic 64-bit address spaces into which memory and devices can be mapped. More concretely, a memory space takes a stream of transactions to an address space and distributes them to devices mapped into the address space in a highly efficient manner while optionally providing address translations, byte swapping, and breakpoint support. Memory space objects can be cascaded to form arbitrarily complex mappings and support dynamic reconfiguration and remapping at run time through attributes to support the modeling of buses with dynamic addressing.

In the previous section, the use of devs command was described. As part of the output of this command, the memory space to which each device belongs is presented in the space column in the table.

Similarly, you can determine the devices that are mapping into a memory space. This can be done using the following commands:

 <memory_space>.map
<memory_space>.memory-map
The output for each one of these commands slightly differs but in both cases, the memory mapping is shown as follows:
# Intel Simics simulator CLI 

simics> agilex.hps.phys_mem.map
------------------------------------------------------------------------
 Base       Object        Fn  Offset   Length     Target Prio Align Swap
------------------------------------------------------------------------
 0x0       agilex.ram        0x0     0x80000000          1    
0x80000000 agilex.hps2f..    0x0     0x60000000          0    8
0xf7000000 agilex.ccu..      0x0     0x1000              0    8
------------------------------------------------------------------------
Besides the two commands presented above, there are some other commands that can be executed from a memory space. These commands allow to add or remove a mapping, read and write from/to a memory location under the memory space among many other options:
# Intel Simics simulator CLI 

simics> system.board.fpga.hps.phys_mem.
system.board.fpga.hps.phys_mem.add-map              agilex.hps.phys_mem.memory-map
system.board.fpga.hps.phys_mem.bp-break-memory      system.board.fpga.hps.phys_mem.read
system.board.fpga.hps.phys_mem.bp-run-until-memory  system.board.fpga.hps.phys_mem.read-string
system.board.fpga.hps.phys_mem.bp-trace-memory      system.board.fpga.hps.phys_mem.save-file
system.board.fpga.hps.phys_mem.bp-wait-for-memory   system.board.fpga.hps.phys_mem.save-intel-32-obj
system.board.fpga.hps.phys_mem.debug                system.board.fpga.hps.phys_mem.save-intel-hex
system.board.fpga.hps.phys_mem.del-map              system.board.fpga.hps.phys_mem.save-intel-obj
system.board.fpga.hps.phys_mem.examine-memory       system.board.fpga.hps.phys_mem.save-vmem
system.board.fpga.hps.phys_mem.get                  system.board.fpga.hps.phys_mem.set
system.board.fpga.hps.phys_mem.get-string           system.board.fpga.hps.phys_mem.set-string
system.board.fpga.hps.phys_mem.info                 system.board.fpga.hps.phys_mem.status
system.board.fpga.hps.phys_mem.load-binary          system.board.fpga.hps.phys_mem.wait-for-get
system.board.fpga.hps.phys_mem.load-file            system.board.fpga.hps.phys_mem.wait-for-read
system.board.fpga.hps.phys_mem.load-intel-hex       system.board.fpga.hps.phys_mem.wait-for-set
system.board.fpga.hps.phys_mem.load-intel-obj       system.board.fpga.hps.phys_mem.wait-for-write
system.board.fpga.hps.phys_mem.load-vmem            system.board.fpga.hps.phys_mem.write
system.board.fpga.hps.phys_mem.log-group            system.board.fpga.hps.phys_mem.write-string
system.board.fpga.hps.phys_mem.log-level            system.board.fpga.hps.phys_mem.x
system.board.fpga.hps.phys_mem.map 

Another helpful command is the memory-map. This displays the physical memory map including translator for the current selected processor (information from another processor can be shown using the object command parameter).

# Intel Simics simulator CLI  

simics> memory-map
-----------------------------------------------------------
             system.board.fpga.hps.cpu_mem[0]
-----------------------------------------------------------
  Start       End     Object                        Offset
-----------------------------------------------------------
0x00000   0x00fff   system.board.fpga.hps.ocram    
0x01000   0x01fff   system.board.fpga.hps.ocram    0x01000
0x02000   0x02fff   system.board.fpga.hps.ocram    0x02000
0x03000   0x03fff   system.board.fpga.hps.ocram    0x03000 
   :         :                  :                     :
----------------------------------------------------------