Click or drag to resize

12.5.3.3 Flow-Control using Labels within the current Command List

Certain Flow-Control Commands accept labels for their target definitions, instead of numerical index positions of target commands within the current command list.

This is intended to make life easier for users who write custom applications based on the SP-ICE-3 ClientLib, particularly for those who need to implement forward references from Branch commands to the locations of as yet undefined target commands, or who need to use complex flow-control paths within a given list.

Note  Note

Please be aware that the Branch-To-Label facility is, in effect, syntactic sugar, and that Labels are valid only:

  • within the current local CommandList, and

  • while that list is being filled with Commands, and

  • before it is transferred to the SP-ICE-3 Card.

It is not possible to refer to any Label defined outside the current list, nor can any Labels be retrieved from a list which has already been transferred to the card via ListAPISet(someListID, myList).

When ListAPISet is called, it implicitly resolves all existing Labels, and any Branch Commands which refer to them, before transferring the list to the card.

Defining a Branch To Label within the current list

Here are some examples of Branch-to-Label commands: there are several more in addition to those mention here.

ListAPI Method

SP-ICE-3 Command

AppendBranchToLabel(String)

BRANCH_ABS

AppendBranchToLabel(String, UInt32, IOPort, Boolean, Boolean, UInt32)[COND]

BRANCH_ABS_COND

Defining a Target Label within the current list

ListAPI Method

SP-ICE-3 Command

AppendLabel

There is no low-level command corresponding to the label definition: see above .

See Also