Re: [casper] ROCH 2 communication through Python
On Wed, Sep 2, 2015 at 6:52 AM, Craig Tongwrote: > Hi Aniket. > > As James has said, if you have been making various telnet connections to > your Roach2 before running the script it might be worth just rebooting > the board before trying the casperFPGA scripts. The tcpborphserver may > have crashed due to receiving some commands it didn't like. > > if tcpborphserver crashes, it gets restarted automatically (there is a loop in the startup script, and also something which saves the core file). I suppose if it hangs it may be unresponsive. But really the best way to test if the system is up is to telnet to port 7147. If something like ?help or ?wordread gives a reply the roach is almost certainly working (exception: there was an older mmap bug which prevented ?progdev working after a dozen attempts or so, it did require a reboot). If the roach is responsive, then consider looking on the control PC side if something has gone wrong. Maybe version differences/mismatches in python or katcp libraries ? Unexpected container/control group nonsense courtesy of systemd ? regards marc
Re: [casper] ROCH 2 communication through Python
Hi Aniket. As James has said, if you have been making various telnet connections to your Roach2 before running the script it might be worth just rebooting the board before trying the casperFPGA scripts. The tcpborphserver may have crashed due to receiving some commands it didn't like. Kind regards. Craig On 2015-09-02 08:18, aniket wrote: > On 2015-09-02 11:28, James Smith wrote: >> Hello Aniket, >> >> You seem to have gone about it the right way. That error usually means >> that either your ROACH isn't connected or the tcpborphserver running >> on the ROACH has crashed. Also, check the spelling of your ROACH's >> name. >> >> I myself use ROACH1, not ROACH2 (in fact I had to modify casperfpga >> slightly to work with ROACH), so if you don't come right, reply to the >> group again (you can just do a "reply-all" to my previous mail), and >> some of those more experienced in using ROACH2 may be able to help >> you. >> >> Regards, >> James >> >> On Wed, Sep 2, 2015 at 7:35 AM, aniket>> wrote: >> >>> On 2015-09-01 15:21, James Smith wrote: >>> Hello Aniket, >>> >>> casperfpga is the one you want: >>> https://github.com/ska-sa/casperfpga [1] [2] >>> >>> It has a few dependencies to build, but it's much nicer than corr. >>> >>> Regards, >>> James >>> >>> On Tue, Sep 1, 2015 at 11:39 AM, aniket >>> >>> wrote: >>> >>> Dear CASPER colleagues, >>> >>> Myself Aniket Hendre working as a Project Engineer-C in Giant >>> Metrewave Radio Telescope (GMRT), India. >>> >>> I am using ROACH 2 for my experiments. I have executed some modular >>> design on ROACH 2 successfully. >>> >>> Now I am facing problem to communicate with ROACH 2 using Python >>> environment. I have communicated with ROACH 2 successfully using >>> telnet. >>> >>> Like for ROACH 1 Corr package any one knows package for ROACH 2 ? >>> >>> Please guide me regarding the same. >>> >>> Thanks and Regards, >>> >>> ANIKET S. HENDRE >>> Project Engineer -C, >>> Giant Metrewave Radio Telescope, >>> The National Centre for Radio Astrophysics, >>> Khodad, Pune, >>> Maharashtra 410504. >>> Tel:- 02132-258365. >>> Web: www.ncra.tifr.res.in [2] [1] >>> >>> Links: >>> -- >>> [1] http://www.ncra.tifr.res.in [2] >>> [2] https://github.com/ska-sa/casperfpga [1] >> Dear James, >> >> Thanks for the replay. I have clone the casperfpga and installed on my >> machine. First I just want check that my ROACH2 has been connected to >> my PC. So from the modular script which is there in casperfpga >> directory I have extracted a required part. But still I am getting >> error. The statement which I am executing in ipython is as follows. >> >> In [8]: #!/usr/bin/env python >> >> In [9]: from casperfpga import katcp_fpga >> >> In [10]: HOSTCLASS = katcp_fpga.KatcpFpga >> >> In [11]: fpga = HOSTCLASS('roach02082A', 7147) >> --- >> >> KatcpRequestError Traceback (most recent call >> last) >> in () >> > 1 fpga = HOSTCLASS('roach02082A', 7147) >> >> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in >> __init__(self, host, port, timeout, connect) >> 64 self._timeout = timeout >> 65 if connect: >> ---> 66 self.connect() >> 67 LOGGER.info('%s: port(%s) created%s.' % (self.host, >> port, >> 68 ' & >> connected' if connect else '')) >> >> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in >> connect(self, timeout) >> 89 _stime = time.time() >> 90 while time.time() < _stime + timeout: >> ---> 91 if self.ping(): >> 92 got_ping = True >> 93 break >> >> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in >> ping(self) >> 163 :return: True or False >> 164 """ >> --> 165 reply, _ = self.katcprequest(name='watchdog', >> request_timeout=self._timeout) >> 166 if reply.arguments[0] == 'ok': >> 167 LOGGER.info('%s: katcp ping okay' % self.host) >> >> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in >> katcprequest(self, name, request_timeout, require_ok, request_args) >> 123 raise KatcpRequestError( >> 124 'Request %s on host %s failed.\n\tRequest: >> %s\n\tReply: %s' % >> --> 125 (request.name [3], self.host, request, reply)) >> 126 return reply, informs >> 127 >> >> KatcpRequestError: Request watchdog on host roach02082A failed. >> Request: ?watchdog >> Reply: !watchdog fail Timed\_out\_after\_5.00\_seconds >> >> Can you please send a simple script just to check the connection with >> ROACH2. >> >> Thanks and Regards, >> Aniket. >> >> >> >> Links: >> -- >> [1] https://github.com/ska-sa/casperfpga >> [2] http://www.ncra.tifr.res.in >>
Re: [casper] ROCH 2 communication through Python
On 2015-09-02 11:28, James Smith wrote: Hello Aniket, You seem to have gone about it the right way. That error usually means that either your ROACH isn't connected or the tcpborphserver running on the ROACH has crashed. Also, check the spelling of your ROACH's name. I myself use ROACH1, not ROACH2 (in fact I had to modify casperfpga slightly to work with ROACH), so if you don't come right, reply to the group again (you can just do a "reply-all" to my previous mail), and some of those more experienced in using ROACH2 may be able to help you. Regards, James On Wed, Sep 2, 2015 at 7:35 AM, aniketwrote: On 2015-09-01 15:21, James Smith wrote: Hello Aniket, casperfpga is the one you want: https://github.com/ska-sa/casperfpga [1] [2] It has a few dependencies to build, but it's much nicer than corr. Regards, James On Tue, Sep 1, 2015 at 11:39 AM, aniket wrote: Dear CASPER colleagues, Myself Aniket Hendre working as a Project Engineer-C in Giant Metrewave Radio Telescope (GMRT), India. I am using ROACH 2 for my experiments. I have executed some modular design on ROACH 2 successfully. Now I am facing problem to communicate with ROACH 2 using Python environment. I have communicated with ROACH 2 successfully using telnet. Like for ROACH 1 Corr package any one knows package for ROACH 2 ? Please guide me regarding the same. Thanks and Regards, ANIKET S. HENDRE Project Engineer -C, Giant Metrewave Radio Telescope, The National Centre for Radio Astrophysics, Khodad, Pune, Maharashtra 410504. Tel:- 02132-258365. Web: www.ncra.tifr.res.in [2] [1] Links: -- [1] http://www.ncra.tifr.res.in [2] [2] https://github.com/ska-sa/casperfpga [1] Dear James, Thanks for the replay. I have clone the casperfpga and installed on my machine. First I just want check that my ROACH2 has been connected to my PC. So from the modular script which is there in casperfpga directory I have extracted a required part. But still I am getting error. The statement which I am executing in ipython is as follows. In [8]: #!/usr/bin/env python In [9]: from casperfpga import katcp_fpga In [10]: HOSTCLASS = katcp_fpga.KatcpFpga In [11]: fpga = HOSTCLASS('roach02082A', 7147) --- KatcpRequestError Traceback (most recent call last) in () > 1 fpga = HOSTCLASS('roach02082A', 7147) /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in __init__(self, host, port, timeout, connect) 64 self._timeout = timeout 65 if connect: ---> 66 self.connect() 67 LOGGER.info('%s: port(%s) created%s.' % (self.host, port, 68 ' & connected' if connect else '')) /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in connect(self, timeout) 89 _stime = time.time() 90 while time.time() < _stime + timeout: ---> 91 if self.ping(): 92 got_ping = True 93 break /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in ping(self) 163 :return: True or False 164 """ --> 165 reply, _ = self.katcprequest(name='watchdog', request_timeout=self._timeout) 166 if reply.arguments[0] == 'ok': 167 LOGGER.info('%s: katcp ping okay' % self.host) /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in katcprequest(self, name, request_timeout, require_ok, request_args) 123 raise KatcpRequestError( 124 'Request %s on host %s failed.\n\tRequest: %s\n\tReply: %s' % --> 125 (request.name [3], self.host, request, reply)) 126 return reply, informs 127 KatcpRequestError: Request watchdog on host roach02082A failed. Request: ?watchdog Reply: !watchdog fail Timed\_out\_after\_5.00\_seconds Can you please send a simple script just to check the connection with ROACH2. Thanks and Regards, Aniket. Links: -- [1] https://github.com/ska-sa/casperfpga [2] http://www.ncra.tifr.res.in [3] http://request.name Dear James I have checked once again. The roach2 name from /etc/hosts. The name is correct. I can ping the ROACH2 by using the same name. Even I had tried by using my ROACH 2 ip address instead of roach2 name. But it is giving same results. Thanks and Regards, Aniket
Re: [casper] Mystery timing errors
On 2 September 2015 at 02:58, Michael D'Cruze < michael.dcr...@postgrad.manchester.ac.uk> wrote: > Hi Jack, > > > > Thanks for your suggestions! It’s taken me a little while to work through > it all. > > > > I did manage to get a 2-pol, 32k channel design to compile eventually. I > think it was a combination of a) sufficient latency in the Vacc and PFB > blocks (as you suggest) and b) splitting the two pols into two separate > chains, rather than using one block for the PFB and FFT in biplex mode. It > was found by just iterating through latency combinations until the timing > started to converge, but there were still several hundred errors until I > split up the design into two chains. Now, I don’t really understand why > using two separate PFB/FFT blocks should make a difference (surely sysgen > sorts such detail?), but the latency settings were: > Two separate blocks has two main implications. The first is that coefficients are duplicated for each block, rather than being stored in one place and fanned out. This is good for ram savings, but in general bad for timing. The blocks have fanout latency and max fanout settings to try and solve the timing problems. The second implication is that bram delays your signals go through are separated for your two streams. I.e., the delay buffers are half the size but you have twice as many of them. Where your delays are short (e.g. in FIRs with fewer than ~2k channels (depending on how many simultaneous samples per FPGA clock you get, and the specific implementation)) a single large buffer is better than two buffers of half the size, since any buffer will always use at least 1 bram. If you're making loads of channels, all the buffers are many brams in size. In this case whether or not you split them up doesn't make any difference, bram-usage-wise, since a large buffer just uses twice as many brams as a buffer of half the size. *However* separate buffers of smaller sizes should be easier to run fast, which may be a contributing factor to your design working better with separate blocks... > > > PFB: Add Latency 1; Mult latency 2; BRAM latency 3; Fanout latency 1; > Convert latency 1 (4 taps). > > Vacc: Add latency 2; BRAM latency 6 (overkill?); Mux latency 0, > > > BRAM latency up to 3 certainly helps, I would have thought anything above 4 just turns into a bram with latency 3, plus a shift register, but you'd have to dig into the mapped design to see. In any case, if it works, it works! > where DSP48 has been used wherever possible in the design. > > > > Now I need to see if it still works if I use more FIR taps ;-) > I admire your boldness. Jack PS. If your design is on github, it might be a nice reference for people trying to build models with relatively large numbers of channels > > > Best wishes > > Michael > > > > *From:* Jack Hickish [mailto:jackhick...@gmail.com] > *Sent:* 30 August 2015 21:57 > *To:* Michael D'Cruze > *Cc:* casper@lists.berkeley.edu > *Subject:* Re: [casper] Mystery timing errors > > > > Hi Michael, > > As one of the Xilinx timing closure documents helpfully articulates, it's > very difficult to give specific recipes for solving timing problems, other > than reading the timing report, looking at things in PlanAhead/FPGA Editor, > iterating compiles and developing some intuition. > > That said, there are a few things you could try, of varying levels of > complexity -- > Since you have quite a lot of channels in your design, I suspect your vacc > problems are related to the size of the bram buffer (especially if your > samples are wide). Keep in mind that a bram in a Virtex6 is a 36 bit wide x > 1k deep memory block, so building a vacc to accommodate many thousands of > channels means banking together lots of brams -- this is liable to cause > fanout issues on your address/control signals. The same is probably true of > the large delays in the PFB blocks, though I'm not sure how these are > implemented in the various block versions which exist in mlib_devel. > > Setting brams to optimize for speed and giving them at least 3 cycles > latency may help. You could also try manually controlling bram control > signals -- I believe the casper_library_bus/bus_single_port_ram block will > do some of this for you if you set to optimize for speed and include some > fanout latency. If you replace the bram delay in the vacc with one of these > (and associated address counter logic to make the block act as a delay) > then perhaps this will help. Be careful to get your latencies right so the > block still functions properly. > You might also find that implementing the adder in a DSP slice (if you > haven't already) might help. > > A more involved option is to go about manually constraining the placement > of components. You might find setting up pblocks in PlanAhead to place > major parts of your design might free up the compiler to do a little better > with the remainder of the logic. Adding pblocks for the pfb, and the > various FFT stages
Re: [casper] ROCH 2 communication through Python
Hello Aniket, I'm puzzled by your problem, but I have no experience using a ROACH2. Perhaps the authors of the casperfpga module will be able to give further debugging suggestions. Regards, James On Wed, Sep 2, 2015 at 12:40 PM, aniketwrote: > On 2015-09-02 12:22, Craig Tong wrote: > >> Hi Aniket. >> >> As James has said, if you have been making various telnet connections to >> your Roach2 before running the script it might be worth just rebooting >> the board before trying the casperFPGA scripts. The tcpborphserver may >> have crashed due to receiving some commands it didn't like. >> >> Kind regards. >> Craig >> >> On 2015-09-02 08:18, aniket wrote: >> >>> On 2015-09-02 11:28, James Smith wrote: >>> Hello Aniket, You seem to have gone about it the right way. That error usually means that either your ROACH isn't connected or the tcpborphserver running on the ROACH has crashed. Also, check the spelling of your ROACH's name. I myself use ROACH1, not ROACH2 (in fact I had to modify casperfpga slightly to work with ROACH), so if you don't come right, reply to the group again (you can just do a "reply-all" to my previous mail), and some of those more experienced in using ROACH2 may be able to help you. Regards, James On Wed, Sep 2, 2015 at 7:35 AM, aniket wrote: On 2015-09-01 15:21, James Smith wrote: > Hello Aniket, > > casperfpga is the one you want: > https://github.com/ska-sa/casperfpga [1] [2] > > It has a few dependencies to build, but it's much nicer than corr. > > Regards, > James > > On Tue, Sep 1, 2015 at 11:39 AM, aniket > > wrote: > > Dear CASPER colleagues, > > Myself Aniket Hendre working as a Project Engineer-C in Giant > Metrewave Radio Telescope (GMRT), India. > > I am using ROACH 2 for my experiments. I have executed some modular > design on ROACH 2 successfully. > > Now I am facing problem to communicate with ROACH 2 using Python > environment. I have communicated with ROACH 2 successfully using > telnet. > > Like for ROACH 1 Corr package any one knows package for ROACH 2 ? > > Please guide me regarding the same. > > Thanks and Regards, > > ANIKET S. HENDRE > Project Engineer -C, > Giant Metrewave Radio Telescope, > The National Centre for Radio Astrophysics, > Khodad, Pune, > Maharashtra 410504. > Tel:- 02132-258365. > Web: www.ncra.tifr.res.in [2] [1] > > Links: > -- > [1] http://www.ncra.tifr.res.in [2] > [2] https://github.com/ska-sa/casperfpga [1] > Dear James, Thanks for the replay. I have clone the casperfpga and installed on my machine. First I just want check that my ROACH2 has been connected to my PC. So from the modular script which is there in casperfpga directory I have extracted a required part. But still I am getting error. The statement which I am executing in ipython is as follows. In [8]: #!/usr/bin/env python In [9]: from casperfpga import katcp_fpga In [10]: HOSTCLASS = katcp_fpga.KatcpFpga In [11]: fpga = HOSTCLASS('roach02082A', 7147) --- KatcpRequestError Traceback (most recent call last) in () > 1 fpga = HOSTCLASS('roach02082A', 7147) /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in __init__(self, host, port, timeout, connect) 64 self._timeout = timeout 65 if connect: ---> 66 self.connect() 67 LOGGER.info('%s: port(%s) created%s.' % (self.host, port, 68 ' & connected' if connect else '')) /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in connect(self, timeout) 89 _stime = time.time() 90 while time.time() < _stime + timeout: ---> 91 if self.ping(): 92 got_ping = True 93 break /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in ping(self) 163 :return: True or False 164 """ --> 165 reply, _ = self.katcprequest(name='watchdog', request_timeout=self._timeout) 166 if reply.arguments[0] == 'ok': 167 LOGGER.info('%s: katcp ping okay' % self.host) /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in katcprequest(self, name, request_timeout, require_ok, request_args) 123 raise KatcpRequestError( 124
Re: [casper] Mystery timing errors
Hi Jack, Thanks for your suggestions! It’s taken me a little while to work through it all. I did manage to get a 2-pol, 32k channel design to compile eventually. I think it was a combination of a) sufficient latency in the Vacc and PFB blocks (as you suggest) and b) splitting the two pols into two separate chains, rather than using one block for the PFB and FFT in biplex mode. It was found by just iterating through latency combinations until the timing started to converge, but there were still several hundred errors until I split up the design into two chains. Now, I don’t really understand why using two separate PFB/FFT blocks should make a difference (surely sysgen sorts such detail?), but the latency settings were: PFB: Add Latency 1; Mult latency 2; BRAM latency 3; Fanout latency 1; Convert latency 1 (4 taps). Vacc: Add latency 2; BRAM latency 6 (overkill?); Mux latency 0, where DSP48 has been used wherever possible in the design. Now I need to see if it still works if I use more FIR taps ;-) Best wishes Michael From: Jack Hickish [mailto:jackhick...@gmail.com] Sent: 30 August 2015 21:57 To: Michael D'Cruze Cc: casper@lists.berkeley.edu Subject: Re: [casper] Mystery timing errors Hi Michael, As one of the Xilinx timing closure documents helpfully articulates, it's very difficult to give specific recipes for solving timing problems, other than reading the timing report, looking at things in PlanAhead/FPGA Editor, iterating compiles and developing some intuition. That said, there are a few things you could try, of varying levels of complexity -- Since you have quite a lot of channels in your design, I suspect your vacc problems are related to the size of the bram buffer (especially if your samples are wide). Keep in mind that a bram in a Virtex6 is a 36 bit wide x 1k deep memory block, so building a vacc to accommodate many thousands of channels means banking together lots of brams -- this is liable to cause fanout issues on your address/control signals. The same is probably true of the large delays in the PFB blocks, though I'm not sure how these are implemented in the various block versions which exist in mlib_devel. Setting brams to optimize for speed and giving them at least 3 cycles latency may help. You could also try manually controlling bram control signals -- I believe the casper_library_bus/bus_single_port_ram block will do some of this for you if you set to optimize for speed and include some fanout latency. If you replace the bram delay in the vacc with one of these (and associated address counter logic to make the block act as a delay) then perhaps this will help. Be careful to get your latencies right so the block still functions properly. You might also find that implementing the adder in a DSP slice (if you haven't already) might help. A more involved option is to go about manually constraining the placement of components. You might find setting up pblocks in PlanAhead to place major parts of your design might free up the compiler to do a little better with the remainder of the logic. Adding pblocks for the pfb, and the various FFT stages can be very helpful in this regard. Or perhaps just constraining the vacc that's causing you problems might be enough. Once you have some constraints from planahead which work, you can auto-include them in your simulink compiles using various methods, my favourite being the 'UCF' yellow block, which is in the current casper-astro mlib_devel. In general, I suspect that you would be well served by trying to reduce your bram use in your model - the resource utilisation report can probably either confirm or contest that this is the case. You could do this by trying to use alternatives to brams where blocks allow it (for example the FFT will allow coefficients to be generated using DSPs in some cases), or by reducing the number of FIR taps, or implementing something using QDR rather than bram if appropriate. The unfortunate truth is that some, none or all of these suggestions may help, or might make things worse. I would say that in my experience over-judicious use of pipeline/register stages throughout a design can often do more harm than good, and a sensibly placed PFB can result in incredible timing improvements. Hope that helps, please email back with any more info and/or updates -- I suspect if you solve this problem documenting your method may prove very useful for others encountering similar problems. Cheers, and good luck! Jack On 30 August 2015 at 10:42, Michael D'Cruze> wrote: > > Hi everyone, > > > > I’m having quite a lot of problems getting a particular design to compile, > XPS consistently reporting timing errors. The design is a wideband > spectrometer, somewhat similar to the tutorial 3 design. I’m running an iADC > at 1024 MHz, and the FPGA at 256 MHz. It is a two-polarisation design,
Re: [casper] ROCH 2 communication through Python
On 2015-09-02 12:22, Craig Tong wrote: Hi Aniket. As James has said, if you have been making various telnet connections to your Roach2 before running the script it might be worth just rebooting the board before trying the casperFPGA scripts. The tcpborphserver may have crashed due to receiving some commands it didn't like. Kind regards. Craig On 2015-09-02 08:18, aniket wrote: On 2015-09-02 11:28, James Smith wrote: Hello Aniket, You seem to have gone about it the right way. That error usually means that either your ROACH isn't connected or the tcpborphserver running on the ROACH has crashed. Also, check the spelling of your ROACH's name. I myself use ROACH1, not ROACH2 (in fact I had to modify casperfpga slightly to work with ROACH), so if you don't come right, reply to the group again (you can just do a "reply-all" to my previous mail), and some of those more experienced in using ROACH2 may be able to help you. Regards, James On Wed, Sep 2, 2015 at 7:35 AM, aniketwrote: On 2015-09-01 15:21, James Smith wrote: Hello Aniket, casperfpga is the one you want: https://github.com/ska-sa/casperfpga [1] [2] It has a few dependencies to build, but it's much nicer than corr. Regards, James On Tue, Sep 1, 2015 at 11:39 AM, aniket wrote: Dear CASPER colleagues, Myself Aniket Hendre working as a Project Engineer-C in Giant Metrewave Radio Telescope (GMRT), India. I am using ROACH 2 for my experiments. I have executed some modular design on ROACH 2 successfully. Now I am facing problem to communicate with ROACH 2 using Python environment. I have communicated with ROACH 2 successfully using telnet. Like for ROACH 1 Corr package any one knows package for ROACH 2 ? Please guide me regarding the same. Thanks and Regards, ANIKET S. HENDRE Project Engineer -C, Giant Metrewave Radio Telescope, The National Centre for Radio Astrophysics, Khodad, Pune, Maharashtra 410504. Tel:- 02132-258365. Web: www.ncra.tifr.res.in [2] [1] Links: -- [1] http://www.ncra.tifr.res.in [2] [2] https://github.com/ska-sa/casperfpga [1] Dear James, Thanks for the replay. I have clone the casperfpga and installed on my machine. First I just want check that my ROACH2 has been connected to my PC. So from the modular script which is there in casperfpga directory I have extracted a required part. But still I am getting error. The statement which I am executing in ipython is as follows. In [8]: #!/usr/bin/env python In [9]: from casperfpga import katcp_fpga In [10]: HOSTCLASS = katcp_fpga.KatcpFpga In [11]: fpga = HOSTCLASS('roach02082A', 7147) --- KatcpRequestError Traceback (most recent call last) in () > 1 fpga = HOSTCLASS('roach02082A', 7147) /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in __init__(self, host, port, timeout, connect) 64 self._timeout = timeout 65 if connect: ---> 66 self.connect() 67 LOGGER.info('%s: port(%s) created%s.' % (self.host, port, 68 ' & connected' if connect else '')) /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in connect(self, timeout) 89 _stime = time.time() 90 while time.time() < _stime + timeout: ---> 91 if self.ping(): 92 got_ping = True 93 break /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in ping(self) 163 :return: True or False 164 """ --> 165 reply, _ = self.katcprequest(name='watchdog', request_timeout=self._timeout) 166 if reply.arguments[0] == 'ok': 167 LOGGER.info('%s: katcp ping okay' % self.host) /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in katcprequest(self, name, request_timeout, require_ok, request_args) 123 raise KatcpRequestError( 124 'Request %s on host %s failed.\n\tRequest: %s\n\tReply: %s' % --> 125 (request.name [3], self.host, request, reply)) 126 return reply, informs 127 KatcpRequestError: Request watchdog on host roach02082A failed. Request: ?watchdog Reply: !watchdog fail Timed\_out\_after\_5.00\_seconds Can you please send a simple script just to check the connection with ROACH2. Thanks and Regards, Aniket. Links: -- [1] https://github.com/ska-sa/casperfpga [2] http://www.ncra.tifr.res.in [3] http://request.name Dear James I have checked once again. The roach2 name from /etc/hosts. The name is correct. I can ping the ROACH2 by using the same name. Even I had tried by using my ROACH 2 ip address instead of roach2 name. But it is giving same results. Thanks and Regards, Aniket Dear Colleagues Thanks for your replay. I already tested using telnet and it is
Re: [casper] ROCH 2 communication through Python
Afternoon Aniket If you can telnet to the katcp interface on the ROACH2 then casperfpga should work. Two things to bear in mind: 1. You only really benefit from using casperfpga if you're using .fpg files (.bof + design info) from the toolflow, not .bofs. The SKA SA mlib_devel produces fpgs, I'm not sure about other repos. 2. There have been many, many ROACH2 romfs, and therefore katcp server, updates over the last year. We'd want to get you current before debugging. What does the ?version katcp command return. Cheers Paul On 2 September 2015 at 12:40, aniketwrote: > On 2015-09-02 12:22, Craig Tong wrote: > >> Hi Aniket. >> >> As James has said, if you have been making various telnet connections to >> your Roach2 before running the script it might be worth just rebooting >> the board before trying the casperFPGA scripts. The tcpborphserver may >> have crashed due to receiving some commands it didn't like. >> >> Kind regards. >> Craig >> >> On 2015-09-02 08:18, aniket wrote: >> >>> On 2015-09-02 11:28, James Smith wrote: >>> Hello Aniket, You seem to have gone about it the right way. That error usually means that either your ROACH isn't connected or the tcpborphserver running on the ROACH has crashed. Also, check the spelling of your ROACH's name. I myself use ROACH1, not ROACH2 (in fact I had to modify casperfpga slightly to work with ROACH), so if you don't come right, reply to the group again (you can just do a "reply-all" to my previous mail), and some of those more experienced in using ROACH2 may be able to help you. Regards, James On Wed, Sep 2, 2015 at 7:35 AM, aniket wrote: On 2015-09-01 15:21, James Smith wrote: > Hello Aniket, > > casperfpga is the one you want: > https://github.com/ska-sa/casperfpga [1] [2] > > It has a few dependencies to build, but it's much nicer than corr. > > Regards, > James > > On Tue, Sep 1, 2015 at 11:39 AM, aniket > > wrote: > > Dear CASPER colleagues, > > Myself Aniket Hendre working as a Project Engineer-C in Giant > Metrewave Radio Telescope (GMRT), India. > > I am using ROACH 2 for my experiments. I have executed some modular > design on ROACH 2 successfully. > > Now I am facing problem to communicate with ROACH 2 using Python > environment. I have communicated with ROACH 2 successfully using > telnet. > > Like for ROACH 1 Corr package any one knows package for ROACH 2 ? > > Please guide me regarding the same. > > Thanks and Regards, > > ANIKET S. HENDRE > Project Engineer -C, > Giant Metrewave Radio Telescope, > The National Centre for Radio Astrophysics, > Khodad, Pune, > Maharashtra 410504. > Tel:- 02132-258365. > Web: www.ncra.tifr.res.in [2] [1] > > Links: > -- > [1] http://www.ncra.tifr.res.in [2] > [2] https://github.com/ska-sa/casperfpga [1] > Dear James, Thanks for the replay. I have clone the casperfpga and installed on my machine. First I just want check that my ROACH2 has been connected to my PC. So from the modular script which is there in casperfpga directory I have extracted a required part. But still I am getting error. The statement which I am executing in ipython is as follows. In [8]: #!/usr/bin/env python In [9]: from casperfpga import katcp_fpga In [10]: HOSTCLASS = katcp_fpga.KatcpFpga In [11]: fpga = HOSTCLASS('roach02082A', 7147) --- KatcpRequestError Traceback (most recent call last) in () > 1 fpga = HOSTCLASS('roach02082A', 7147) /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in __init__(self, host, port, timeout, connect) 64 self._timeout = timeout 65 if connect: ---> 66 self.connect() 67 LOGGER.info('%s: port(%s) created%s.' % (self.host, port, 68 ' & connected' if connect else '')) /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in connect(self, timeout) 89 _stime = time.time() 90 while time.time() < _stime + timeout: ---> 91 if self.ping(): 92 got_ping = True 93 break /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in ping(self) 163 :return: True or False 164 """ --> 165 reply, _ = self.katcprequest(name='watchdog', request_timeout=self._timeout) 166
Re: [casper] Thermal testing
Hi All, Has anyone created something that logs / plots the sensor values? If not, I suppose I could log my telnet session and parse that file. Brad Dober Ph.D. Candidate Department of Physics and Astronomy University of Pennsylvania Cell: 262-949-4668 On Thu, May 16, 2013 at 10:23 AM, Marc Welzwrote: > > On Thu, May 16, 2013 at 2:14 PM, Rich Lacasse wrote: > >> Hi Marc, >> >> Thanks for the quick reply. I get something but >> >> 1 - how do you interpret the results: #sensor-status 539134 1 >> raw-temp-ppc nominal 41000 >> 2 - how do you stop it! >> > > Hello > > ?sensor-list gives you a description of each sensor, including the units. > Here 41000 is > in millidegrees Celsius - so the temperature of your processor is 41degC. > To make > it stop use ?sensor-sampling raw.temp.ppc none or just disconnect. You > will probably discover > the inlet and outlet temperature sensors, which are just temperature > sensors on opposite ends > of the PCB, so don't be too confused if the inlet is warmer than the > outlet in certain > circumstances. > > regards > > marc > > > > > >