Hi All, 

New to the Casper toolflow and hardware so please bear with us. 
We are trying to get up and running with the SNAP board by going through 
the tutorials from the 2018 workshop 
<https://github.com/casper-astro/tutorials_devel/tree/workshop2018>.
We can compile and run tutorial 1 successfully, indicating that the 
toolflow and software versions are okay (hopefully). 

Unfortunately, we are hitting a problem for* Tutorial 3 (Wideband 
Spectrometer)*
After supplying a 10Mhz ref at 8dBm, we power up the snap and try to run 
the Python script with the precompiled .fpg file 
<https://github.com/casper-astro/tutorials_devel/tree/workshop2018/vivado/snap/tut_spec>
:

python snap_tut_spec.py '192.168.0.2' -b snap_tut_spec.fpg


We hit an error when the script attempts:

adc.init(samplingRate=sample_rate, numChannel=1, resolution=8)

During this function call, we notice that the *Ethernet connection between 
the RPi and PC drops for a few seconds* and then we get this error 
(extended error message at the end):

KatcpRequestFail: Request write on host 192.168.0.2 failed.
    Request: ?write adc16_controller 0 \0\0 
    Reply: !write fail

We tried extending the timeout period but this doesn't seem to help.

We first tried using casperfpga libraries from casper-astro github (pointed 
to from the casper-astro/tutorials_devel 
<https://github.com/casper-astro/tutorials_devel/tree/workshop2018>)
We then tried using  casperfpga libraries from ska-sa github (master 
<https://github.com/ska-sa/casperfpga>), but got the same errors.
*which casperfpga should we be using?*

We also tried compiling the given snap_tut_spec.slx but still get the same 
errors when adc.init() is invoked.

Right now, we cannot isolate the problem. We are not sure whether it's 
coming from the Linux PC, the RPi or the snap board running 
snap_tut_spec.fpg. But the errors indicate some sort of *katcp problem when 
reading/writing to adc chips*.

Any suggestions will be great!

HARDWARE:

   - SNAP ver2.1.1
   - Raspberry Pi 3 model B
   - Laptop
   
SOFTWARE:

   - Ubuntu 16.04 xenial 64bit
   - Raspberry Pi 3 image from 
   
https://casper.ssl.berkeley.edu/wiki/SNAP_Bringup#Configuring_a_SNAP_Raspberry_Pi
   - https://github.com/casper-astro/tutorials_devel/tree/workshop2018
   - https://github.com/casper-astro/casperfpga (commit* ee9c43f*)
   - also tried https://github.com/ska-sa/casperfpga (commit * 284a4ba*)
   
ERROR MESSAGES:

brad (workshop2018 *) tut_spec $ python snap_tut_spec.py '192.168.0.2' -b 
snap_tut_spec.fpg
Connecting to server 192.168.0.2 on port 7147...  ok

------------------------
Programming FPGA with snap_tut_spec.fpg... done
Attempting to initialize ADC chips...
attempt number 0 *<-- added print statement to script here*
Traceback (most recent call last):
  File "snap_tut_spec.py", line 109, in <module>
    if adc.init(samplingRate=800, numChannel=1, resolution=8) == 0:
  File "build/bdist.linux-x86_64/egg/casperfpga/snapadc.py", line 139, in 
init
  File "build/bdist.linux-x86_64/egg/casperfpga/adc.py", line 147, in init
  File "build/bdist.linux-x86_64/egg/casperfpga/adc.py", line 398, in reset
  File "build/bdist.linux-x86_64/egg/casperfpga/adc.py", line 180, in write
  File "build/bdist.linux-x86_64/egg/casperfpga/adc.py", line 173, in 
_wordCtrl
  File "build/bdist.linux-x86_64/egg/casperfpga/adc.py", line 163, in 
_bitCtrl
  File "build/bdist.linux-x86_64/egg/casperfpga/wishbonedevice.py", line 8, 
in _write
  File "build/bdist.linux-x86_64/egg/casperfpga/casperfpga.py", line 404, 
in write_int
  File "build/bdist.linux-x86_64/egg/casperfpga/casperfpga.py", line 151, 
in blindwrite
  File "build/bdist.linux-x86_64/egg/casperfpga/transport_katcp.py", line 
290, in blindwrite
  File "build/bdist.linux-x86_64/egg/casperfpga/transport_katcp.py", line 
175, in katcprequest
casperfpga.transport_katcp.KatcpRequestFail: Request write on host 
192.168.0.2 failed.
    Request: ?write adc16_controller 0 \0\0 
    Reply: !write fail 
Request\_write\_timed\_out\_after\_10.005977\_seconds.


*Running script without clock source*

brad (workshop2018 *) tut_spec $ python snap_tut_spec.py '192.168.0.2' -b 
snap_tut_spec.fpg
Connecting to server 192.168.0.2 on port 7147...  ok

------------------------
Programming FPGA with snap_tut_spec.fpg... done
Attempting to initialize ADC chips...
attempt number 0
ERROR:root:LMX2581 not locked
attempt number 1
ERROR:root:LMX2581 not locked
attempt number 2
ERROR:root:LMX2581 not locked
done (took 3 attempts)
Failed to calibrate after 3 attempts
Traceback (most recent call last):
  File "snap_tut_spec.py", line 115, in <module>
    exit_clean()
NameError: name 'exit_clean' is not defined

-- 
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to