George Nychis wrote: > I think you're right Jonathan, for performing carrier sense in the > FPGA, we really do not need it in dB. Calculating the average to > determine a threshold will get the job done with less the hassle.
You may want to implement two thresholds, one for rising power and one for falling (hysteresis), to avoid "switch bounce" when the power is right at the threshold. > ...and the host can decide how many RSSI samples it wants to compute > the threshold on. If you implement an FPGA block to calculate the trailing-"n" sample average, you'll need to use memory to store the samples in a ring buffer. Much more efficient is to implement an exponential averager, which only needs to keep track of the previous averager output. (This is what the existing rssi.v does.) If the time constant (~16 us) is not correct for what you need, you can either modify the hardcoded shift, or implement a programmable shifter. That would at least let the user have some selection from a small number of fixed values. To make a completely generic one, you'd have to use two multipliers, which the USRP1 doesn't have (but the USRP2 will.) -- Johnathan Corgan Corgan Enterprises LLC http://corganenterprises.com _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio