WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2015-May-08 02:23:32

chencheng
Member
Registered: 2015-May-08
Posts: 16

The format of FPGA of AGC thresholds

Hi, I am confused by the format of FPGA. The theresholds in the API manual is an integer number like -30, -90. But in real code, why format must be changed ? Do I have to always change the format like the code in warplab 5.2 below ?  How about warplab 7 ?


Code:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Set AGC tresholds
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Change format of Thresholds so they can be correctly understood by
    % the FPGA:
    Node1_Rx_Thresholds = uint32(Nodes12_Rx_SITrain_Thresh3_Vec(index_Total_NumberOfTxPowers)+2^8)*2^16+...
        uint32(Nodes12_Rx_SITrain_Thresh2_Vec(index_Total_NumberOfTxPowers)+2^8)*2^8+...
        uint32(Nodes12_Rx_SITrain_Thresh1_Vec(index_Total_NumberOfTxPowers)+2^8);

    warplab_setAGCParameter(udp_node1,SET_AGC_THRESHOLDS, Node1_Rx_Thresholds);

Last edited by chencheng (2015-May-08 02:24:13)

Offline

 

#2 2015-May-08 07:22:15

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

Re: The format of FPGA of AGC thresholds

This is similar to my other response about bit slicing a 32 bit word to contain multiple fields. 

For WARPLab 5.2, you need to follow this formatting, otherwise the values will not be interpreted correctly.  In WARPLab 7, the same type of constraints exist but they are now done "under the hood" (i.e. they are implemented in the function call itself vs having to be explicitly done by the user).  This was to make the interface easier to use.  For example, you can see the slicing of the node response to have easier to interpret values here.  When in doubt, just follow the command documentation.

In general, we recommend using the latest version of WARPLab since there have been many improvements over older versions.

Offline

 

#3 2015-May-09 20:52:54

chencheng
Member
Registered: 2015-May-08
Posts: 16

Re: The format of FPGA of AGC thresholds

Thank you very much.

Offline

 

Board footer