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

ID 784383
Date 7/08/2024
Public
Document Table of Contents

6.5.1.3. Remote Access to the Target System Serial Console

The remote debugging of target software is only complete with having access to the target system serial console. The Intel® Simics® simulator provides the ability to assign a telnet port to a serial console so that it can be accessed from a remote system.

When a serial console is created in a virtual platform, usually, the telnet port is not assigned, so this means that you can access it only locally from the same host system. Under this scenario, if you want to access the serial console remotely, skip creating this default serial console and create a new one in which the telnet port is provided. Use the following steps to achieve this:

  1. Disable the creation of the default local serial console from the target script, if necessary.
  2. Define the path in the virtual platform hierarchy in which the new serial console component object is created.
  3. Define a telnet port number. It must be an integer number between 1024 and 65535.
  4. Define the serial port path in the target system that will be connected to the new serial console.
  5. Create the serial console object with the create-txt-console-comp component, assigning at least the path under the virtual platform (in which it will be created), name, and the telnet port.
  6. Instantiate the serial console object and connect it with the serial port in the target device.

The following capture shows an example of the configuration required to create the serial console that can be accessed remotely. Here, the telnet port selected is 1234, and the new serial console is located on the system.board.console0 path. The title of the serial console is "MyRemoteTerminal," and it is being configured to be not visible in the host PC.

# Set to false parameter to skip creating the default serial console
$create_hps_serial0_console = FALSE

# Call target script
run-command-file "targets/agilex5e-universal/agilex5e-universal.simics"

# Define a telnet port, the path where the new serial console will be created
$con_telnet_port = 1234
$con_name = system.board.console0
# Identify the serial port in the target system that will be connected to 
# the new serial console.
$con_connector = system.board.fpga.soc_inst.hps_subsys.agilex_hps.serial0

# Create the object corresponding to the console
load-module std-comp
load-module console-components
$console = (create-txt-console-comp
name = $con_name
telnet_port = $con_telnet_port
visible = 0
title = "MyRemoteTerminal")

# Connect the console with the serial port
connect $console.serial $con_connector
instantiate-components $console

You can access this serial console from a remote system using the host PC IP address and the telnet port as indicated in the following capture:

remotePC> telnet 10.122.105.197 1234


U-Boot SPL 2023.07 (Nov 14 2023 - 02:49:27 +0000)
Reset state: Cold
MPU          1500000 kHz
L4 Main       400000 kHz
L4 sys free   100000 kHz
L4 MP         200000 kHz
L4 SP         100000 kHz
SDMMC          50000 kHz
init_mem_cal: Initial DDR calibration IO96B_0 succeed
io96b_mb_init: num_instance 1
io96b_mb_init: get memory interface IO96B 0
: