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

ID 784383
Date 4/01/2024
Public
Document Table of Contents

5.4.2.1. 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
-------------------------------------------
system.....agilex_hps.core[2]      disabled
system.....agilex_hps.core[3]      disabled
system.....agilex_hps.core[0]      enabled
system.....agilex_hps.core[1]      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 "system.board.fpga.soc_inst.hps_subsys.agilex_hpse.core[0]" 
simics> psel system.board.fpga.soc_inst.hps_subsys.agilex_hps.core[1]
Setting new inspection object: system.board.fpga.soc_inst.hps_subsys.agilex_hps.core[1]
simics> psel "system.board.fpga.soc_inst.hps_subsys.agilex_hps.core[1]"

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]
Table 11.   list-processors Command Options
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:

Table 12.   list-processors Command Options
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 
-------------------------------------------------------
system...agilex_hps.core[0]* arm-cortex-a55 400.00 MHz
system...agilex_hps.core[1]  arm-cortex-a55 400.00 MHz
system...agilex_hps.core[2]  arm-cortex-a76 400.00 MHz
system...agilex_hps.core[3]  arm-cortex-a76 400.00 MHz
-------------------------------------------------------
* = selected CPU

simics> list-processors -disassemble
-----------------------------------------------------------------------------
CPU Name                          CPU Class      Freq          Disassembly
-----------------------------------------------------------------------------
system...agilex_hps.core[0]* arm-cortex-a55 400.00 MHz  v:0x00000000fff67840
                                                        p:0x80000000fff67840 
                                                        str  w0, [x18, #332]
system...agilex_hps.core[1]  arm-cortex-a55 400.00 MHz  v:0x0000000000000000 
                                                        p:0x0000000000
                                                        Pending exception: 
                                                        ['Reset'], 
                                                        cpu is user disabled
system...agilex_hps.core[2]  arm-cortex-a76 400.00 MHz  v:0x0000000000000000 
                                                        p:0x0000000000
                                                        Pending exception: 
                                                        ['Reset'], 
                                                        cpu is user disabled
system...agilex_hps.core[3]  arm-cortex-a76 400.00 MHz  v:0x0000000000000000 
                                                        p:0x0000000000
                                                        Pending exception: 
                                                        ['Reset'], 
                                                        cpu is user disabled
-----------------------------------------------------------------------------
* = 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> system.board.fpga.soc_inst.hps_subsys.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 system.board.fpga.soc_inst.hps_subsys.agilex_hps.core[0]
simics> system.board.fpga.soc_inst.hps_subsys.agilex_hps.core[0].info
Information about system.board.fpga.soc_inst.hps_subsys.agilex_hps.core[0] [class arm-cortex-a55]
===========================================================
         VMP status : Not Loaded
    JIT compilation : Enabled
    Clock frequency : 400 MHz
                CPI : 1.00
    Physical memory : system.board.fpga.soc_inst.hps_subsys.agilex_hps.cpu_mem[0]
               Cell : system.cell
# Checking the status of processor Core0

simics> system.board.fpga.soc_inst.hps_subsys.agilex_hps.core[0].status
Status of system.board.fpga.soc_inst.hps_subsys.agilex_hps.core[0] [class arm-cortex-a55]
===================================================
    Clock frequency : 400.000000 MHz
           Activity : Executing (fetch/execute from program counter)
             Cycles : 0
    Program counter : 0x00000000
    Instruction set : ARM
            Context : system.cell_context

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

# Intel Simics simulator CLI  

# Inspect processor system.board.fpga.soc_inst.hps_subsys.agilex_hps.core[0] 
simics> list-objects namespace=system.board.fpga.soc_inst.hps_subsys.agilex_hps.core[0]
----------------------------------------------------------------
Component Class             Object 
----------------------------------------------------------------
<vp_intel_agilex_5_soc>     hps (alias for system....agilex_hps)
----------------------------------------------------------------
---------------------------------------------------
 Class                         Object 
---------------------------------------------------
---------------------------------------------------

# Inspect the vtime object of processor core[0] 
simics> list-objects namespace=system.board.fpga.soc_inst.hps_subsys.agilex_hps.core[0].vtime
------------------------------------------------------------
Component Class               Object
------------------------------------------------------------
<vp_intel_agilex_5_soc>  hps (alias for system...agilex_hps)
------------------------------------------------------------
-----------------------------------------------------------
 Class                         Object 
-----------------------------------------------------------
<cycle-counter>    system...agilex_hps.core[0].vtime.cycles
<ps-clock>         system...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.