Changes between Version 2 and Version 3 of WARPLab/Reference/TriggerManager
- Timestamp:
- May 14, 2013, 11:35:37 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WARPLab/Reference/TriggerManager
v2 v3 10 10 The 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: 11 11 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) 14 16 * Input Energy 15 17 * 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]).18 18 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) 20 26 * Baseband 21 27 * Automatic Gain Control (AGC) Start 22 * External Pins (D0 - D3, pins 8 - 11 on the [wiki:WARPLab/HardwareConfiguration#DebugHeader debug header]).23 28 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)]] 25 30 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. 29 32 30 33 31 34 == Hardware Setup == 32 35 33 36 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: 34 37 35 38 {{{ … … 68 71 69 72 73 70 74 == Examples == 71 75 72 In our example , we have two nodes, a transmitter ( nodes(1) ) and a receiver ( nodes(2) ):76 In our examples, we have two nodes, a transmitter ( nodes(1) ) and a receiver ( nodes(2) ): 73 77 74 * Create a UDP broadcast trigger and primary node to be ready for it78 * Create a UDP broadcast trigger and trigger the transmitting node with the Ethernet packet 75 79 {{{ 76 80 eth_trig = wl_trigger_eth_udp_broadcast; 77 }}}78 79 * Trigger the transmitting node with an Ethernet trigger80 {{{81 81 nodes(1).wl_triggerManagerCmd('add_ethernet_trigger',[eth_trig]); 82 82 }}} … … 88 88 [T_OUT_BASEBAND, T_OUT_AGC, T_OUT_D0, T_OUT_D1, T_OUT_D2, T_OUT_D3] = wl_getTriggerOutputIDs(nodes(1)); 89 89 }}} 90 '''NOTE:''' These trigger IDs will be the same for all nodes in the system unlessmodified 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. 91 91 92 * For the transmit node, we will allow Ethernet to trigger the buffer baseband, the AGC, and Trigger output 0 (which is mappedto 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]) 93 93 {{{ 94 94 nodes(1).wl_triggerManagerCmd('output_config_input_selection',[T_OUT_BASEBAND,T_OUT_AGC,T_OUT_D0],[T_IN_ETH,T_IN_REG]); … … 96 96 '''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. 97 97 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: 99 100 {{{ 100 101 nodes(2).wl_triggerManagerCmd('output_config_input_selection',[T_OUT_BASEBAND,T_OUT_AGC],[T_IN_ENERGY]); 101 102 }}} 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: 103 104 {{{ 105 nodes(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 104 111 rssi_sum_len = 15; 105 112 … … 109 116 nodes(2).wl_triggerManagerCmd('energy_config_interface_selection',RFA+RFB); 110 117 }}} 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 {{{ 120 nodes(2).wl_triggerManagerCmd('output_state_clear',[T_OUT_BASEBAND,T_OUT_AGC]); 121 }}} 111 122 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): 113 124 {{{ 114 125 nodes(2).wl_triggerManagerCmd('output_config_input_selection',[T_OUT_BASEBAND,T_OUT_AGC],[T_IN_D3]); … … 124 135 '''NOTE:''' The 50 ns delay was measured using the oscilloscope. The procedure can be found here (Coming soon ...). 125 136 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 131 137 132 138 == Getting Help == … … 136 142 137 143 138 == Tips ==139 140 Coming soon ...141 144 142 145 143 146 144 147 145 146