8.7.1 Preparation 8.7.3 Using disk images
Getting Started  /  8 Tutorials  /  8.7 Networking and getting data into the simulated system  / 

8.7.2 Using the Intel Simics Agent

File transfer can be done in several ways. The preferred method is to use the Intel Simics Agent, which is piece of software that must be present on the target machine. The qsp-x86/firststeps target comes with the agent already on disk.

For other targets, if the agent is not present, it must be transferred to the target machine using one of the methods described later. The agent is preferred since it is the fastest and least intrusive method.

The steps required to configure the agent can be summarized as:

  1. in the simulator:
    Start the agent manager. The agent manager is a single global manager in the simulator, used to manage all connections to all agents on all targets. The agent manager is started with the
    start-agent-manager command.

  2. on the target:
    Start the simics-agent on the target.

  3. in the simulator:
    Connect the agent manager with the agent with the <agent_manager>.connect-to-agent command. After connecting, an agent handle will be created, which is a Simics object which can be used access the target.

Here is an example of using the agent for transferring files, using the qsp-x86/firststeps target.

Note that the agent operations are necessarily asynchronous, which is why we must wait for them to finish. However, there is no need to wait after each command; several commands can be queued up before a wait is issued.

In the example, we only started the simulation to allow starting simics-agent in the target machine, and while waiting for agent operations to complete, using <agent_handle>.run-until-job.

An alternative method is to keep the simulation running. With this method, the requested agent operations will start directly, and <agent_handle>.run-until-job or <agent_handle>.status may only be required to await or check completion of the operation. This method (work with a running simulator) can be convenient for interactive work.

The agent can also perform other operations, such as

To see other available commands, run help agent0 or use the tab-completion by typing agent0. followed by two tabs:

agent0 # press tab twice to expand all commands
agent0.agent-poll-interval  agent0.log-group
agent0.agent-quit           agent0.log-level
agent0.agent-restart        agent0.ls
agent0.cd                   agent0.print-file
agent0.change-directory     agent0.print-working-directory
agent0.delete-handle        agent0.pwd
agent0.discard-jobs         agent0.run
agent0.download             agent0.run-until-job
agent0.download-dir         agent0.status
agent0.get-captured-output  agent0.target-time
agent0.info                 agent0.upload
agent0.list-files           agent0.upload-dir
agent0.list-jobs            agent0.wait-for-job
8.7.1 Preparation 8.7.3 Using disk images