Hi James and Marc, I was not copying the fpg file in current directory. It is working now.
Thanks On Fri, Jul 7, 2017 at 2:28 PM, James Smith <[email protected]> wrote: > Hello Anshu, > > Looping back into the mailing list so this is a reference for anyone else > who encounters this. > > In order to use the casperfpga package with a ROACH 1 you need the > following: > > - bof file on the ROACH's filesystem, in the /boffiles directory. > Either this must be on an SD card if you've booted from the SD card, or it > must be in the appropriate place on the NFS share if you've booted from > network. If your bof file is in whatever your current directory is, it will > still not work. > - fpg file in the current directory, this must correspond to the bof > file. They're generated together by the casper_xps tool. > > > Steps are as follows: > > import casperfpga > fpga = casperfpga.katcp_fpga.KatcpFpga(roachname) # port and timeout > optional > fpga.system_info["program_filename"] = boffile > fpga.program() > fpga.get_system_information(fpgfile) > > And Bob's your uncle. There you go. It's likely that your problem was the > bof file not being accessible to the ROACH. > > Just a note, that if you try to program a ROACH and it fails, the tcpborph > server often falls over. You may need to reboot the ROACH. To test this: > > ssh root@<roach_IP> > ps aux | grep tcpborphserver > > Check if the output of that command has <defunct> anywhere in it. If so, > reboot your ROACH: > shutdown -r now > > before trying to program it again. > > Hope this helps, > James > > > On Fri, Jul 7, 2017 at 10:48 AM, Anshu Singh <[email protected]> > wrote: > >> Hi James, >> >> katchcp version: 0.3.5 >> I upgraded to the latest version (0.6). It is working now. >> Now the fpga is connected, but I am not able to program it. >> >> >> The bof file is generated using MATLAB 2013a simulink version. ISE >> version is 14.7. >> >> >> The error is: >> >> >> *KatcpRequestFail* >> >> *Details: * >> >> In [1]: import casperfpga >> >> In [2]: boffile='lfpolv1_2048ch_2017_Jul_06_1811.bof' >> >> In [3]: fpga = casperfpga.katcp_fpga.KatcpFpga('100.100.100.1',7147,10) >> >> In [4]: fpga.is_connected() >> Out[4]: True >> >> In [5]: fpga.system_info['program_filename'] = boffile >> >> In [6]: fpga.program() >> ------------------------------------------------------------ >> --------------- >> KatcpRequestFail Traceback (most recent call >> last) >> <ipython-input-6-f0abab8923ae> in <module>() >> ----> 1 fpga.program() >> >> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in >> program(self, filename) >> 326 complete_okay = True >> 327 if not complete_okay: # Modify to do an extra check >> --> 328 reply, _ = self.katcprequest(name='status', >> request_timeout=1) >> 329 # Not sure whether 1 second is a good timeout here >> 330 if reply.arguments[0] == 'ok': >> >> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in >> katcprequest(self, name, request_timeout, require_ok, request_args) >> 161 'Request %s on host %s failed.\n\t' >> 162 'Request: %s\n\tReply: %s' % >> --> 163 (request.name, self.host, request, reply)) >> 164 elif reply.arguments[0] == katcp.Message.INVALID: >> 165 raise KatcpRequestInvalid( >> >> KatcpRequestFail: Request status on host 100.100.100.1 failed. >> Request: ?status >> Reply: !status fail program >> >> >> >> What could be the issue? >> >> >> On Fri, Jul 7, 2017 at 12:37 PM, James Smith <[email protected]> wrote: >> >>> Hello Anshu, >>> >>> What version of katcp do you have installed? I have seen this issue when >>> the katcp library isn't up-to-date. >>> >>> I think you can get this either from pip or directly from github. >>> >>> Regards, >>> James >>> >>> >>> On Fri, Jul 7, 2017 at 7:39 AM, Anshu Singh <[email protected]> >>> wrote: >>> >>>> Hello, >>>> >>>> While trying to link the CASPER ROACH1 board to PC, I am getting this >>>> error: >>>> >>>> *AttributeError: 'KatcpFpga' object has no attribute 'callback_request'* >>>> >>>> >>>> The steps followed are as such: >>>> >>>> >>>> In [1]: import casperfpga >>>> >>>> In [2]: fpga=casperfpga.katcp_fpga.KatcpFpga('100.100.100.1',7147,10) >>>> ------------------------------------------------------------ >>>> --------------- >>>> AttributeError Traceback (most recent call >>>> last) >>>> <ipython-input-2-26165eea9aca> in <module>() >>>> ----> 1 fpga=casperfpga.katcp_fpga.KatcpFpga('100.100.100.1',7147,10) >>>> >>>> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in >>>> __init__(self, host, port, timeout, connect) >>>> 70 def __init__(self, host, port=7147, timeout=20.0, >>>> connect=True): >>>> 71 async_requester.AsyncRequester.__init__(self, host, >>>> ---> 72 >>>> self.callback_request, >>>> 73 >>>> max_requests=100) >>>> 74 katcp.CallbackClient.__init__(self, host, port, >>>> >>>> AttributeError: 'KatcpFpga' object has no attribute 'callback_request' >>>> >>>> >>>> I have tried with various versions of casperfpga from github but the >>>> error remains the same. >>>> What should be done in order to rectify this error? >>>> >>>> >>>> >>>> Thanks, >>>> Anshu >>>> Junior Research Fellow >>>> (Int. M.tech-Ph.D Batch 2013) >>>> Indian Institute of Astrophysics >>>> Koromangala II Block >>>> Bangalore-560034 >>>> >>>> -- >>>> 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]. >>>> >>> >>> >> >> >> -- >> -------------------------- >> Anshu >> Junior Research Fellow >> (Int. M.tech-Ph.D Batch 2013) >> Indian Institute of Astrophysics >> Koromangala II Block >> Bangalore-560034 >> >> > -- -------------------------- Anshu Junior Research Fellow (Int. M.tech-Ph.D Batch 2013) Indian Institute of Astrophysics Koromangala II Block Bangalore-560034 -- 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].

