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

ID 784383
Date 12/04/2023

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

Document Table of Contents Listing Processors

You can use processor-status command to check the condition of the target system’s CPUs.

# Intel Simics simulator CLI  

# Show the enabled/disabled status of all processors in the Intel Simics 
# simulation session. 
simics> processor-status 
Processor              Status 
agilex.hps.core[0]     enabled 
agilex.hps.core[1]     enabled 
agilex.hps.core[2]     disabled 
agilex.hps.core[3]     disabled

In multicore architectures (as the example above), it is possible that more than one CPU gets enabled and is running. During the simulation, the Intel® Simics® simulator uses the enabled CPUs to control how the simulation advances in time (see Intel Simics Simulator Timing). To control this, Intel® Simics® uses the concept of “Selected front ended processor” that indicates which CPU is the one that owns the simulation control. The Intel® Simics® simulator switches the selection of this processor during the simulation. The selected front-ended processor is used in many global commands by default when no other CPU is specified in the command (this is shown in examples later in this document). You can use the psel command to determine which is the current frontend processor selected and you can also use this same command to switch to a different processor, as shown in the following capture:

# Intel Simics simulator CLI 
simics> psel
simics> psel agilex.hps.core[1]
Setting new inspection object: agilex.hps.core[1]
simics> psel

To list processors on the target system, enter list-processors command in the Intel® Simics® simulation console. This command shows the information about the state of each processor core to help diagnose the current state of the system. There are multiple switches available. Use help or tab-completion to see the available options. The -disassemble option indicates processor modes like wait states.

list-processors [cell] [parent] ["class"] ["substr"] [-steps] [-cycles] [-time] [-pico-seconds] 
[-pc-va] [-pc-pa] [-disassemble] [-all]
Command Description
-all Listing includes all "execute" objects, which includes objects which are either processors or clocks.

If any execute object is not scheduled by Intel® Simics® simulator itself (possibly scheduled indirectly by another object) an additional "Scheduled" column appears describing if the object is scheduled by Intel® Simics® simulator or not.

[cell] The cell prints only processors that belong to the specified cell.

The parent prints only processors underneath a certain component in the object hierarchy.

The class prints only processor objects of a specific class.

The substr argument prints only processors that have a certain string somewhere in the object hierarchy name.

A number of optional columns can be printed for each processor by using the following flags:

Command Description
-steps Executed steps
-cycles Executed cycles
-time Executed time in seconds
-pico-seconds Executed time in picoseconds
-pc-va Virtual address program counter
-pc-pa Physical address program counter
-disassemble Current disassembly
# Intel Simics simulator CLI  

simics> list-processors 
CPU Name                      CPU Class          Freq 
agilex.hps.core[0]   *     arm-cortex-a53     80.00 MHz
agilex.hps.core[1]         arm-cortex-a53     80.00 MHz
agilex.hps.core[2]         arm-cortex-a53     80.00 MHz 
agilex.hps.core[3]         arm-cortex-a53     80.00 MHz
* = selected CPU 

simics> list-processors -disassemble 
      CPU Name           CPU Class        Freq                Disassembly 
agilex.hps.core[0]  *  arm-cortex-a53   200.00 MHz  v:0x0000000000000000 p:0x0000000000 nop
agilex.hps.core[1]     arm-cortex-a53   200.00 MHz  v:0x0000000000000000 p:0x0000000000 nop 
agilex.hps.core[2]     arm-cortex-a53   200.00 MHz  v:0x0000000000000000 p:0x0000000000 nop
agilex.hps.core[3]     arm-cortex-a53   200.00 MHz  v:0x0000000000000000 p:0x0000000000 nop
* = selected CPU

Notice in both examples in the above capture that the selected front-ended processor is being indicated with a *. You can use the processor path along with disassemble to inspect its information directly.

# Intel Simics simulator CLI 
# Using processor.disassemble
simics> agilex.hps.core[0].disassemble
v:0xffff8000107dc170 p:0x80000000867dc170  ldrb w3, [x0, #185]

Similarly, the you can get the information of a processor using the [processor_path].info and the [processor_path].status commands.

# Intel Simics simulator CLI 
# Checking information of processor agilex.hps.core[0]
simics> agilex.hps.core[0].info

Information about agilex.hps.core[0] [class arm-cortex-a53]
     Execution mode : Normal
    Clock frequency : 200 MHz
                CPI : 1.00
    Physical memory : agilex.hps.cpu_mem[0]
               Cell : agilex.cell
      # Checking the status of processor agilex.hps.core[0]

simics> agilex.hps.core[0].status

Status of agilex.hps.core[0] [class arm-cortex-a53]
    Clock frequency : 200.000000 MHz
           Activity : Executing (fetch/execute from program counter)
             Cycles : 0
    Program counter : 0x00000000
    Instruction set : ARM
            Context : agilex.cell_context

You can also use list-objects namespace = [processor name] to inspect each of the processors.

# Intel Simics simulator CLI  

# Inspect processor agilex.hps.core[0] 
simics> list-objects namespace=agilex.hps.core[0]
 Class                      Object 
<vtime>           agilex.hps.core[0].vtime

# Inspect the vtime object of processor agilex.hps.core[0] 
simics> list-objects namespace=agilex.hps.core[0].vtime
 Class                         Object 
<cycle-counter>    agilex.hps.core[0].vtime.cycles
<ps-clock>         agilex.hps.core[0].vtime.p
Note: The examples presented in this section show the vtime object under the processor objects. This object is related to CPU virtual time. The objects under this object include CPU parameters, such as number of cycles executed or frequency. The information in these parameters can be different from the real CPU parameters values. To get the real value of these parameters, refer to the Intel Simics Simulator Timing section.