WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2007-Oct-10 11:00:55

baldeeshk
Member
Registered: 2007-Oct-10
Posts: 10

Packet Detector Initialization

Hi

A quick question regarding the initialization of the packet detection block.  Is the following piece of code (taken from the warpmac.c) enough to initialize to the packet detector in isolation?

Thanks,

Code:

*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_csma_enableBusy_OFFSET)) =1;
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_csma_enableIdle_OFFSET)) =1;
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_masterReset_OFFSET)) = 1;
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_detectionMask_OFFSET)) = 0;/*2*/; /*3= Radios 1 and 2 **needs help** */
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_detectionMode_OFFSET)) = 1; /*0 = AND, 1 = OR */
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_resetDuration_OFFSET)) = 32;
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_avgLen_OFFSET)) = 16;
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_avgThresh_OFFSET)) = 7000; /*7000 */
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_csma_avgThresh_OFFSET)) = 10000;/*7000 */
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_csma_difsPeriod_OFFSET)) = 625;
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_masterReset_OFFSET)) = 0;
*((volatile unsigned int *)(XPAR_OFDM_PKTDETECTOR_MIMO_OPBW_0_BASEADDR+ofdm_pktDetector_mimo_pktDet_reset_OFFSET)) = 0;

Offline

 

#2 2007-Oct-10 11:24:34

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

Re: Packet Detector Initialization

Yep, that should be it. The updated warpmac.c changed the format of the calls (using the pktDetector's driver; see below), but the result is the same.

Code:

		
ofdm_pktDetector_mimo_WriteReg_csma_enableBusy(PKTDET_BASEADDR, 1);
ofdm_pktDetector_mimo_WriteReg_csma_enableIdle(PKTDET_BASEADDR, 1);
ofdm_pktDetector_mimo_WriteReg_pktDet_masterReset(PKTDET_BASEADDR, 1);
ofdm_pktDetector_mimo_WriteReg_pktDet_detectionMask(PKTDET_BASEADDR, 1); //1 = radio slot 2
ofdm_pktDetector_mimo_WriteReg_pktDet_detectionMode(PKTDET_BASEADDR, 1); //0 = AND, 1 = OR
ofdm_pktDetector_mimo_WriteReg_pktDet_resetDuration(PKTDET_BASEADDR, 32);
ofdm_pktDetector_mimo_WriteReg_pktDet_avgLen(PKTDET_BASEADDR, 16);
ofdm_pktDetector_mimo_WriteReg_pktDet_avgThresh(PKTDET_BASEADDR, 7000);
ofdm_pktDetector_mimo_WriteReg_csma_avgThresh(PKTDET_BASEADDR, 16000);
ofdm_pktDetector_mimo_WriteReg_csma_difsPeriod(PKTDET_BASEADDR, 625);
ofdm_pktDetector_mimo_WriteReg_pktDet_masterReset(PKTDET_BASEADDR, 0);
ofdm_pktDetector_mimo_WriteReg_pktDet_reset(PKTDET_BASEADDR, 0);

Offline

 

Board footer