01-16-2007 09:18 AM
Hi everybody, I've got a PCI-5640R board.
I need to synchronize the DDC chain of this board with an external
asynchronous trigger, acquired from the TRIG_IN pin.I try to explain this in a better way: I'd like to acquire the
asynchronous trigger with a Timed Loop ("clocked" with RTSI=100MHz) and then to " reset" the generation of the clocks used to sample the analog signals from ADC_0 and ADC_1, that is, I'd like that all the rising edges of the clocks I use in the DDC chain should be synchronous with the rising edge of the trigger ( or at least with the rising edge of the RTSI clock that detect the rising edge of the trigger).This operation should be realized on the FPGA vi and not from the Host vi.I tried with a START SYNCHRONIZATION (see AD6654 data sheet, page 58) realized on the FPGA vi but I am not sure this is the better way...
Thanks in advance for your help
Best regards
Luca
01-29-2007 03:26 PM
01-31-2007 10:34 AM
Hi Jerry,
Let's start from the beginning:
Top level clock= configuration clock (20 MHz)
RTSI clock= 100 MHz, ADC0 clock=2MHz, ADC1 clock=20MHz
1. We acquired a trigger signal (Pulse Repetition Time = 1.056 ms typical, duty cycle = 0.1 %) with a SCTL running at 100 MHz.
2. When the trigger goes high we have to acquire 1 ms (< PRT of the trigger) from: ADC0 (2 MHz signal so 2000 samples) , ADC1 (20MHz signal so 20000 samples).
We tried to do this using global variables as control flags as you can see from the FPGA vi I attached. The problem is that sometimes it seems that the global variable that enable the acquisition inside the ADC1 SCTL is read with a delay of 4 samples. Should it be a problem of handshaking? How can we solve it?
The second problem is related with the former one: we want that the time delay that elaps from the rising edge of the trigger and the first sample from ADC1 and ADC0 should be as constant as possible. So we have thought that we had do a re-synchronization of the clocks. We have realized a vi that does this from the FPGA vi: it does what the "ADC read write register (multiple byte).vi " does....I attached it
In simple terms the vi we realized does a soft synchronization and it seems something happen but we are not sure of the results..
I hope I described our work in a better way...
Best regards
Luca, Emanuele
02-05-2007 03:45 PM
02-06-2007 04:22 AM
So, Total_dec_rate= 5*5*2=50 and the result in term of rejection is good
Anyway We attached the custom vi and the coefficents hmrcf_q, hdrcf_q, hcrcf2_q with q=quantized in the folder Data
Luca, Emanuele
02-06-2007 04:24 AM
02-06-2007 04:10 PM - edited 02-06-2007 04:10 PM
Message Edited by Jerry_L on 02-06-2007 04:11 PM
02-07-2007 10:18 AM - edited 02-07-2007 10:18 AM
Message Edited by Jerry_L on 02-07-2007 10:21 AM
02-08-2007 06:07 AM
Hi Jerry
This is great day for us.....the system works!!!!!!
Before I try to explain what we have done let me thank you for the time you spend trying to understand and solve our problems.
We had not seen your last replay but that is a sort of confirmation of what we did.
We solved our problem with global variables.... we don't use them all....
The FPGA.vi has been structured as follow:
a stack sequence with 2 frame: the former with the configuration timed loop but with RTSI=50MHz (we used this to set all the values from the host.vi like NCO freq.....etc ). The latter is a while loop with inside it another stack sequence with 3 frame:
the first is a SCTL with RTSI =50 MHz used to sample the trigger: when the system see a rising edge from the trigger the SCTL is stopped end the control goes to the next frame
this second frame is the most important one. Inside a SCTL we perform a Soft sync on the ADC clocks. The way we do this is similar to that we show you in the sub_vi "Soft_sync" we attached the first time. The only difference is that we no more use the global variable: we use directly the node to the registers like ADC_0_Microport_Addr and so on...the thing to pay attention is that we change the arbitration mode of this registers: from Arbitrate if multiple access only to Never arbitrate. The way you described in the post seems to be easier...maybe we'll try it.
the third frame has inside 2 parallel frame sequence with some frames: one for the ADC0 flow @ 2 MHz and one for the ADC1 flow @ 20 MHz
If you want we can send you the vi by mail, unfortunately we cannot post it
Thank you very much
Best regards
Luca, Emanuele