v10.50 v10.55 Alpha v10.54 Alpha v10.53 Alpha v10.52 Alpha v10.51 Alpha
v10.50 v10.55 Alpha v10.54 Alpha v10.53 Alpha v10.52 Alpha v10.51 Alpha

SetLinkState Instruction

This instruction instructs the Voyager USB 3.2 Exerciser to force a USB3 link to the desired state.

Note: This instruction guarantees that the link state switches to the desired state, but it does not guarantee that the link stays in that state.

SetLinkState( LinkState, SyncWithTxCommands, AssertLTSSMReset )

The first parameter, LinkState, defines the target state of the action. It is detailed further below.

The second instruction named parameter is SyncWithTxCommands. If non-zero, this will force
the SetLinkState action to wait for exerciser to finish executing all of the outgoing commands before applying or removing Terminations.Default value is zero.

The third parameter is AssertLtssmReset. If non-zero, it will instruct the exerciser to place its USB3 PHY layer in reset when removing Terminationsand take it out of reset when applying terminations.Default value is zero.

LinkState Parameter

The LinkState parameter has one of the following possible values:

LinkState Values
(constants defined in "gen_constants.ginc" )

SS.Inactive*

SS_INACTIVE = 0

SS.Disabled*

SS_DISABLED = 1

Rx.Detect

RX_DETECT = 2

Polling

POLLING = 3

U0 (see note)

U0 = 4

U1

U1 = 5

U2

U2 = 6

U3

U3 = 7

Recovery (see note)

RECOVERY = 8

HotReset

HOTRESET = 10

Note: To go to Compliance Mode, use SendTo_ComplianceMode(), as explained in 4.8.1.

Note: Voyager USB 3.2 Exerciser can perform transitions to Rx.Detect and Polling link states from any state. For all other link states, Voyager USB 3.2 Exerciser tries to perform the required transition, but the result is not guaranteed and depends on the current link state and link peer behavior.

Special LinkState Values
(constants defined in "gen_constants.ginc" )

Terminations Off

TERMINATION_OFF = 12

Removes USB 3 terminations on the Exerciser side.

Terminations On

TERMINATION_ON = 13

Applies USB 3 terminations on the Exerciser side.

Disconnect Vbus

MOMENTARY_DISCONNECT = 14

Removes VBUS connection from the Exerciser for about 2 milliseconds, which can be useful to simulate a disconnect/reconnect event.

Note on SetLinkState (Recovery): Sequence of events taken by Host or Device emulation in case of SetLinkState (Recovery) command:

If current link state is U0, SetLinkState (Recovery) starts Recovery retraining and returns to U0.

If current link state is U1, U2, or U3, SetLinkState (Recovery) causes an exit signal appropriate for the current low-power state and starts the Recovery sequence to bring the link from low-power state to U0 state.

If current link state is other than U0, U1, U2, or U3, SetLinkState (Recovery) does not change the link state.

recoverysubstatemachine.png
Recovery Substate Machine. Figure 7-20 from USB Serial Bus 3.0 Specification Rev.1.0

Note on SetLinkState (U0): Sequence of events taken by Host or Device emulation in case of SetLinkState (U0) command:

If current link state is SS.Inactive, Rx.Detect, or Polling, Host emulation goes to Rx.Detect.Reset substate and generates WarmReset LFPS signal followed by Rx.Detect.Active, then exits to Polling, and then goes to U0 state, if the link comes up properly.

Note: WarmReset LFPS signal must be detected in any state of Device LTSSM and must reset it to the same substate. It is expected to synchronize Host and Device in any condition.

If current link state is U0, the link stays in U0 state.

If the upstream port (Device) does not detect WarmReset LFPS signal, further actions depend on device behavior.

detectsubstate.png
Rx.Detect. Substate Machine. Figure 7-15 in USB Serial Bus 3.0 Specification Rev.1.0

The second instruction parameter, Synchronized, is only applicable to Terminations Off and Terminations On link states. If set to 1, the exerciser will start measuring the TerminationDelay time and subsequently applying the Off or On state only after all other commands in the pipeline are executed. If set to 0, it will start right away, potentially in parallel with other commands being executed. Default value is zero.

Example

Main
{
  # Send some packet.
Send TX_PACKET

  # Instructs LTSSM to jump to the Recovery state.
SetLinkState( RECOVERY )
  
  # Instructs LTSSM to jump to the U0 state.
SetLinkState( U0 )

  # Send the next packet.
Send TX_PACKET

  # Send the next packet.
Send TX_PACKET
}

Note on Removing/Applying VBUS: For Host Emulation in order to remove or apply VBUS to the link, use functions Host_RemoveVbus() and Host_ApplyVbus() defined in the HostVbus.ginc supplied in the Generation include folder.

Example

Main
{
    …
    # Remove Vbus
CallHost_RemoveVbus()

    # Keep Vbus off for 800 milliseconds
TxSleep( 800000000)

    # Apply Vbus
CallHost_ApplyVbus()
    …
}

SendTo_ComplianceMode (DUT_Mode)

To send the DUT into Compliance mode, call this method with the desired target DUT type. This is similar to if we supported a SetLinkState function, but handles the behavior differently depending on the target type (Host or Device).

This is defined in the file ComplianceMode.ginc in the Generation\Include folder.