4.16.1 Sync points

A sync point is a point at which the simulation can detect whether it needs to stop and at which it can start and stop producing trace and events. The sync level determines where the sync points are in terms of simulated time.

Table 4-14 Sync levels and sync points

Sync level Description
0

OFF. Maximum simulation speed. No accuracy guarantees. In particular, the simulation cannot be stopped immediately, even from synchronous callbacks or model code, and the values of the PC and instruction count registers are generally out of date, even when read from synchronous callbacks or model code.

Use cases:

  • Simulations that do not require immediate stopping of any kind.
  • Free-running simulations that are used for software development.
  • Normal debugging sessions when no watchpoint is set.

The sync point is the end of the current quantum.

1

SYNC_STATE. Slightly slower than 0. It is possible to read up-to-date resource values from synchronous callbacks (syncEc=True) from the model and model code, for example the PC register. The simulation cannot be stopped immediately from within synchronous callbacks or model code.

Use cases:

  • External breakpoints that block the simulation.
  • Inspecting the processor state from within peripheral accesses.
2

POST_INSN_IO. Similar to 1 but slightly slower, and the simulation can be stopped immediately while executing I/O (LD/ST) instructions from within synchronous callbacks and model code by using the simulationTime_stop() function. The simulation stops after the currently executed I/O (LD/ST) instruction completed, post-instruction.

Use cases:

  • Watchpoints.
  • External breakpoints (breakpoints in peripherals).
  • Complex breakpoints built from LD/ST-related events.
The sync point is the same as for sync level 1, but additionally after every I/O instruction.
3

POST_INSN_ALL. Similar to 2 but slightly slower, and the simulation can be stopped immediately, independently of the instruction being executed. The simulation stops after the currently executed instruction completed (post-instruction).

Use case:

  • Complex breakpoints that are built from arbitrary events.
The sync point is the same as for sync level 2, but additionally after every instruction.

Use cases that require specific sync levels:

  • Watchpoints, or memory breakpoints, require sync level 2. This is handled transparently by the model and the sync level does not need to be requested by the watchpoint setter.
  • External breakpoints, in other words, breakpoints that are set in peripherals, behind a bridge, that can stop the simulation, use sync level 2.
  • Trace event-based breakpoints usually require sync level 2 or 3.
  • Events that inspect the state of cores, in particular the PC and instruction count, from within the ec_FOO() callback require sync level 1.
Non-ConfidentialPDF file icon PDF version101196_0100_00_en
Copyright © 2018 Arm Limited or its affiliates. All rights reserved.