Dear all,

I'm having the following issue with the snapshot block: I'm trying to control the snapshot using a trigger, so that bram is only overwritten when the trigger has a rising edge. For this I put the snapshot block in circular capture mode, and I connect a register to the 'trig' and 'stop' inputs, with the stop signal one clock delayed. As I understand the block, when I trigger the register the snapshot should start writing in memory, because I'm activating stop right after, the memory should be written only once. However when I test my model I get different data every time I read the snapshot. This is a minimal example of what I want to do:

import corr, time
import numpy as np
import matplotlib.pyplot as plt

fpga = corr.katcp_wrapper.FpgaClient('192.168.1.12')
time.sleep(1)
fpga.progdev('adc_sync.bof.gz')

fpga.write_int('snap_trig', 0)
fpga.write_int('snap_trig', 1)
fpga.write_int('snap_trig', 0) # trigger the snapshot once

for _ in range(3): # read the data three times
    snap_data0 = np.fromstring(fpga.snapshot_get('adcsnap0', man_trig=True)['data'], dtype='>i1')[:400]
    plt.plot(snap_data0)

plt.show() # <- should show three overlaping lines, instead I get three different lines

My only guess is that the snapshot_get function is actually triggering the snapshot block, so is getting new data. Anyone have some idea of what is going on?

Franco Curotto

--
You received this message because you are subscribed to the Google Groups 
"casper@lists.berkeley.edu" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to casper+unsubscr...@lists.berkeley.edu.
To post to this group, send email to casper@lists.berkeley.edu.

Reply via email to