Hi Brian,
bpadalino wrote:Before going to bed last night I was thinking about this problem along with the long term time slipping.
You had asked how the bladeRF would make a GPS disciplined counter. The idea is that the VCTCXO would be GPS disciplined. This feeds the Si5338 PLL which would generate the RXCLOCK for ADC sampling as well as the REF for the RXRFPLL. The RXCLOCK would be used to count samples against the 1pps signal coming into the FPGA as well. Basically the FPGA has clock-to-clock granularity that would be able to be exploited for your precise timing you require.
I am not yet that deep into BladeRF, so I will always ask straight ahead; the RXClock can count the samples, which are recorded signals, does it? For me it is not yet obvious how bladerf does things and what can be "accessed" before the however changed signals will be sent via the usb to a PC. So, it is possible to access the signal stream during some points/pins in the signal chain? Or is the counting only triggered by the same clock as is the sample rate?
I hope I didn't keep you awake with my stupid project!
For me it is also important not only to drive a counter, but also to readout this counter to store those values in between a 1pps period, so that I can do sub second measurements. But for this, I need to get this "time stream" and it has to be anchored to the data stream.
bpadalino wrote:As for the long term time slip against units, what if every sampleset started at the next 1pps? That way every time the GPS was locked and a 1pps went off, you would get a new sampleset for that next second. You could stitch together seconds against different observations, but over long term collection, you would get a bunch of samplesets with one less or one more sample than the nominal value, but you could at least be guaranteed that each second was started exactly.
That would be a work around, as long as it keeps both streams, the rx stream sample and the time stream sample, referenced, somehow. But for better file management, longer streams would be better

. And of course even with a 1 second sample, it should also contain sub second time tags.
bpadalino wrote:Would that be helpful? Could that help solve some of your issues? Being within 10ns of UTC sounds pretty good for a 1pps. Which GPS unit are you using with that? I just bought myself some Trimble Resolution T's and they claim 15ns I believe, which I thought was spectacular.
I bought this
http://www.adafruit.com/products/746 but they basically resell a version 3 MTK3339. We bought it, because it served our current needs

.
bpadalino wrote:To test the system's group delay through the chain, you could hook up both the bladeRF and an RF generator (Agilent E4438C Arb?) to the 1pps signal from the GPS. And have that 1pps trigger a known data sequence to be transmitted. Then when the bladeRF thought sample 0 was coming out, you could try to correlate for your known transmission. Subtract off the length of the sequence transmitted, and you have the delay of the system from the antenna port to the ADC with reference to the 1pps. That delay should be constant between units or at least very close. The major differentiating factor would be the low-pass filters in the LMS6002D. Those change over bandwidth.
I don't have access to an Rf generator, yet. But when the last questions are answered, I think I will have to find one

.
bpadalino wrote:What do you think of those ideas? The code hasn't been written for the 1pps disciplining yet, but now that I have my Trimble's, it should hopefully not be too long before that is handled.
Let me know your thoughts and if all of this made sense. If not, I can try to clarify.
Made sense. I still need to get more information, what and how I can access the signal (still analogue intensities for one center frequency)or already digitized). I would like to help here, but I am stil not sure how to "merge" both streams I need to have.
Thanks a lot so far!
I will just try to give a sketch, what I intend.
A) 0,1,2,3,4,5,6,7,8,9,...
B) 0,1,0,1,1,0,1,0,0,1,...
C) -,x,-,-,o,-,-,x,-,-,x,-,-,o,-,-,x...
There are three streams we have to consider.
A) is your sampling of the signal. The sampling rate shall be constant (for the given scan). It can be locked to an external GPS or other synch clock. That would be beneficial.
B) is the received signal stream. here, it is binary, but it could also be analogue. it is the sampled signal, so that is why stream A is important to know.
C) is the time stream. x's are the sub second tags stored in it. the time tags don't need to be stored with every sample in A) because it has a linear behaviour and we can interpolate it and fill the gaps. the o's are time tags of the 1pps by gps. so they are also stored, but they are the most accurate, because the sub second tags are provided by the counter which can be considered less precise. Further more the GPS can provide the fill UTC time with YYYY.MM.DD. hh-mm-ss, which is need for later data processing. but this can be stored else where and only the ss and perhaps mm parts are important here. It also allows to have another rate of the stream than the sample rate, because samling is done with at least twice as high frequency as what had been received. The only thing to be sure here is that the time stream sampling rate is also a full factor and having the same start time of one (out of x samples) as stream A). This avoids strange drifting.
So, if you have B) and C) as independent streams stored somewhere, it is required that they can still be correlated, so for example, that for sample 6, is is bit 1 and a sub second x. So it would be great to use some output pin of the bladerf for perhaps registering what B) stream value was there in this sample, or perhaps already inject stream C) into stream B) and multiplex it, so that both are kept together even during the usb transfer.
This is why I want to do as much as possible on the board to reduce strange hick-ups by the PC.
Is there a documented pin layout?
Best regards,
Andreas