WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2014-Oct-18 07:25:34

Tomi
Member
Registered: 2014-Oct-17
Posts: 58

question on FlowConfigCBR(dest_addr, size, interval, duration)

I read the example named log_capture_two_node_low_py and I have a question about this script.

************************************************
print("\nStart LTG - STA -> AP")
# Start a flow from the STA's local traffic generator (LTG) to the AP
#  Set the flow to 1400 byte payloads, fully backlogged (0 usec between new pkts), run forever
#  Start the flow immediately
sta_ltg_id = n_sta.ltg_configure(wlan_exp_ltg.FlowConfigCBR(n_ap.wlan_mac_address, 1400, 0, 0), auto_start=True)

# Let the LTG flows run at the new rate
time.sleep(TRIAL_TIME)
************************************************

What is the meaning of "0 usec between new pkts"? Does it mean STA will transmit packets to AP without stop? If we set TRIAL_TIME to 10 minutes, does it mean STA will transmit pakcets to AP for 10 minutes without any stop, and during this period, no ACK will be feedbacked from AP to STA? The ACK will only be sent when this continuous transmission finished?

Last edited by Tomi (2014-Oct-18 07:26:56)

Offline

 

#2 2014-Oct-18 10:39:46

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: question on FlowConfigCBR(dest_addr, size, interval, duration)

The LTG framework generates packets which are inserted into Tx queues. These are the same queues used for all wireless transmissions (management pkts, data from Etherhet, etc.). The LTG schedule controls the rate at which packets are en-queued. Setting the interval argument to 0 tells the LTG framework to generate a new packet every time the LTG scheduler fires, currently every 100usec (I think - Chris or Erik will correct me here if not). If the target queue for an LTG packet is full no new packet is created. Thus, setting interval=0 will quickly fill the target queue, resulting in fully-backlogged traffic to the target node.

Packets are de-queued from the Tx queues one at a time and passed down to CPU Low for processing by the DCF and eventual transmission. The DCF state machine treats LTG packets like any other MPDU. Unicast MPDUs wait for ACKs and re-transmit on timeouts; broadcast MPDUs don't. The interval of the LTG (the minimum interval at which LTG packets are enqueued) does not affect how the DCF handles the LTG packets.

Offline

 

#3 2014-Oct-18 12:51:16

Tomi
Member
Registered: 2014-Oct-17
Posts: 58

Re: question on FlowConfigCBR(dest_addr, size, interval, duration)

Thank you very much for your detailed explanation. Now I understood the meaning of LTG interval.

Sorry, as I’m a new Python user, I have few more questions about the python files:
(1)
***********************************************
print("\nStart LTG - AP -> STA")
# Start a flow from the AP's local traffic generator (LTG) to the STA
#  Set the flow to 1400 byte payloads, fully backlogged (0 usec between new pkts), run forever
#  Start the flow immediately
ap_ltg_id  = n_ap.ltg_configure(wlan_exp_ltg.FlowConfigCBR(n_sta.wlan_mac_address, 1400, 0, 0), auto_start=True)

# Let the LTG flows run at the new rate
time.sleep(TRIAL_TIME)

print("\nStart LTG - STA -> AP")
# Start a flow from the STA's local traffic generator (LTG) to the AP
#  Set the flow to 1400 byte payloads, fully backlogged (0 usec between new pkts), run forever
#  Start the flow immediately
sta_ltg_id = n_sta.ltg_configure(wlan_exp_ltg.FlowConfigCBR(n_ap.wlan_mac_address, 1400, 0, 0), auto_start=True)
   
# Let the LTG flows run at the new rate
time.sleep(TRIAL_TIME)
***********************************************

For the first 30 seconds, AP transmits packets to STA, so
write_log_file(AP_HDF5_FILENAME,n_ap.log_get_all_new(log_tail_pad=0)) logs the Tx data of AP. Then time.sleep(TRIAL_TIME) terminates AP’s transmission. For the following 30 seconds, STA transmits packets to AP, so write_log_file(STA_HDF5_FILENAME, n_sta.log_get_all_new(log_tail_pad=0)) logs the Tx data of STA. All the data in the Tx logs are (PHY header + MAC hearder + LTG payload), rather than LTG payload only. Is my understanding correct?

If yes, are there any functions provide in the wlan_exp log folder can log the Rx data? Here I need the Rx data before Viterbi decoding, which means in the format (PHY header + MAC hearder + LTG payload), rather than decoded LTG payload.

(2) For a Tx/Rx log file, I wanna analyze its content in detail. For example, the timestamp value, node id information, PHY header part, MAC header part, etc. I wanna know the exact Tx/Rx time for each packet. Are there any functions provide in the log folder can do this kind of work?

Thank you in advance.

Offline

 

#4 2014-Oct-18 13:19:00

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: question on FlowConfigCBR(dest_addr, size, interval, duration)

A few clarifications-
-The event log at each node contains all Tx and Rx events seen by CPU High at that node, including (but not only) LTG Tx/Rx events

-LTGs are terminated with the 'node.ltg_stop(ltg_id)' method. The 'time.sleep()' calls only pause execution of the python script and do not affect any state at the nodes.

-By default only the MAC header and LTG headers are logged for each Tx/Rx event. To enable full payload logging you must call 'node.log_configure(log_full_payloads=true)'. However the LTG payloads are arbitrary; each LTG payload will be whatever data was left in the Tx queue entry where the LTG packet was created (i.e. the LTG code does not write any payload, it just sets the length and uses whatever data is already in DRAM).

-If you call 'node.log_get_all_new(log_tail_pad=0))' once it will fetch all log data from the node, starting from when the log was last reset (either from boot or when you last called node.reset_all())

Here I need the Rx data before Viterbi decoding, which means in the format (PHY header + MAC hearder + LTG payload), rather than decoded LTG payload.

The values before the decoder are not written to memory. The decoder inputs are soft bit values (log-likelihood ratios) calculated by the PHY's demodulation block.

The PHY header, MAC header and LTG payload are all post-decoder values. These bytes are the contents of the Rx packet passed up from CPU Low to CPU High for each reception.

(2) For a Tx/Rx log file, I wanna analyze its content in detail. For example, the timestamp value, node id information, PHY header part, MAC header part, etc. I wanna know the exact Tx/Rx time for each packet. Are there any functions provide in the log folder can do this kind of work?

Yes, these values are all included in the logs. See the txrx_log_analysis example for a good starting point. The full description of each log entry type is documented in the ref design user guide: /802.11/wlan_exp/log/entry_types.

Offline

 

#5 2014-Oct-20 01:18:45

Tomi
Member
Registered: 2014-Oct-17
Posts: 58

Re: question on FlowConfigCBR(dest_addr, size, interval, duration)

Thanks for your detailed explanation.

Today I studied txrx_log_analysis example and /802.11/wlan_exp/log/entry_types, and got few more questions:

(1) What's the difference between "TX and TX_LTG"?
The descriptions of these two enties are the same, and the fields defined in them are also the same. The only difference is the data type. I cannot understand their difference.

And in log_process_details.py, "TX and TX_LTG" are merged into "TX", why this kind of operation is needed?

I have the same question on "TX_LOW and TX_LOW_LTG", "RX_OFDM and RX_OFDM_LTG".

(2) Currently, RX_DSSS, RX_OFDM and RX_OFDM_LTG entries will only be created for packets that are passed to the high-level MAC code in CPU High. If the low-level MAC filter drops the packet, it will not be logged. How can I get the log which ensures the low-level MAC filter is configured to pass all receptions up to CPU High?

(3) Currently, the step for timestamp is 1μs. Can the entries support the step in 0.1μs? That's to say, get more precise timestamp values, for example [2085429.3μs  2087330.4μs  2088125.9μs ..., 32098099.6μs 32100631.7μs 32101462.1μs]?

Thank you in advance for your help.

Last edited by Tomi (2014-Oct-20 02:44:24)

Offline

 

#6 2014-Oct-20 09:12:39

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: question on FlowConfigCBR(dest_addr, size, interval, duration)

1) If you look, the 'mac_payload' length is different for the LTG vs non-LTG entries (ie 44 bytes vs 24 bytes, as of release 0.96).  This stems from the fact that non-LTG entries only contain the MAC header, while the LTG entries contain the MAC header plus the ltg_packet_id.

In order to differentiate LTG vs non-LTG log entries, there are different entry types.  However, sometimes we want to just "process all TX packets" and do not care about the extra information contained in LTG entries.  Since LTG entries are a strict superset of non-LTG entries, it is easy to merge the entries together so that all entries can be processed at once.  In log_process_details.py, since we are trying to get TX and RX details from the log, we merge the LTG and non-LTG entries together for a given type (ie we merge TX and TX_LTG; RX_OFDM and RX_OFDM_LTG; etc.)  Just note, that when you merge entries, you should only use the subset of fields that are common to all the entries since those are valid for all the entries you merged. 

2) You can configure the filter between CPU low and CPU high with the set_low_to_high_rx_filter() command.

3) First, why do you need a more precise timestamp value?  Given the timeframes of 802.11, we did not see the benefit of a more precise timestamp but want to understand if there was something we missed.  Second, this would require a lot of work.  Currently, there is a microsecond counter that we use to timestamp everything.  You would need to modify the hardware design to increase the precision of this counter, then update every place that the value of that counter is used so that it deals with the new definition of the timer.

Offline

 

#7 2014-Oct-20 10:11:16

Tomi
Member
Registered: 2014-Oct-17
Posts: 58

Re: question on FlowConfigCBR(dest_addr, size, interval, duration)

Thanks for your detailed explanation. Now I understand the difference between LTG and non-LTG entries.

(1) Now I’m trying to make two nodes STA1 and STA2 always transmit simultaneously, with a time-offset no more than on one CP length (0.8μs). That’s why I need a more precise timestamp value. I want to ascertain that the simultaneous transmissions are indeed within-CP(0.8μs).

(2) We’re using 4 WARPv3 (3 STA, 1 AP) to evaluate some physical technologies. Currently, there are many entries in .hdf5 Tx/Rx log files. How can I extract actual PHY Tx/Rx streams from these entries? Because I want to convert those Tx/Rx streams into a .datb file, and then import the file into a Matlab program, in order to check the performance of preamble correlation, channel estimation, and so on.

Last edited by Tomi (2014-Oct-20 11:02:37)

Offline

 

#8 2014-Oct-22 19:39:18

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: question on FlowConfigCBR(dest_addr, size, interval, duration)

(1) Now I’m trying to make two nodes STA1 and STA2 always transmit simultaneously, with a time-offset no more than on one CP length (0.8μs). That’s why I need a more precise timestamp value. I want to ascertain that the simultaneous transmissions are indeed within-CP(0.8μs).

This is a challenging problem. Initiating transmissions from multiple nodes within the cyclic prefix may not work if you're relying on software polling the MAC timestamp to schedule transmissions. Timestamp offsets among nodes and jitter in the software execution will both contribute to offsets in the nodes' transmissions.

One alternative I would suggest exploring is to re-purpose the auto-tx logic in the MAC core. This logic is used to transmit ACK packets after the node receives a DATA packet with no bit errors. The standard requires the ACK be transmitted within ±10% of one slot (±0.9usec). Our implementation is even tighter than this, as the logic triggers the ACK transmission a fixed number of clock cycles after the DATA Rx completes.

You could re-use this logic to coordinate transmissions by multiple nodes, with each node transmitting in response to a particular packet reception. These transmissions should occur within a few clock cycles of each other (assuming the propagation time from the trigger-sending to each trigger-receiver is the same). The trigger packet could be anything- the conditions for starting the auto-tx are controlled from software. Take a look at frame_receive() in the DCF code to see how the auto-tx logic is setup for ACK transmissions.

(2) We’re using 4 WARPv3 (3 STA, 1 AP) to evaluate some physical technologies. Currently, there are many entries in .hdf5 Tx/Rx log files. How can I extract actual PHY Tx/Rx streams from these entries? Because I want to convert those Tx/Rx streams into a .datb file, and then import the file into a Matlab program, in order to check the performance of preamble correlation, channel estimation, and so on.

Look at the chan_est_viewer example - this demonstrates processing a raw log file for further processing in MATLAB.

Offline

 

Board footer