Overview

This guide describes how to download, license, and install Arm Fast Models, and then run an example system with a simple bare-metal hello world software application.

Arm Fast Models are fast, flexible programmer's view models of Arm IP. Fast Models are used to build virtual prototypes for software development. These prototypes are useful during all phases of a project. Virtual prototypes that are built using Fast Models can evolve incrementally, starting with a basic compute subsystem and growing into a comprehensive model of the target hardware. Fast Models are also a great way to learn the details of software development for the Arm architecture.

Ease of use and flexibility make Fast Models an important tool for software developers. Virtual prototype creators construct system models and provide them to software developers to enable early software development. Fast Models are supported on both Linux (Red Hat Enterprise Linux and Ubuntu) and Windows (7 and 10). The supported operating system versions do change over time so please check the Fast Models page on Arm Developer for the currently supported versions.


Before you begin

Before you work through this guide, you will need an Arm account. You will use this account for downloads and license creation. If you do not already have an Arm account, visit the Arm account registration page.

You will also need to know which Arm CPU you will use when you work with Fast Models. You will need this information if you need to secure a license for Fast Models.

Fast Models is currently supported on Windows 10 and Windows 7. Windows users must have Microsoft Visual Studio 2015 or 2017 installed. Without this compiler, it is not possible to compile and run Fast Model systems.

Fast Models is currently supported on Red Hat Enterprise Linux (RHEL) 6 or 7 and Ubuntu 16.04 or 18.04 Long Term Support (LTS). Linux users should have the GNU Compiler Collection installed. Supported g++ versions are 4.9, 6.4 and 7.3 but there is general compatibility across major versions.

Check the Fast Models Release Notes (see below for where to find) for the latest operating system and compiler support and any specific requirements around versions and libraries required.

A faster CPU and more memory will generally achieve better simulation performance, but the examples are very small and can fine on any recent computer.  The recommended minimum configuration is a 2GHz Intel Core2Duo with 4GB of memory.


Generate Fast Models product license

In this section of the guide, we will describe how to generate a Fast Models product license. If you already have access to a license, you can skip this section.

Fast Models use FlexNet Licensing. Many companies already have a common license server which hosts licenses for multiple products, for example, Arm Compilers, or Electronic Design Automation (EDA) tools. Check with your license administrator to find out whether Fast Models licenses are available for you or if new licenses can be added to a common license server. If a server exists but does not have Fast Model licenses, ask for the hostid of the server.

If you need a license, email license.support@arm.com and request a 30-day trial license for Fast Models. Fast Models are licensed according to which Arm CPU you use in the platform. When requesting the evaluation license, specify which Arm CPU models you would like to evaluate. All Arm CPUs are supported.

If you email us to request a license, we will send you a serial number. When you have your serial number, follow these steps to create your own license:

  1. Use your Arm account to download the FlexNet software, for one of the supported platforms, if this software is not already installed and available on your network.
  2. Extract the download using tar on Linux or a program for extracting zip files on Windows.
  3. On the machine where you want to host the license, run the lmhostid command:
    • For Linux: ./lmutil lmhostid
    • For Windows, in a CMD or PowerShell: lmutil.exe lmhostid

    Note: On Linux, if you receive the error ./lmutil: No such file or directory, install the library Linux Standard Base. The method for this installation depends on which OS you are using. For example,
    • on Ubuntu use sudo apt-get install lsb
    • on Red Hat Enterprise Linux use yum install redhat-lsb

    Then retry the command ./lmutil lmhostid.

    Make a note of the hostid that is printed by lmhostid. There is more information about this in a PDF file that is included in the FlexNet software download.

    Two types of Flexnet licenses are supported:
    • Floating licenses, which can be run on any machine on the network. Floating licenses are checked out from the license server.
    • Node locked licenses, which are used only the machine that is running the Fast Models.

    By default, Fast Model licenses are floating licenses. This guide includes details for floating licenses.

  4. Visit Software Licensing to generate a license file. This area allows license files to be generated, previous license files to be viewed and retrieved, and other operations like merging multiple files or moving licenses to a different server. All activity is connected to the Arm Developer account that is associated with the license.
  5. Click Generate and enter the serial number that you have been issued, and the hostid where you set up the Flex tools. This will generate a license file.
  6. Download the license file to the machine where the license server will run. A common name for the file is license.dat, but you can use any file name.
  7. Edit the license file. in the SERVER line before starting the license server, replace thishost with the hostname of the machine. To find the hostname:
    • On Linux: Run uname -a you will see something like the following screenshot:

      Uname code screenshot


      The hostname in this case is nc-c11-2.1.
    • On Windows: Visit the System area in the Control Panel and find the Computer Name. You will see something like the following screenshot:

      Windows settings screenshot

    The last number on the SERVER line is the port number. Make a note of the port number for use during the Fast Model installation.

  8. Start the license server as follows:
    • On Linux: ./lmgrd -c license.dat
    • On Windows: lmgrd.exe -c license.dat

    To learn more about licensing, visit the FAQ where you find solutions for many common problems with licensing. If you do encounter any problem getting licenses installed and running contact license.support@arm.com with details of the problem.


Download and install Fast Models for Windows or Linux

In this section of the guide, we will describe the steps that are required to download and install Fast Models for Windows and Linux.

Follow these steps:

  1. Navigate to the Fast Models page on Arm Developer and the Evaluate buttons for Linux and Windows. The packages that these link to are the complete Fast Models product, there is no functional difference implied by the evaluation label.

    Arm typically releases a new version of Fast Models on a quarterly basis. Each release adds new models, or models for new revisions of existing IP, as they become available. For details on the current release, and release notes for previous releases, visit the Fast Models Release History page.

  2. Extract the downloads using tar on Linux or a program like 7-Zip for extracting zip files on Windows.

  3. Run the setup.sh on Linux or Setup.exe on Windows. In the download, there is an Installation_Guide.txt with information covering machine, OS, and compiler requirements.

    During the installation, a dialog prompts for the installation location and the location of the license file.

  4. Enter the port@host of the FlexNet server for the location of the license file in the dialog box. The port number is from the SERVER line of the license file and the host is either the IP address or the machine name of the computer that is running the lmgrd. For example, 7010@localhost is for the current computer using port 7010.

    On completion, the Linux installer prints how to set up the shell environment for Fast Models, with slight differences depending on the installation path.
    • For sh/ksh source: <install path>/FastModelsTools_<version>/source_all.sh
    • For csh source: <install path>/FastModelsTools_<version>//source_all.csh
    • Add the appropriate configuration setup to your startup script, for example, ~/.bashrc, so that the environment is set up each time you login.

    • There is no additional setup required for Windows. The environment variables are set automatically.
  5. You can optionally use environment variables to set the license file, if it was not specified during installation.
    • The variable ARMLMD_LICENSE_FILE can be used for all Arm products.
    • The variable LM_LICENSE_FILE can be used for all products using FlexNet.
    • Using ARMLMD_LICENSE_FILE is recommended for Arm products. These environment variables can be set using export (bash), setenv (csh), or in the Windows environment variables dialog.

Run an example system and hello world software

To verify the that the Fast Models license setup and installation are correct, let’s work through a simple bare-metal software application “hello world” with a simple Fast Models Virtual Platform.

Follow these steps:

  1. Download the Fast Models hello world examples from the Arm Developer Solutions Repository.
  2. Use git from the command line or use another git client:
    git clone https://github.com/ARM-software/Tool-Solutions.git

    Navigate to the system and directory of an example. Example systems are provided for Cortex-M, Cortex-R, and Cortex-A.

  3. Start System Canvas. System Canvas is the GUI tool that is supplied with Fast Models. Using System Canvas, you can build and edit platforms in either a schematic or text editor:
    • For Linux: Run sgcanvas from the terminal.
    • For Windows: Open System Canvas from the Arm section of the Start menu.
  4. Open the example project using File > Load Project and navigate to the .sgproj file for the Cortex-M, Cortex-R, or Cortex-A example.
  5. Make sure that the Select Active Project Configuration pull-down has the correct operating system and compiler.
  6. Click Build to compile the system. The resulting executable is in a directory which is specific to an operating system and a compiler, and is based on the selected project configuration. In the configuration subdirectory look for isim_system on Linux ad isim_system.exe on Windows.
  7. Run a command-line simulation in a Linux terminal or Windows Command Prompt, by passing the hello world software to the simulation:
    • For Linux: isim_system -a ../software/hello.axf
    • For Windows: isim_system.exe -a ../software/hello.axf
    The included run_windows.cmd and run_linux.sh scripts are included to automatically run the simulation using the above syntax. Either method works.

    The model for the PL011 UART displays the output and the hello world message will appear.
  8. Click Ctrl-C to exit the simulation.

Follow these steps to use a debugger to control the hello world software:

  1. Start the simulation again with -S to enable connection from a debugger which supports Component Architecture Debug Interface (CADI). CADI is the debug API that is linked into Fast Models during the project build step. The simulation waits for a debugger to connect before starting execution.
    • For Linux: isim_system -a ../software/hello.axf -S
    • For Windows: isim_system.exe -a ../software/hello.axf -S

    Any debugger with CADI support can be used to connect, control the software execution, and inspect the CPU and software.

    Arm debuggers with CADI support are:
    • Model Debugger
    • Arm DS
    • uVision
    In this guide, we will work with Model Debugger, which is included in Fast Models.
  2. Start Model Debugger:
    • For Linux: Run modeldebugger from the terminal.
    • For Windows: Open Model Debugger from the Arm section of the Start menu.
  3. Use the File > Connect to Model menu item to open a dialog box which selects the running simulation to connect to.
  4. Click OK and select the hello.axf when prompted.
  5. Use the debugger controls to step, run, and examine instructions, registers, and memory.

    System Canvas can launch the simulation directly and connect Model Debugger. Refer to the Fast Models User Guide for more information.
  6. Select the correct example for the Cortex-M, Cortex-R, or Cortex-A core, depending on the licenses that are available. If a license for the default CPU is not available, the system can be changed to use a similar CPU which is available. Because the simple hello world program assumes very little about the underlying hardware, or use any special hardware features, the following cores can be substituted in their category:

    Armv7-A Armv8-A Armv6-M/v7-M/v8-M
    Armv7-R
    Armv8-R
    Cortex-A5
    Cortex-A35
    Cortex-M0
    Cortex-R4
    Cortex-R52
    Cortex-A7
    Cortex-A53
    Cortex-M0+
    Cortex-R5
     
    Cortex-A8
    Cortex-A55
    Cortex-M3
    Cortex-R7
     
    Cortex-A9
    Cortex-A57
    Cortex-M4
    Cortex-R8
     
    Cortex-A15
    Cortex-A72 Cortex-M7
       
    Cortex-A17
    Cortex-A73
    Cortex-M23
       
    Cortex-A32*
    Cortex-A75
    Cortex-M33
       
      Cortex-A76
         
      Cortex-A77      
    * Cortex-A32 is Armv8-A but in this case works with code compiled for Armv7-A. This is because the Armv8-A code assumes 64-bit compatibility.
  7. Drag the core that you want to work with from the component list onto the canvas. Connect the new core to the same ports as the initial core.
  8. Delete the initial core, and recompile the model. Refer to the System Canvas Tutorial for more information.


Next steps

This guide explained how to get up and running with Arm Fast Models including the license setup, tool download and installation, building and running a simple example and executing a bare metal application on the virtual platform.

From here you can start to expand on the example by, for example, adding more peripherals to the virtual platform, modifying the code example, or running your own applications on the virtual platform.

Arm offers a range of online training modules on these topics, and a range of other topics related to the creation and use of virtual platforms. Click Access online training on the Arm Training Courses page to learn more.