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

ID 784383
Date 7/08/2024
Public

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

Document Table of Contents

5.1.1. Initializing an Intel® Simics® Project and Deploying a Virtual Platform

After the Intel® Simics® simulator is installed, you must initialize an Intel® Simics® project. Initializing an Intel® Simics® project prepares a directory for use by Intel® Simics® Simulator. You can create a new directory or use an existing directory as an Intel® Simics® project directory. You must initialize an Intel® Simics® project before you can do anything else in the Intel® Simics® project directory. However, you can also initialize an Intel® Simics® Project in conjunction with deploying an Intel® Simics® virtual platform (a reference design provided for your reference). Alternatively, you can reinitialize an already available project directory by skipping the virtual platform components and related target scripts deployment. This feature is useful when you have created your own virtual platform and target script and maintained them in your own repository, so in this case, you only need to initialize the project directory and not bring up all modules and target script files that integrate the example virtual platform provided as reference.

During the project initialization, some trampoline files are created. These trampoline files correspond to executable files that are linked to files under the Intel® Simics® simulator installation directory. ./simics and ./simics-gui files are examples of trampoline files.

After initializing the Intel® Simics® project, deploy the virtual platform reference design. Deploying a virtual platform initializes the Intel® Simics® project directory as an Intel® Simics® simulator workspace and copies all the files required to enable the virtual platform to the Intel® Simics® project directory. These files can include .simics scripts, Python components, DML models, and documentation.

Important: Before you run a simulation, ensure that your project contains the target scripts.

Use the simics_intelfpga_cli command (in the <simics_installdir>/simics/bin directory) to both initialize a project and deploy a virtual platform. The following command options are typically used when you initialize a project and deploy a virtual platform:

Table 6.   Intel® Simics® Commands to Initialize a Project and Deploy a Virtual Platform
Argument Description
--help Shows the description of the command and arguments supported.
--list-platforms Lists all virtual platforms available.
--deploy Deploys a specific virtual platform initializing the current directory as an Intel® Simics® simulator workspace and copies all required files to the directory (components required by the virtual platform and the target script itself).
--reinitialize Reinitializes an existing directory. This option only initializes the current directory as an Intel® Simics® simulator workspace, but it does not copy virtual platforms and target scripts-related files to this directory. It is expected to be used when virtual platforms and target scripts-related files already exist.
--force Forces deploy if files already exist.
--pltaform-info Gives detailed information on a platform.

The typical flow of initializing a project and deploying a virtual platform is as follows:

  1. Create a project directory and change directories to it:
    mkdir <projectDir>
    cd <projectDir>
  2. List the available platforms:
    <simics_installdir>/simics/bin/simics_intelfpga_cli --list-platforms
  3. Initialize the project directory and deploy a virtual platform:
    <simics_installdir>/simics/bin/simics_intelfpga_cli --deploy <virtual_platform>

    This command creates the target script corresponding to the virtual platform selected ( <virtual_platform>.simics) in the <projectDir>/targets/<virtual_platform> directory.

    If you only want to reinitialize the project directory without the platform deployment, run the following command:

    <installDir>/simics/bin/simics_intelfpga_cli --reinitialize
  4. Customize the virtual platform. Component that you can customize are described later.
  5. Build the virtual platform:
    make
    Note: The Linux system must support make and gcc commands as indicated in Installing the Intel Simics Simulator for Intel FPGAs on Linux* Systems.
  6. Run the simulation with target script (.simics):
    ./simics  <projectDir>/targets/<virtual_platform>/<virtual_platform>.simics
    ./simics-gui  <projectDir>/targets/<virtual_platform>/<virtual_platform>.simics