Hi Hugh,
It should happen faster than that. I suspect the call to SetBit or ClearBit should take 1~2us and the bit out of SnapAmp should be changed by the time the call returns.
The SetBit Function ultimately does:
WriteSnapAmp(SNAP0+SNAP_SET_BIT,1<<(bit-N_BITS-N_VIRTUAL_BITS-16));
Which calls this. WriteSnapAmpNoDelay writes the data quickly to KFLOP's FPGA then delays 90 DSP cycles (0.45us) for KFLOP's FPGA to transmit the data to SnapAmp's FPGA. If you are careful to avoid a new write (or read) to SnapAmp too quickly you can optimize it a bit more.
void WriteSnapAmp(int add, int data)
{
WriteSnapAmpNoDelay(add,data); // this is
non-interruptable
asm(" NOP 9");
asm(" NOP 9");
asm(" NOP 9");
asm(" NOP 9");
asm(" NOP 9");
asm(" NOP 9");
asm(" NOP 9");
asm(" NOP 9");
asm(" NOP 9");
asm(" NOP 9");
}
Regards
TK
| Group: DynoMotion |
Message: 9335 |
From: Hugh Sontag |
Date: 3/18/2014 |
| Subject: Re: SnapAmp I/O bit rate |
Thanks, Tom. I wasn't aware that KFLOP copied the changed state to the SnapAmp that quickly.
Hugh
| |