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

ID 786901
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

2.1.3.7. On-Chip Memory IP FPGA Fabric Example Design

Two instances of the On-Chip memory design exist in the FPGA fabric model. One of these instances is located directly under the qsys_top component, while the other resides under the peripheral subsystem. Each one of the On-Chip memory instances has a size of 1 MB and is connected to the HPS2FPGA bridges. 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 in which these are mapped under the HPS2FPGA bridges memory space or by accessing the memories example design as a memory space.

Read from example design memory space:

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

Write to example design memory space:

system.board.fpga.soc_inst.example_design.design_mem.write <addr loc> <value>
system.board.fpga.soc_inst.periph_subsys.example_design_lw.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 1MB) using the corresponding HPS2FPGA base address. The HPS software must follow this approach when accessing the example design:

Read from example design using HPS2FPGA address:

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

Write to example design using HPS2FPGA address:

system.board.fpga.soc_inst.hps_subsys.agilex_hps.phys_mem.set <0x40000000 +addr loc> <value>
system.board.fpga.soc_inst.hps_subsys.agilex_hps.phys_mem.set <0x20000000 +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.