Changes between Version 6 and Version 7 of WARPLab/Reference/TriggerManager/TriggerProcessor


Ignore:
Timestamp:
Oct 20, 2015, 4:54:31 PM (9 years ago)
Author:
welsh
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WARPLab/Reference/TriggerManager/TriggerProcessor

    v6 v7  
    88 * MATLAB:
    99  * [source:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_trigger_manager_proc.m wl_trigger_manager_proc] class
     10  * [source:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_trigger_eth_udp_broadcast.m wl_trigger_eth_udp_broadcast] class
    1011 * WARP Hardware:
    1112  * [source:ResearchApps/PHY/WARPLAB/WARPLab7/Sysgen_Reference/w3/warplab_trigger_proc warplab_trigger_proc] peripheral
     
    8384
    8485
     86== Ethernet Triggers ==
     87
     88An Ethernet Trigger is a specially formatted WARPLab Ethernet message in which the [wiki:WARPLab/Reference/Architecture/WireFormat#UnicastTransportHeader WARPLab Transport Header] packet type is of type "TRIGGER" and the data directly after the transport header is the ID of the Ethernet trigger.  In WARPLab, only broadcast transports (i.e. [source:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_transport_eth_udp_java_bcast.m Java] and  [source:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_transport_eth_udp_mex_bcast.m MEX] broadcast transports) support "TRIGGER" messages. 
     89
     90The [source:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/classes/wl_trigger_eth_udp_broadcast.m Broadcast Ethernet Trigger] is a class that is used to send an Ethernet Trigger to multiple boards using a broadcast Ethernet packet (i.e. it will send the Trigger to all nodes "simultaneously"; NOTE:  There can be jitter between when Ethernet triggers are received even with WARP nodes on the same switch.  To synchronize the triggering between nodes, it is best to use [wiki:WARPLab/Examples/nodeSync external triggers]).  To create a Broadcast Ethernet Trigger, one must be instantiated:
     91{{{
     92% Create a UDP broadcast trigger
     93eth_trig = wl_trigger_eth_udp_broadcast;
     94}}}
     95This will create a Broadcast Ethernet Trigger with a unique ID.  A maximum of 32 Broadcast Ethernet Triggers can be created in order to guarantee that the Ethernet Trigger IDs are unique.
     96
     97Once an Broadcast Ethernet Trigger has been created, then the Trigger Manager must be used to "sensitize" the node to that Ethernet Trigger ID:
     98{{{
     99% Tell each node to be ready for an Ethernet Triger that has the given ID
     100wl_triggerManagerCmd(nodes, 'add_ethernet_trigger', [eth_trig]);
     101}}}
     102
     103Once a node has been "sensitized" to the given Ethernet Trigger, we can use the {{{send()}}} command to send the broadcast Ethernet packet containing the Ethernet Trigger:
     104{{{
     105% Send the Ethernet Trigger to all nodes
     106eth_trig.send();
     107}}}
     108
     109To "de-sensitize" a node to an Ethernet Trigger, the given Ethernet Trigger can be deleted or all Ethernet Triggers can be removed
     110{{{
     111% Tell each node to not trigger on an Ethernet Triger that has the given ID
     112wl_triggerManagerCmd(nodes, 'delete_ethernet_trigger', [eth_trig]);
     113
     114% Tell each node to remove all Ethernet Triggers
     115wl_triggerManagerCmd(nodes, 'clear_ethernet_triggers');
     116}}}
     117
    85118
    86119== Examples ==