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

ID 786901
Date 8/08/2024
Public
Document Table of Contents

4.2. Intel® Simics® Simulation Setup for the Agilex™ 5 E-Series Device

Setting up simulation with the Agilex™ 5 E-Series Universal Virtual Platform (agilex5e-universal) includes the following actions:

  • Initialize the project directory
  • Deploy virtual platform
  • Build virtual platform components
  • Update parameters in the startup script

For more information about setting up simulation, refer to Simulation Set Up in Intel® Simics® Simulator for Intel® FPGAs User Guide.

To complete the initial setup for simulation with the Agilex™ 5 E-Series Intel® Simics® model using the Agilex™ 5 E-Series Universal Virtual Platform, perform the following steps:

  1. Start a new terminal session.
  2. Switch directories to where you want to create the project directory. For example:
    cd /home/simicsUser/SimicsEnv/
  3. Create the working directory:
    mkdir project-1
    cd project-1
  4. Initialize the project directory and deploy the platform:
    <simics_installdir>/simics_intelfpga_cli –-deploy agilex5e-universal

    The command results in the following output:

    Intel Simics Simulator for Intel(R) FPGA CLI:
    INFO: Preparing to initialize
    /home/simicsUser/SimicsEnv/project-1 as an Intel Simic workspace
    Project created successfully 
    Confirm that the project directory has been initialized and the simics and simics-gui commands appear in the project directory. Also, ensure that the targets directory is created and includes the target script that corresponds to the deployed platform. A listing of your project directory should include the following files and directories:
    • bin/
    • compiler.mk
    • config.mk
    • doc/
    • documentation
    • GNUmakefile
    • modules/
    • simics
    • simics-gui
    • simics-riscfree
    • targets/

    If you want to add the project directory to a source control directory, do not add these files because they are always created automatically.

  5. Build the virtual platform components:
    make
    The command results in the following output:
    === Environment Check ===
    '/home/simicsUser/SimicsInstallDir/project-1' is up-to date
    gcc version 9
    === Building module agilex5e-universal-board-comp ===
    === Building module agilex5e-universal-fpga-comp ===
    === Building module agilex5e-universal-system-comp ===
    Copying agilex5_icon_84x84.png

After completing the initial setup, customize the Intel® Simics® target script for the selected virtual platform by modifying the parameters in the script. The agilex5e-universal.simics virtual platform target script contains parameters to specify the paths of the binary files used in the simulation.

For example, if you want to run a simulation of the Agilex™ 5 E-Series HPS booting from an SD card, set the $sd_image_filename and $fsbl_image_filename target script parameters. These parameters correspond to the image of the SD Card (includes U-Boot, ATF, Linux kernel, and Linux file system) and the image of the u-boot SPL, respectively.

The example script that follows shows these parameters set.
Important: If you want to customize any of the components in the virtual platform (for example, create your system/board/FPGA component), edit the components before running the make command. This way, the target script takes the customized binaries/Python components generated from the build.

Update the target script with the binaries that are used in the simulation. The following example shows an updated target script:

# agilex5e-universal.simics Target script

$sd_image_filename = "gsrd-console-image-agilex5.wic"
$fsbl_image_filename = "u-boot-spl-dtb.bin"

# Options for platform images
if not defined sd_image_filename {$sd_image_filename = ""}
if not defined nand_data_image_filename {$nand_data_image_filename = ""}
if not defined nand_spare_image_filename {$nand_spare_image_filename = ""}
if not defined qspi_image_filename {$qspi_image_filename = ""}
 
# FSBL Image name
if not defined fsbl_image_filename {$fsbl_image_filename = ""}

For instructions on obtaining prebuilt binaries or building your own binaries, refer to Agilex™ 5 Intel® Simics® Virtual Platform Example User Guide - Linux GSRD at the Altera® FPGA Developer webpage.