Intel® Simics® Simulator for Intel® FPGAs: Agilex™ 5 E-Series Virtual Platform User Guide

ID 786901
Date 4/01/2024
Public
Document Table of Contents

2.1.3.7. On-Chip Memory IP FPGA Fabric Example Design

One On-Chip memory design exists in the FPGA fabric model that is located directly under the qsys_top component. This memory instance has a size of 1 MB and is connected to the hps2fpga bridge. This On-Chip memory model supports reading and writing to any memory location.

You can access the memory designs using direct memory access to the memory locations which are mapped under the hps2fpga bridge memory space or by accessing the memory example design as a memory space.

Read from example design memory space:

system.board.fpga.soc_inst.example_design.design_mem.read <addr loc>

Write to example design memory space:

system.board.fpga.soc_inst.example_design.design_mem.write <addr loc> <value>

The following commands read and write a 32-bit word into the specified address location on the example design (from 0 to 1 MB) using the base address under the hps2fpga bridge. The HPS software must follow this approach when accessing the example design:

Read from On-Chip memory example design using hps2fpga bridge address:

system.board.fpga.soc_inst.hps_subsys.agilex_hps.phys_mem.get <0x40000000 +addr loc>

Write to On-Chip memory example design using hps2fpga bridge address:

system.board.fpga.soc_inst.hps_subsys.agilex_hps.phys_mem.set <0x40000000 +addr loc> <value>

Adjust addresses based on the value set in the base_addr parameter in the example design. The address to use in Intel® Simics® commands depends on the value assigned to the base_addr parameter.