
Page 31
By using the inline versions of the
/ew
and
/es
commands, we can adjust the event generation for individual
ports and the selection of triggers to generate waveforms on individual recorders.
For example, we could write:
@1 (/ew e)
An event is generated when an EEP is seen on SpaceWire port 1.
@1 (/ew et)
A port 1 event is output when time codes and end-of-packet markers arrive.
@1 (/es 12)
Generate an error waveform for port 1 when events are seen on ports 1 or 2.
@0 (/es 1)
Output a pulse on SMA connector pair J5-J6 for events on port 1.
@0 (/es B)
Output a pulse on SMA connector pair J5-J6 when a rising edge is seen on
SMA J3-J4.
@1 (/es )
Don’t capture a waveform on port 1, despite any event triggers received.
The delta versions of these commands may be issued, as illustrated above. We suggest that familiarisation with
the Error Waveform feature is gained with the
SpWIO
program before using it from a C program.
Running
java -jar SpWIO.jar
without any parameters will display a table of values suitable for inclusion in the
/ew
and
/es
parameters.
12
Option SO – Synchronised Outputs
For some applications it is necessary to generate two or more signals closely aligned in time, or with controlled
delays - such as testing arbitration in a routing switch. Option SO provides this capability. Delays may be
introduced to test the timeout detection function of a SpaceWire link. One or several or all ports may be
synchronised, each with its own delay.
We use the techniques developed by 4Links for low/zero jitter time codes to synchronize a bit edge to the same
clock edge across all of the ports involved. The skew between ports is factored out by the DSI and is well below 1
ns. The synchronization technique holds the D and S lines of the SpaceWire link unchanged for short periods, and
this can cause the link to exceed the SpaceWire standard’s link timeout period if the link speed is too low. It is
recommended that a link speed of 100Mb/s (or greater) be utilised with the Synchronized Outputs option. If the
link disconnects during a particular experiment, its link speed should be increased.
The process of synchronization is similar to a race in which those wishing to compete first join the list of
competitors. Each then moves to a starting barrier and as soon as all are assembled the barrier is lifted and
everyone starts at the same time.
Each port wishing to synchronize must be sent an
EtherSpaceLink_JOIN
character; this is good for any
number of synchronizations. Any port that no longer wishes to synchronize must be sent an
EtherSpaceLink_RESIGN
character.
Having joined, the port is sent data which is transmitted normally until a
EtherSpaceLink_BARRIER
character reaches the head of the queue. At this time the port sends NULLs whilst waiting for the other ports to
reach the barrier. When the number of ports waiting on the barrier equals the number of ports that JOINed the