Changes between Version 2 and Version 3 of WARPLab/Reference/TriggerManager


Ignore:
Timestamp:
May 14, 2013, 11:35:37 AM (11 years ago)
Author:
welsh
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WARPLab/Reference/TriggerManager

    v2 v3  
    1010The Trigger Manager was designed to allow flexible coordination and communication between nodes.  Each trigger is assigned an ID and then all configuration of the trigger manager is based on these IDs.  By default, WARPLab has the following triggers:
    1111
    12 * Input
    13   * Ethernet
     12* Input Triggers
     13  * External Pins (For example:  D0 - D3, pins 12 - 15 on the [wiki:WARPLab/HardwareConfiguration#DebugHeader debug header] in the WARPLab reference design)
     14  * Ethernet Packets
     15  * Register writes (used for WARP v2 compatibility)
    1416  * Input Energy
    1517  * Automatic Gain Control (AGC) Done
    16   * Register writes (for WARP v2 compatibility)
    17   * External Pins (D0 - D3, pins 12 - 15 on the [wiki:WARPLab/HardwareConfiguration#DebugHeader debug header]).
    1818
    19 * Output
     19[[Image(Trigger_Input_Configuration.png)]]
     20
     21  '''NOTE:''' Each input has configuration options that can be found in the [wiki:WARPLab/Reference/Commands/TriggerManager Trigger Manager Command Reference].
     22
     23
     24* Output Triggers
     25  * External Pins (For example:  D0 - D3, pins 8 - 11 on the [wiki:WARPLab/HardwareConfiguration#DebugHeader debug header] in the WARPLab reference design)
    2026  * Baseband
    2127  * Automatic Gain Control (AGC) Start
    22   * External Pins (D0 - D3, pins 8 - 11 on the [wiki:WARPLab/HardwareConfiguration#DebugHeader debug header]).
    2328
    24 The Trigger Manager allows a node to output triggers based on a logical combination of events on the node as well as perform operations based on a logical combination of input triggers to the node. 
     29[[Image(Trigger_Output_Configuration.png)]]
    2530
    26 
    27 TODO: BLOCK DIAGRAM
    28 
     31  '''NOTE:''' Each output can be based on a configurable set of inputs as well as a logical combination of inputs.  The above diagram is replicated per trigger output, so that each one can have its own, independent configuration.
    2932
    3033
    3134== Hardware Setup ==
    3235
    33   The Trigger Manager consists of both a hardware block that runs within the FPGA and a [wiki:WARPLab/Reference/Commands/TriggerManager software framework] to configure and use the Trigger Manager.  You can see the instantiation of the Trigger Manager block as well as the default connections within the system.mhs file:
     36The Trigger Manager consists of both a hardware block that runs within the FPGA and a [wiki:WARPLab/Reference/Commands/TriggerManager software framework] to configure and use the Trigger Manager.  You can see the instantiation of the Trigger Manager block as well as the default connections within the system.mhs file:
    3437
    3538{{{
     
    6871
    6972
     73
    7074== Examples ==
    7175
    72 In our example, we have two nodes, a transmitter ( nodes(1) ) and a receiver ( nodes(2) ):
     76In our examples, we have two nodes, a transmitter ( nodes(1) ) and a receiver ( nodes(2) ):
    7377
    74 * Create a UDP broadcast trigger and primary node to be ready for it
     78* Create a UDP broadcast trigger and trigger the transmitting node with the Ethernet packet
    7579{{{
    7680eth_trig = wl_trigger_eth_udp_broadcast;
    77 }}}
    78 
    79 * Trigger the transmitting node with an Ethernet trigger
    80 {{{
    8181nodes(1).wl_triggerManagerCmd('add_ethernet_trigger',[eth_trig]);
    8282}}}
     
    8888[T_OUT_BASEBAND, T_OUT_AGC, T_OUT_D0, T_OUT_D1, T_OUT_D2, T_OUT_D3] = wl_getTriggerOutputIDs(nodes(1));
    8989}}}
    90   '''NOTE:'''  These trigger IDs will be the same for all nodes in the system unless modified by the user.
     90  '''NOTE:'''  These trigger IDs will be the same for all nodes in the system and should not be modified by the user.
    9191
    92 * For the transmit node, we will allow Ethernet to trigger the buffer baseband, the AGC, and Trigger output 0 (which is mapped to pin 8 on the [wiki:WARPLab/HardwareConfiguration#DebugHeader debug header])
     92* For the transmit node, allow Ethernet to trigger the buffer baseband, the AGC, and Trigger output 0 (which is mapped by default in the WARPLab reference design to pin 8 on the [wiki:WARPLab/HardwareConfiguration#DebugHeader debug header])
    9393{{{
    9494nodes(1).wl_triggerManagerCmd('output_config_input_selection',[T_OUT_BASEBAND,T_OUT_AGC,T_OUT_D0],[T_IN_ETH,T_IN_REG]);
     
    9696  '''NOTE:'''  We use both {{{T_IN_ETH}}} and {{{T_IN_REG}}} so this example is compatible with both WARP v2 and WARP v3 hardware.  If using WARP v3 hardware, only {{{T_IN_ETH}}} is needed as the source of the trigger.
    9797
    98 * For the receive node, if we want to allow the energy detector to trigger the buffer baseband and AGC core:
     98
     99* For the receive node, allow the energy detector to trigger the buffer baseband and AGC core:
    99100{{{
    100101nodes(2).wl_triggerManagerCmd('output_config_input_selection',[T_OUT_BASEBAND,T_OUT_AGC],[T_IN_ENERGY]);
    101102}}}
    102   and then setup the configuration of the energy monitoring:
     103  Then enable the hold mode for the triggers driven by energy detection. This will prevent the buffer from being overwritten before we have a chance to read it:
    103104{{{
     105nodes(2).wl_triggerManagerCmd('output_config_hold_mode',[T_OUT_BASEBAND,T_OUT_AGC],'enable');
     106}}}
     107  Then get the IDs for the interfaces on the board and setup the configuration of the energy monitoring:
     108{{{
     109[RFA,RFB] = wl_getInterfaceIDs(nodes(2));
     110
    104111rssi_sum_len = 15;
    105112
     
    109116nodes(2).wl_triggerManagerCmd('energy_config_interface_selection',RFA+RFB);
    110117}}}
     118  Finally, when done processing, we can clear the energy detection trigger since it is holding the output due to setting the {{{'output_config_hold_mode'}}}
     119{{{
     120nodes(2).wl_triggerManagerCmd('output_state_clear',[T_OUT_BASEBAND,T_OUT_AGC]);
     121}}}
    111122
    112 * For the receive node, if we connect trigger output 0 (pin 8 of the [wiki:WARPLab/HardwareConfiguration#DebugHeader debug header]) of the transmit node to trigger input 3 (pin 15 of the [wiki:WARPLab/HardwareConfiguration#DebugHeader debug header]) of the receive node, then we can allow trigger input 3 to trigger the buffer baseband and the AGC:
     123* For the receive node, allow trigger input to trigger the buffer baseband and the AGC (this example assumes the WARPLab reference design configuration where we should connect trigger output 0, pin 8 of the [wiki:WARPLab/HardwareConfiguration#DebugHeader debug header], of the transmit node to trigger input 3, pin 15 of the [wiki:WARPLab/HardwareConfiguration#DebugHeader debug header], of the receive node):
    113124{{{
    114125nodes(2).wl_triggerManagerCmd('output_config_input_selection',[T_OUT_BASEBAND,T_OUT_AGC],[T_IN_D3]);
     
    124135  '''NOTE:''' The 50 ns delay was measured using the oscilloscope.  The procedure can be found here (Coming soon ...). 
    125136
    126 * If we want to clear the triggers on the receiver, we can:
    127 {{{
    128 nodes(2).wl_triggerManagerCmd('output_state_clear',[T_OUT_BASEBAND,T_OUT_AGC]);
    129 }}}
    130 
    131137
    132138== Getting Help ==
     
    136142
    137143
    138 == Tips ==
    139 
    140 Coming soon ...
    141144
    142145
    143146
    144147
    145 
    146