Re: [casper] Programming a ROACH2

2016-10-11 Thread David MacMahon
I think the intent of exit_fail() is to try to close the connection, ignore any 
exceptions raised while trying to close the connection, and then re-raise the 
original exception that happened before exit_fail was called, but I think the 
implementation is flawed. Here’s the definition of exit_fail() as it appears on 
GitHub:

def exit_fail():
print 'FAILURE DETECTED. Log entries:\n',lh.printMessages()
try:
fpga.stop()
except: pass
raise
exit()

I think this try/except block (with "pass" in the except part) followed by 
"raise" is completely superfluous.  I think it means try to do something and if 
an exception is raised while trying, ignore it but then re-raise it, which 
seems exactly the same as not having the try/except block there at all!  Not to 
mention that the exit() call will never be reached.  I’m also not a fan of 
functions that can only be called while an exception is being handled 
(otherwise the no-arg form of "raise" will bomb out I think).

It would probably be preferable to pass the original exception to exit_fail() 
as an argument so that the original exception can be re-raised.  I can make 
that change when I get back to Berkeley next week (unless someone beats me to 
it).

Sorry for veering so far off topic,
Dave


> On Oct 11, 2016, at 10:16, Jason Manley  wrote:
> 
> Some of the earlier scripts had bad error handling. If anything fails before 
> the host object was successfully created, then you get this error because it 
> tries to close the connection before exiting.
> 
> Jason
> 
> On 11 Oct 2016, at 16:09, David MacMahon  wrote:
> 
>> 
>>> On Oct 11, 2016, at 06:46, Heystek Grobler  wrote:
>>> 
>>> Connecting to server 192.168.33.7 on port 7147...  FAILURE DETECTED
>> 
>> Editorial comments on error handling in tut3.py aside, I think the fact that 
>> "FAILURE DETECTED" follows "Connecting to server…" on the same line (i.e. no 
>> newline character inbetween) means that something went wrong when 
>> constructing the FpgaClient object which connects to TCP port 7147 of the 
>> ROACH2 with IP address 192.168.33.7.  This is expecting the ROACH2 to have a 
>> tcpborphserver process listening on that port.
>> 
>> What happens when you run:
>> 
>> telnet 198.168.33.7 7147
>> 
>> HTH,
>> Dave
>> 
> 




Re: [casper] Programming a ROACH2

2016-10-11 Thread Jason Manley
Some of the earlier scripts had bad error handling. If anything fails before 
the host object was successfully created, then you get this error because it 
tries to close the connection before exiting.

Jason

On 11 Oct 2016, at 16:09, David MacMahon  wrote:

> 
>> On Oct 11, 2016, at 06:46, Heystek Grobler  wrote:
>> 
>> Connecting to server 192.168.33.7 on port 7147...  FAILURE DETECTED
> 
> Editorial comments on error handling in tut3.py aside, I think the fact that 
> "FAILURE DETECTED" follows "Connecting to server…" on the same line (i.e. no 
> newline character inbetween) means that something went wrong when 
> constructing the FpgaClient object which connects to TCP port 7147 of the 
> ROACH2 with IP address 192.168.33.7.  This is expecting the ROACH2 to have a 
> tcpborphserver process listening on that port.
> 
> What happens when you run:
> 
> telnet 198.168.33.7 7147
> 
> HTH,
> Dave
> 




Re: [casper] Programming a ROACH2

2016-10-11 Thread David MacMahon

> On Oct 11, 2016, at 06:46, Heystek Grobler  wrote:
> 
> Connecting to server 192.168.33.7 on port 7147...  FAILURE DETECTED

Editorial comments on error handling in tut3.py aside, I think the fact that 
"FAILURE DETECTED" follows "Connecting to server…" on the same line (i.e. no 
newline character inbetween) means that something went wrong when constructing 
the FpgaClient object which connects to TCP port 7147 of the ROACH2 with IP 
address 192.168.33.7.  This is expecting the ROACH2 to have a tcpborphserver 
process listening on that port.

What happens when you run:

telnet 198.168.33.7 7147

HTH,
Dave



Re: [casper] Programming a ROACH2

2016-10-11 Thread Marc Welz
I can't answer the question directly, there is a C utility which will
program fpg files into roach2s, called kcpfpg - it lives on github in
ska-ska/katcp_devel - run the toplevel makefile then cd into fpg and
there should be the utility

regards

marc


On Tue, Oct 11, 2016 at 12:56 PM, Heystek Grobler
 wrote:
> Hi
>
> I am now trying to do this manually line by line through ipython.
>
> Do anyone perhaps know what is the equivalent for the roach2 of the
> following function?
> fpga.progdev()
>
> a_0=struct.unpack('>1024l',fpga.read('even',1024*4,0))
> a_1=struct.unpack('>1024l',fpga.read('odd',1024*4,0))
>
>
>
> On Tue, Oct 11, 2016 at 1:43 PM, James Smith  wrote:
>>
>> Hello Heystek,
>>
>> Having looked at the tut3 which is on the website, it is using the older
>> corr library, not casperfpga. It also looks as though it's intended for
>> ROACH and not ROACH2, I'm not sure whether that's an issue. I've never used
>> a ROACH2.
>>
>> I was under the impression that it should have been updated for the recent
>> CASPER workshop. Can someone comment on this?
>>
>> It might be an interesting exercise to try and use the model files to
>> compile for ROACH2 then to write your own script, using this one as a guide.
>> You'd learn a lot about how things work in the process. Not a quick fix to
>> your problem, I'll admit, but it'll be an education.
>>
>> Regards,
>> James
>>
>>
>> On Tue, Oct 11, 2016 at 1:33 PM, Heystek Grobler
>>  wrote:
>>>
>>> Hi James
>>>
>>> Through ipython I can connect to the Roach and upload the .fga file. I
>>> can also ping the roach.The problem comes in using the script with the .bof
>>> file. I am very new to python but have training in C, C#, Java and Assembly.
>>>
>>> I run the script as follows:
>>> python tut3.py 192.168.33.7
>>>
>>>
>>> On Tue, Oct 11, 2016 at 1:06 PM, James Smith  wrote:

 Hello Heystek,

 How cognisant are you with Python? Try opening an ipython session and
 connecting to your ROACH manually, I think you have been able to do that in
 the past.

 This error message means that your network can't reach the ROACH for
 some reason.

 Regards,
 James


 On Tue, Oct 11, 2016 at 12:46 PM, Heystek Grobler
  wrote:
>
> Hi Everyone
>
> After trying all of your suggestions and install a few more packages is
> works. I get the following error now when I run the tut3.py script for 
> tut3.
>
>
> heystek@heystek-HP-G62-Notebook-PC:~/simulink/heystek_tutorial_3/heystek_tut3$
> ./tut3.py 192.168.33.7 tut3.bofConnecting to server 192.168.33.7 on port
> 7147...  FAILURE DETECTED. Log entries:
> None
> Traceback (most recent call last):
>   File "./tut3.py", line 141, in 
> exit_fail()
>   File "./tut3.py", line 21, in exit_fail
> fpga.stop()
> NameError: global name 'fpga' is not defined
>
>
> Any ideas on how to solve this?
>
> Thank you
>
> Heystek
>
> On Fri, Oct 7, 2016 at 9:05 PM, Ryan Monroe 
> wrote:
>>
>> I would suggest using "pip uninstall spead" instead -- I don't recall
>> ever using it myself, but it appears to be the pip-sanctioned way of
>> removing something.
>>
>>
>> On 10/07/2016 02:24 AM, James Smith wrote:
>>
>> Hello Heystek,
>>
>> Pip is seeing that you've already got a version of Spead installed,
>> which might not have worked. You can delete the directory to 'uninstall' 
>> it
>> (Request for comment: is this a safe approach? It's what I've always done
>> with no problems.)
>>
>> Before you try that though, perhaps just try importing spead in
>> ipython as Ryan did. What are the error messages?
>>
>> Regards,
>> James
>>
>>
>> On Fri, Oct 7, 2016 at 11:23 AM, Heystek Grobler
>>  wrote:
>>>
>>> Hi James and Ryan
>>>
>>> I tried sudo pip install spead and I get the following
>>>
>>> Requirment already satisfied (use --upgrade): spead in
>>> usr/local/lib/python2.7/dist-packages
>>> cleaning up
>>>
>>> Any ideas?
>>>
>>> I am a bit lost to be honest.
>>>
>>> On Fri, Oct 7, 2016 at 11:09 AM, James Smith 
>>> wrote:

 Hello Heystek,

 I vaguely recall installing spead from pip as well, as Ryan has done
 here. Give that a whirl.

 Regards,
 James


 On Fri, Oct 7, 2016 at 11:06 AM, Ryan Monroe
  wrote:
>
> rmonroe@rmonroe-ThinkPad-P50:~$ sudo pip install spead
> [sudo] password for rmonroe:
> The directory '/home/rmonroe/.cache/pip/http' or its parent
> directory is not owned by the 

Re: [casper] Programming a ROACH2

2016-10-11 Thread Heystek Grobler
Hi

I am now trying to do this manually line by line through ipython.

Do anyone perhaps know what is the equivalent for the roach2 of the
following function?
fpga.progdev()

a_0=struct.unpack('>1024l',fpga.read('even',1024*4,0))
a_1=struct.unpack('>1024l',fpga.read('odd',1024*4,0))



On Tue, Oct 11, 2016 at 1:43 PM, James Smith  wrote:

> Hello Heystek,
>
> Having looked at the tut3 which is on the website, it is using the older
> corr library, not casperfpga. It also looks as though it's intended for
> ROACH and not ROACH2, I'm not sure whether that's an issue. I've never used
> a ROACH2.
>
> I was under the impression that it should have been updated for the recent
> CASPER workshop. Can someone comment on this?
>
> It might be an interesting exercise to try and use the model files to
> compile for ROACH2 then to write your own script, using this one as a
> guide. You'd learn a lot about how things work in the process. Not a quick
> fix to your problem, I'll admit, but it'll be an education.
>
> Regards,
> James
>
>
> On Tue, Oct 11, 2016 at 1:33 PM, Heystek Grobler  > wrote:
>
>> Hi James
>>
>> Through ipython I can connect to the Roach and upload the .fga file. I
>> can also ping the roach.The problem comes in using the script with the .bof
>> file. I am very new to python but have training in C, C#, Java and Assembly.
>>
>> I run the script as follows:
>> python tut3.py 192.168.33.7
>>
>>
>> On Tue, Oct 11, 2016 at 1:06 PM, James Smith  wrote:
>>
>>> Hello Heystek,
>>>
>>> How cognisant are you with Python? Try opening an ipython session and
>>> connecting to your ROACH manually, I think you have been able to do that in
>>> the past.
>>>
>>> This error message means that your network can't reach the ROACH for
>>> some reason.
>>>
>>> Regards,
>>> James
>>>
>>>
>>> On Tue, Oct 11, 2016 at 12:46 PM, Heystek Grobler <
>>> heystekgrob...@gmail.com> wrote:
>>>
 Hi Everyone

 After trying all of your suggestions and install a few more packages is
 works. I get the following error now when I run the tut3.py script for 
 tut3.

 heystek@heystek-HP-G62-Notebook-PC:~/simulink/heystek_tutorial_3/heystek_tut3$
 ./tut3.py 192.168.33.7 tut3.bofConnecting to server 192.168.33.7 on port
 7147...  FAILURE DETECTED. Log entries:
 None
 Traceback (most recent call last):
   File "./tut3.py", line 141, in 
 exit_fail()
   File "./tut3.py", line 21, in exit_fail
 fpga.stop()
 NameError: global name 'fpga' is not defined


 Any ideas on how to solve this?

 Thank you

 Heystek

 On Fri, Oct 7, 2016 at 9:05 PM, Ryan Monroe 
 wrote:

> I would suggest using "pip uninstall spead" instead -- I don't recall
> ever using it myself, but it appears to be the pip-sanctioned way of
> removing something.
>
> On 10/07/2016 02:24 AM, James Smith wrote:
>
> Hello Heystek,
>
> Pip is seeing that you've already got a version of Spead installed,
> which might not have worked. You can delete the directory to 'uninstall' 
> it
> (Request for comment: is this a safe approach? It's what I've always done
> with no problems.)
>
> Before you try that though, perhaps just try importing spead in
> ipython as Ryan did. What are the error messages?
>
> Regards,
> James
>
>
> On Fri, Oct 7, 2016 at 11:23 AM, Heystek Grobler <
> heystekgrob...@gmail.com> wrote:
>
>> Hi James and Ryan
>>
>> I tried sudo pip install spead and I get the following
>>
>> Requirment already satisfied (use --upgrade): spead in
>> usr/local/lib/python2.7/dist-packages
>> cleaning up
>>
>> Any ideas?
>>
>> I am a bit lost to be honest.
>>
>> On Fri, Oct 7, 2016 at 11:09 AM, James Smith 
>> wrote:
>>
>>> Hello Heystek,
>>>
>>> I vaguely recall installing spead from pip as well, as Ryan has done
>>> here. Give that a whirl.
>>>
>>> Regards,
>>> James
>>>
>>>
>>> On Fri, Oct 7, 2016 at 11:06 AM, Ryan Monroe <
>>> ryan.m.mon...@gmail.com> wrote:
>>>
 rmonroe@rmonroe-ThinkPad-P50:~$ sudo pip install spead
 [sudo] password for rmonroe:
 The directory '/home/rmonroe/.cache/pip/http' or its parent
 directory is not owned by the current user and the cache has been 
 disabled.
 Please check the permissions and owner of that directory. If executing 
 pip
 with sudo, you may want sudo's -H flag.
 The directory '/home/rmonroe/.cache/pip' or its parent directory is
 not owned by the current user and caching wheels has been disabled. 
 check
 the permissions and owner of that directory. If executing pip with 
 sudo,
 you may want sudo's -H flag.
 

Re: [casper] Programming a ROACH2

2016-10-11 Thread James Smith
Hello Heystek,

Having looked at the tut3 which is on the website, it is using the older
corr library, not casperfpga. It also looks as though it's intended for
ROACH and not ROACH2, I'm not sure whether that's an issue. I've never used
a ROACH2.

I was under the impression that it should have been updated for the recent
CASPER workshop. Can someone comment on this?

It might be an interesting exercise to try and use the model files to
compile for ROACH2 then to write your own script, using this one as a
guide. You'd learn a lot about how things work in the process. Not a quick
fix to your problem, I'll admit, but it'll be an education.

Regards,
James


On Tue, Oct 11, 2016 at 1:33 PM, Heystek Grobler 
wrote:

> Hi James
>
> Through ipython I can connect to the Roach and upload the .fga file. I can
> also ping the roach.The problem comes in using the script with the .bof
> file. I am very new to python but have training in C, C#, Java and Assembly.
>
> I run the script as follows:
> python tut3.py 192.168.33.7
>
>
> On Tue, Oct 11, 2016 at 1:06 PM, James Smith  wrote:
>
>> Hello Heystek,
>>
>> How cognisant are you with Python? Try opening an ipython session and
>> connecting to your ROACH manually, I think you have been able to do that in
>> the past.
>>
>> This error message means that your network can't reach the ROACH for some
>> reason.
>>
>> Regards,
>> James
>>
>>
>> On Tue, Oct 11, 2016 at 12:46 PM, Heystek Grobler <
>> heystekgrob...@gmail.com> wrote:
>>
>>> Hi Everyone
>>>
>>> After trying all of your suggestions and install a few more packages is
>>> works. I get the following error now when I run the tut3.py script for tut3.
>>>
>>> heystek@heystek-HP-G62-Notebook-PC:~/simulink/heystek_tutorial_3/heystek_tut3$
>>> ./tut3.py 192.168.33.7 tut3.bofConnecting to server 192.168.33.7 on port
>>> 7147...  FAILURE DETECTED. Log entries:
>>> None
>>> Traceback (most recent call last):
>>>   File "./tut3.py", line 141, in 
>>> exit_fail()
>>>   File "./tut3.py", line 21, in exit_fail
>>> fpga.stop()
>>> NameError: global name 'fpga' is not defined
>>>
>>>
>>> Any ideas on how to solve this?
>>>
>>> Thank you
>>>
>>> Heystek
>>>
>>> On Fri, Oct 7, 2016 at 9:05 PM, Ryan Monroe 
>>> wrote:
>>>
 I would suggest using "pip uninstall spead" instead -- I don't recall
 ever using it myself, but it appears to be the pip-sanctioned way of
 removing something.

 On 10/07/2016 02:24 AM, James Smith wrote:

 Hello Heystek,

 Pip is seeing that you've already got a version of Spead installed,
 which might not have worked. You can delete the directory to 'uninstall' it
 (Request for comment: is this a safe approach? It's what I've always done
 with no problems.)

 Before you try that though, perhaps just try importing spead in ipython
 as Ryan did. What are the error messages?

 Regards,
 James


 On Fri, Oct 7, 2016 at 11:23 AM, Heystek Grobler <
 heystekgrob...@gmail.com> wrote:

> Hi James and Ryan
>
> I tried sudo pip install spead and I get the following
>
> Requirment already satisfied (use --upgrade): spead in
> usr/local/lib/python2.7/dist-packages
> cleaning up
>
> Any ideas?
>
> I am a bit lost to be honest.
>
> On Fri, Oct 7, 2016 at 11:09 AM, James Smith  wrote:
>
>> Hello Heystek,
>>
>> I vaguely recall installing spead from pip as well, as Ryan has done
>> here. Give that a whirl.
>>
>> Regards,
>> James
>>
>>
>> On Fri, Oct 7, 2016 at 11:06 AM, Ryan Monroe > > wrote:
>>
>>> rmonroe@rmonroe-ThinkPad-P50:~$ sudo pip install spead
>>> [sudo] password for rmonroe:
>>> The directory '/home/rmonroe/.cache/pip/http' or its parent
>>> directory is not owned by the current user and the cache has been 
>>> disabled.
>>> Please check the permissions and owner of that directory. If executing 
>>> pip
>>> with sudo, you may want sudo's -H flag.
>>> The directory '/home/rmonroe/.cache/pip' or its parent directory is
>>> not owned by the current user and caching wheels has been disabled. 
>>> check
>>> the permissions and owner of that directory. If executing pip with sudo,
>>> you may want sudo's -H flag.
>>> Collecting spead
>>>   Downloading spead-0.5.1.tar.gz (61kB)
>>> 100% || 71kB 1.5MB/s
>>> Installing collected packages: spead
>>>   Running setup.py install for spead ... done
>>> Successfully installed spead-0.5.1
>>> rmonroe@rmonroe-ThinkPad-P50:~$ ipython
>>> Python 2.7.12 (default, Jul  1 2016, 15:12:24)
>>> Type "copyright", "credits" or "license" for more information.
>>>
>>> IPython 2.4.1 -- An enhanced Interactive Python.
>>> ? -> Introduction 

Re: [casper] Programming a ROACH2

2016-10-11 Thread James Smith
Hello Heystek,

How cognisant are you with Python? Try opening an ipython session and
connecting to your ROACH manually, I think you have been able to do that in
the past.

This error message means that your network can't reach the ROACH for some
reason.

Regards,
James


On Tue, Oct 11, 2016 at 12:46 PM, Heystek Grobler 
wrote:

> Hi Everyone
>
> After trying all of your suggestions and install a few more packages is
> works. I get the following error now when I run the tut3.py script for tut3.
>
> heystek@heystek-HP-G62-Notebook-PC:~/simulink/heystek_tutorial_3/heystek_tut3$
> ./tut3.py 192.168.33.7 tut3.bofConnecting to server 192.168.33.7 on port
> 7147...  FAILURE DETECTED. Log entries:
> None
> Traceback (most recent call last):
>   File "./tut3.py", line 141, in 
> exit_fail()
>   File "./tut3.py", line 21, in exit_fail
> fpga.stop()
> NameError: global name 'fpga' is not defined
>
>
> Any ideas on how to solve this?
>
> Thank you
>
> Heystek
>
> On Fri, Oct 7, 2016 at 9:05 PM, Ryan Monroe 
> wrote:
>
>> I would suggest using "pip uninstall spead" instead -- I don't recall
>> ever using it myself, but it appears to be the pip-sanctioned way of
>> removing something.
>>
>> On 10/07/2016 02:24 AM, James Smith wrote:
>>
>> Hello Heystek,
>>
>> Pip is seeing that you've already got a version of Spead installed, which
>> might not have worked. You can delete the directory to 'uninstall' it
>> (Request for comment: is this a safe approach? It's what I've always done
>> with no problems.)
>>
>> Before you try that though, perhaps just try importing spead in ipython
>> as Ryan did. What are the error messages?
>>
>> Regards,
>> James
>>
>>
>> On Fri, Oct 7, 2016 at 11:23 AM, Heystek Grobler <
>> heystekgrob...@gmail.com> wrote:
>>
>>> Hi James and Ryan
>>>
>>> I tried sudo pip install spead and I get the following
>>>
>>> Requirment already satisfied (use --upgrade): spead in
>>> usr/local/lib/python2.7/dist-packages
>>> cleaning up
>>>
>>> Any ideas?
>>>
>>> I am a bit lost to be honest.
>>>
>>> On Fri, Oct 7, 2016 at 11:09 AM, James Smith  wrote:
>>>
 Hello Heystek,

 I vaguely recall installing spead from pip as well, as Ryan has done
 here. Give that a whirl.

 Regards,
 James


 On Fri, Oct 7, 2016 at 11:06 AM, Ryan Monroe 
 wrote:

> rmonroe@rmonroe-ThinkPad-P50:~$ sudo pip install spead
> [sudo] password for rmonroe:
> The directory '/home/rmonroe/.cache/pip/http' or its parent directory
> is not owned by the current user and the cache has been disabled. Please
> check the permissions and owner of that directory. If executing pip with
> sudo, you may want sudo's -H flag.
> The directory '/home/rmonroe/.cache/pip' or its parent directory is
> not owned by the current user and caching wheels has been disabled. check
> the permissions and owner of that directory. If executing pip with sudo,
> you may want sudo's -H flag.
> Collecting spead
>   Downloading spead-0.5.1.tar.gz (61kB)
> 100% || 71kB 1.5MB/s
> Installing collected packages: spead
>   Running setup.py install for spead ... done
> Successfully installed spead-0.5.1
> rmonroe@rmonroe-ThinkPad-P50:~$ ipython
> Python 2.7.12 (default, Jul  1 2016, 15:12:24)
> Type "copyright", "credits" or "license" for more information.
>
> IPython 2.4.1 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help  -> Python's own help system.
> object?   -> Details about 'object', use 'object??' for extra details.
>
> In [1]: import spead
>
> In [2]:
>
>
> On 10/07/2016 02:04 AM, Heystek Grobler wrote:
>
> Hi James
>
> I installed the PySpead package but I get the following error when I
> run the tut3.py script:
>
> ImportError: No mode named spead
>
> Do you perhaps have any ideas on how to solve it?
>
> Thank you!!
>
> Heystek
>
> On Fri, Oct 7, 2016 at 11:01 AM, James Smith  wrote:
>
>> Hello Heystek,
>>
>> If you're still in the Python environment, then PySpead is the one
>> you want.
>>
>> Regards,
>> James
>>
>>
>> On Fri, Oct 7, 2016 at 10:59 AM, Heystek Grobler <
>> heystekgrob...@gmail.com> wrote:
>>
>>> Good Day
>>>
>>> After a while of troubleshooting I determined the connection with
>>> TCP/IP into the board was correct. I updated the file system and kernel 
>>> of
>>> the ROACH2 and now I can program it.
>>>
>>> I only need to install a package called spead in order to use the
>>> .bof file with tutorial 3 of CASPER.
>>>
>>> Where can a download the spead package from? I can only find 

Re: [casper] Programming a ROACH2

2016-10-11 Thread Heystek Grobler
Hi Everyone

After trying all of your suggestions and install a few more packages is
works. I get the following error now when I run the tut3.py script for tut3.

heystek@heystek-HP-G62-Notebook-PC:~/simulink/heystek_tutorial_3/heystek_tut3$
./tut3.py 192.168.33.7 tut3.bofConnecting to server 192.168.33.7 on port
7147...  FAILURE DETECTED. Log entries:
None
Traceback (most recent call last):
  File "./tut3.py", line 141, in 
exit_fail()
  File "./tut3.py", line 21, in exit_fail
fpga.stop()
NameError: global name 'fpga' is not defined


Any ideas on how to solve this?

Thank you

Heystek

On Fri, Oct 7, 2016 at 9:05 PM, Ryan Monroe  wrote:

> I would suggest using "pip uninstall spead" instead -- I don't recall ever
> using it myself, but it appears to be the pip-sanctioned way of removing
> something.
>
> On 10/07/2016 02:24 AM, James Smith wrote:
>
> Hello Heystek,
>
> Pip is seeing that you've already got a version of Spead installed, which
> might not have worked. You can delete the directory to 'uninstall' it
> (Request for comment: is this a safe approach? It's what I've always done
> with no problems.)
>
> Before you try that though, perhaps just try importing spead in ipython as
> Ryan did. What are the error messages?
>
> Regards,
> James
>
>
> On Fri, Oct 7, 2016 at 11:23 AM, Heystek Grobler  > wrote:
>
>> Hi James and Ryan
>>
>> I tried sudo pip install spead and I get the following
>>
>> Requirment already satisfied (use --upgrade): spead in
>> usr/local/lib/python2.7/dist-packages
>> cleaning up
>>
>> Any ideas?
>>
>> I am a bit lost to be honest.
>>
>> On Fri, Oct 7, 2016 at 11:09 AM, James Smith  wrote:
>>
>>> Hello Heystek,
>>>
>>> I vaguely recall installing spead from pip as well, as Ryan has done
>>> here. Give that a whirl.
>>>
>>> Regards,
>>> James
>>>
>>>
>>> On Fri, Oct 7, 2016 at 11:06 AM, Ryan Monroe 
>>> wrote:
>>>
 rmonroe@rmonroe-ThinkPad-P50:~$ sudo pip install spead
 [sudo] password for rmonroe:
 The directory '/home/rmonroe/.cache/pip/http' or its parent directory
 is not owned by the current user and the cache has been disabled. Please
 check the permissions and owner of that directory. If executing pip with
 sudo, you may want sudo's -H flag.
 The directory '/home/rmonroe/.cache/pip' or its parent directory is not
 owned by the current user and caching wheels has been disabled. check the
 permissions and owner of that directory. If executing pip with sudo, you
 may want sudo's -H flag.
 Collecting spead
   Downloading spead-0.5.1.tar.gz (61kB)
 100% || 71kB 1.5MB/s
 Installing collected packages: spead
   Running setup.py install for spead ... done
 Successfully installed spead-0.5.1
 rmonroe@rmonroe-ThinkPad-P50:~$ ipython
 Python 2.7.12 (default, Jul  1 2016, 15:12:24)
 Type "copyright", "credits" or "license" for more information.

 IPython 2.4.1 -- An enhanced Interactive Python.
 ? -> Introduction and overview of IPython's features.
 %quickref -> Quick reference.
 help  -> Python's own help system.
 object?   -> Details about 'object', use 'object??' for extra details.

 In [1]: import spead

 In [2]:


 On 10/07/2016 02:04 AM, Heystek Grobler wrote:

 Hi James

 I installed the PySpead package but I get the following error when I
 run the tut3.py script:

 ImportError: No mode named spead

 Do you perhaps have any ideas on how to solve it?

 Thank you!!

 Heystek

 On Fri, Oct 7, 2016 at 11:01 AM, James Smith  wrote:

> Hello Heystek,
>
> If you're still in the Python environment, then PySpead is the one you
> want.
>
> Regards,
> James
>
>
> On Fri, Oct 7, 2016 at 10:59 AM, Heystek Grobler <
> heystekgrob...@gmail.com> wrote:
>
>> Good Day
>>
>> After a while of troubleshooting I determined the connection with
>> TCP/IP into the board was correct. I updated the file system and kernel 
>> of
>> the ROACH2 and now I can program it.
>>
>> I only need to install a package called spead in order to use the
>> .bof file with tutorial 3 of CASPER.
>>
>> Where can a download the spead package from? I can only find PySpead
>> and Spead2.
>>
>> Thanks for everyones help
>>
>> Heystek!
>>
>> On Fri, Sep 30, 2016 at 5:28 PM, Adam Isaacson 
>> wrote:
>>
>>> Hi Heystek,
>>>
>>> If you want to telnet, which is another way of configuring your
>>> board, then you need to state the port. Are you doing the following from
>>> the terminal:
>>>
>>> 1)Telnet to port 7147: "telnet  7147".
>>>
>>> 2)?progremote fpgfile.fpg
>>>
>>> You say you 

Re: [casper] Programming a ROACH2

2016-10-07 Thread Ryan Monroe
I would suggest using "pip uninstall spead" instead -- I don't recall 
ever using it myself, but it appears to be the pip-sanctioned way of 
removing something.



On 10/07/2016 02:24 AM, James Smith wrote:

Hello Heystek,

Pip is seeing that you've already got a version of Spead installed, 
which might not have worked. You can delete the directory to 
'uninstall' it (Request for comment: is this a safe approach? It's 
what I've always done with no problems.)


Before you try that though, perhaps just try importing spead in 
ipython as Ryan did. What are the error messages?


Regards,
James


On Fri, Oct 7, 2016 at 11:23 AM, Heystek Grobler 
> wrote:


Hi James and Ryan

I tried sudo pip install spead and I get the following

Requirment already satisfied (use --upgrade): spead in
usr/local/lib/python2.7/dist-packages
cleaning up

Any ideas?

I am a bit lost to be honest.

On Fri, Oct 7, 2016 at 11:09 AM, James Smith > wrote:

Hello Heystek,

I vaguely recall installing spead from pip as well, as Ryan
has done here. Give that a whirl.

Regards,
James


On Fri, Oct 7, 2016 at 11:06 AM, Ryan Monroe
> wrote:

rmonroe@rmonroe-ThinkPad-P50:~$ sudo pip install spead
[sudo] password for rmonroe:
The directory '/home/rmonroe/.cache/pip/http' or its
parent directory is not owned by the current user and the
cache has been disabled. Please check the permissions and
owner of that directory. If executing pip with sudo, you
may want sudo's -H flag.
The directory '/home/rmonroe/.cache/pip' or its parent
directory is not owned by the current user and caching
wheels has been disabled. check the permissions and owner
of that directory. If executing pip with sudo, you may
want sudo's -H flag.
Collecting spead
  Downloading spead-0.5.1.tar.gz (61kB)
100% || 71kB 1.5MB/s
Installing collected packages: spead
  Running setup.py install for spead ... done
Successfully installed spead-0.5.1
rmonroe@rmonroe-ThinkPad-P50:~$ ipython
Python 2.7.12 (default, Jul  1 2016, 15:12:24)
Type "copyright", "credits" or "license" for more information.

IPython 2.4.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object', use 'object??' for
extra details.

In [1]: import spead

In [2]:


On 10/07/2016 02:04 AM, Heystek Grobler wrote:

Hi James

I installed the PySpead package but I get the following
error when I run the tut3.py script:

ImportError: No mode named spead

Do you perhaps have any ideas on how to solve it?

Thank you!!

Heystek

On Fri, Oct 7, 2016 at 11:01 AM, James Smith
> wrote:

Hello Heystek,

If you're still in the Python environment, then
PySpead is the one you want.

Regards,
James


On Fri, Oct 7, 2016 at 10:59 AM, Heystek Grobler
> wrote:

Good Day

After a while of troubleshooting I determined the
connection with TCP/IP into the board was
correct. I updated the file system and kernel of
the ROACH2 and now I can program it.

I only need to install a package called spead in
order to use the .bof file with tutorial 3 of
CASPER.

Where can a download the spead package from? I
can only find PySpead and Spead2.

Thanks for everyones help

Heystek!

On Fri, Sep 30, 2016 at 5:28 PM, Adam Isaacson
> wrote:

Hi Heystek,

If you want to telnet, which is another way
of configuring your board, then you need to
state the port. Are you doing the following
from the terminal:

1)Telnet to port 7147: "telnet  7147".


Re: [casper] Programming a ROACH2

2016-10-07 Thread James Smith
Hello Heystek,

Pip is seeing that you've already got a version of Spead installed, which
might not have worked. You can delete the directory to 'uninstall' it
(Request for comment: is this a safe approach? It's what I've always done
with no problems.)

Before you try that though, perhaps just try importing spead in ipython as
Ryan did. What are the error messages?

Regards,
James


On Fri, Oct 7, 2016 at 11:23 AM, Heystek Grobler 
wrote:

> Hi James and Ryan
>
> I tried sudo pip install spead and I get the following
>
> Requirment already satisfied (use --upgrade): spead in
> usr/local/lib/python2.7/dist-packages
> cleaning up
>
> Any ideas?
>
> I am a bit lost to be honest.
>
> On Fri, Oct 7, 2016 at 11:09 AM, James Smith  wrote:
>
>> Hello Heystek,
>>
>> I vaguely recall installing spead from pip as well, as Ryan has done
>> here. Give that a whirl.
>>
>> Regards,
>> James
>>
>>
>> On Fri, Oct 7, 2016 at 11:06 AM, Ryan Monroe 
>> wrote:
>>
>>> rmonroe@rmonroe-ThinkPad-P50:~$ sudo pip install spead
>>> [sudo] password for rmonroe:
>>> The directory '/home/rmonroe/.cache/pip/http' or its parent directory
>>> is not owned by the current user and the cache has been disabled. Please
>>> check the permissions and owner of that directory. If executing pip with
>>> sudo, you may want sudo's -H flag.
>>> The directory '/home/rmonroe/.cache/pip' or its parent directory is not
>>> owned by the current user and caching wheels has been disabled. check the
>>> permissions and owner of that directory. If executing pip with sudo, you
>>> may want sudo's -H flag.
>>> Collecting spead
>>>   Downloading spead-0.5.1.tar.gz (61kB)
>>> 100% || 71kB 1.5MB/s
>>> Installing collected packages: spead
>>>   Running setup.py install for spead ... done
>>> Successfully installed spead-0.5.1
>>> rmonroe@rmonroe-ThinkPad-P50:~$ ipython
>>> Python 2.7.12 (default, Jul  1 2016, 15:12:24)
>>> Type "copyright", "credits" or "license" for more information.
>>>
>>> IPython 2.4.1 -- An enhanced Interactive Python.
>>> ? -> Introduction and overview of IPython's features.
>>> %quickref -> Quick reference.
>>> help  -> Python's own help system.
>>> object?   -> Details about 'object', use 'object??' for extra details.
>>>
>>> In [1]: import spead
>>>
>>> In [2]:
>>>
>>>
>>> On 10/07/2016 02:04 AM, Heystek Grobler wrote:
>>>
>>> Hi James
>>>
>>> I installed the PySpead package but I get the following error when I run
>>> the tut3.py script:
>>>
>>> ImportError: No mode named spead
>>>
>>> Do you perhaps have any ideas on how to solve it?
>>>
>>> Thank you!!
>>>
>>> Heystek
>>>
>>> On Fri, Oct 7, 2016 at 11:01 AM, James Smith  wrote:
>>>
 Hello Heystek,

 If you're still in the Python environment, then PySpead is the one you
 want.

 Regards,
 James


 On Fri, Oct 7, 2016 at 10:59 AM, Heystek Grobler <
 heystekgrob...@gmail.com> wrote:

> Good Day
>
> After a while of troubleshooting I determined the connection with
> TCP/IP into the board was correct. I updated the file system and kernel of
> the ROACH2 and now I can program it.
>
> I only need to install a package called spead in order to use the .bof
> file with tutorial 3 of CASPER.
>
> Where can a download the spead package from? I can only find PySpead
> and Spead2.
>
> Thanks for everyones help
>
> Heystek!
>
> On Fri, Sep 30, 2016 at 5:28 PM, Adam Isaacson 
> wrote:
>
>> Hi Heystek,
>>
>> If you want to telnet, which is another way of configuring your
>> board, then you need to state the port. Are you doing the following from
>> the terminal:
>>
>> 1)Telnet to port 7147: "telnet  7147".
>>
>> 2)?progremote fpgfile.fpg
>>
>> You say you can ping your board, so you should be able to connect via
>> casperfpga, as you mentioned above. Did you do what James suggested i.e.
>> try running fpga.is_connected()? if it reports "True" then you are
>> connected and if false then you will need to debug further. Are you sure
>> that the IP you are pinging is your roach2 - may sound like a silly
>> question, but I don't know your setup.
>>
>> Kind Regards,
>>
>> Adam
>>
>>
>> On Fri, Sep 30, 2016 at 3:38 PM, Heystek Grobler <
>> heystekgrob...@gmail.com> wrote:
>>
>>> Hi James
>>>
>>> I will try it. Through the terminal I can ping the board, but I cant
>>> open a Telnet connection.
>>>
>>> When I open a ttyUSB connection to the Roach en monitor it, and try
>>> to upload the fga file, the Roach gives the same error "progremote"
>>>
>>> Thats why I'm confused
>>>
>>> Thanks for your help!
>>>
>>> I really appreciate it
>>>
>>> Heystek
>>>
>>>
>>> On 

Re: [casper] Programming a ROACH2

2016-10-07 Thread James Smith
Hello Heystek,

I vaguely recall installing spead from pip as well, as Ryan has done here.
Give that a whirl.

Regards,
James


On Fri, Oct 7, 2016 at 11:06 AM, Ryan Monroe 
wrote:

> rmonroe@rmonroe-ThinkPad-P50:~$ sudo pip install spead
> [sudo] password for rmonroe:
> The directory '/home/rmonroe/.cache/pip/http' or its parent directory is
> not owned by the current user and the cache has been disabled. Please check
> the permissions and owner of that directory. If executing pip with sudo,
> you may want sudo's -H flag.
> The directory '/home/rmonroe/.cache/pip' or its parent directory is not
> owned by the current user and caching wheels has been disabled. check the
> permissions and owner of that directory. If executing pip with sudo, you
> may want sudo's -H flag.
> Collecting spead
>   Downloading spead-0.5.1.tar.gz (61kB)
> 100% || 71kB 1.5MB/s
> Installing collected packages: spead
>   Running setup.py install for spead ... done
> Successfully installed spead-0.5.1
> rmonroe@rmonroe-ThinkPad-P50:~$ ipython
> Python 2.7.12 (default, Jul  1 2016, 15:12:24)
> Type "copyright", "credits" or "license" for more information.
>
> IPython 2.4.1 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help  -> Python's own help system.
> object?   -> Details about 'object', use 'object??' for extra details.
>
> In [1]: import spead
>
> In [2]:
>
>
> On 10/07/2016 02:04 AM, Heystek Grobler wrote:
>
> Hi James
>
> I installed the PySpead package but I get the following error when I run
> the tut3.py script:
>
> ImportError: No mode named spead
>
> Do you perhaps have any ideas on how to solve it?
>
> Thank you!!
>
> Heystek
>
> On Fri, Oct 7, 2016 at 11:01 AM, James Smith  wrote:
>
>> Hello Heystek,
>>
>> If you're still in the Python environment, then PySpead is the one you
>> want.
>>
>> Regards,
>> James
>>
>>
>> On Fri, Oct 7, 2016 at 10:59 AM, Heystek Grobler <
>> heystekgrob...@gmail.com> wrote:
>>
>>> Good Day
>>>
>>> After a while of troubleshooting I determined the connection with TCP/IP
>>> into the board was correct. I updated the file system and kernel of the
>>> ROACH2 and now I can program it.
>>>
>>> I only need to install a package called spead in order to use the .bof
>>> file with tutorial 3 of CASPER.
>>>
>>> Where can a download the spead package from? I can only find PySpead and
>>> Spead2.
>>>
>>> Thanks for everyones help
>>>
>>> Heystek!
>>>
>>> On Fri, Sep 30, 2016 at 5:28 PM, Adam Isaacson 
>>> wrote:
>>>
 Hi Heystek,

 If you want to telnet, which is another way of configuring your board,
 then you need to state the port. Are you doing the following from the
 terminal:

 1)Telnet to port 7147: "telnet  7147".

 2)?progremote fpgfile.fpg

 You say you can ping your board, so you should be able to connect via
 casperfpga, as you mentioned above. Did you do what James suggested i.e.
 try running fpga.is_connected()? if it reports "True" then you are
 connected and if false then you will need to debug further. Are you sure
 that the IP you are pinging is your roach2 - may sound like a silly
 question, but I don't know your setup.

 Kind Regards,

 Adam


 On Fri, Sep 30, 2016 at 3:38 PM, Heystek Grobler <
 heystekgrob...@gmail.com> wrote:

> Hi James
>
> I will try it. Through the terminal I can ping the board, but I cant
> open a Telnet connection.
>
> When I open a ttyUSB connection to the Roach en monitor it, and try to
> upload the fga file, the Roach gives the same error "progremote"
>
> Thats why I'm confused
>
> Thanks for your help!
>
> I really appreciate it
>
> Heystek
>
>
> On Friday, 30 September 2016, James Smith  wrote:
>
>> Hello Heystek,
>>
>> Before you program the ROACH2, I'd suggest trying fpga.is_connected()
>> and fpga.est_clk_frequency() to check whether you can actually
>> communicate with the ROACH2. It might be a network cable that's been
>> unplugged by accident - that's where I've seen those errors before. The
>> fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address')
>> doesn't actually throw an error if it can't connect to the ROACH2. This
>> information would at least help you narrow down the possibilities as to
>> what's wrong (i.e. whether it's the kernel on the ROACH2).
>>
>> Disclaimer: I work only on ROACH, but I'm fairly certain the
>> procedure would be the same.
>>
>> Regards,
>> James
>>
>>
>> On Fri, Sep 30, 2016 at 1:36 PM, Heystek Grobler <
>> heystekgrob...@gmail.com> wrote:
>>
>>> Good day everyone
>>>
>>> I am having difficulties programming the ROACH 2 board. I am
>>> 

Re: [casper] Programming a ROACH2

2016-10-07 Thread Heystek Grobler
Hi James

I installed the PySpead package but I get the following error when I run
the tut3.py script:

ImportError: No mode named spead

Do you perhaps have any ideas on how to solve it?

Thank you!!

Heystek

On Fri, Oct 7, 2016 at 11:01 AM, James Smith  wrote:

> Hello Heystek,
>
> If you're still in the Python environment, then PySpead is the one you
> want.
>
> Regards,
> James
>
>
> On Fri, Oct 7, 2016 at 10:59 AM, Heystek Grobler  > wrote:
>
>> Good Day
>>
>> After a while of troubleshooting I determined the connection with TCP/IP
>> into the board was correct. I updated the file system and kernel of the
>> ROACH2 and now I can program it.
>>
>> I only need to install a package called spead in order to use the .bof
>> file with tutorial 3 of CASPER.
>>
>> Where can a download the spead package from? I can only find PySpead and
>> Spead2.
>>
>> Thanks for everyones help
>>
>> Heystek!
>>
>> On Fri, Sep 30, 2016 at 5:28 PM, Adam Isaacson 
>> wrote:
>>
>>> Hi Heystek,
>>>
>>> If you want to telnet, which is another way of configuring your board,
>>> then you need to state the port. Are you doing the following from the
>>> terminal:
>>>
>>> 1)Telnet to port 7147: "telnet  7147".
>>>
>>> 2)?progremote fpgfile.fpg
>>>
>>> You say you can ping your board, so you should be able to connect via
>>> casperfpga, as you mentioned above. Did you do what James suggested i.e.
>>> try running fpga.is_connected()? if it reports "True" then you are
>>> connected and if false then you will need to debug further. Are you sure
>>> that the IP you are pinging is your roach2 - may sound like a silly
>>> question, but I don't know your setup.
>>>
>>> Kind Regards,
>>>
>>> Adam
>>>
>>>
>>> On Fri, Sep 30, 2016 at 3:38 PM, Heystek Grobler <
>>> heystekgrob...@gmail.com> wrote:
>>>
 Hi James

 I will try it. Through the terminal I can ping the board, but I cant
 open a Telnet connection.

 When I open a ttyUSB connection to the Roach en monitor it, and try to
 upload the fga file, the Roach gives the same error "progremote"

 Thats why I'm confused

 Thanks for your help!

 I really appreciate it

 Heystek


 On Friday, 30 September 2016, James Smith  wrote:

> Hello Heystek,
>
> Before you program the ROACH2, I'd suggest trying fpga.is_connected()
> and fpga.est_clk_frequency() to check whether you can actually
> communicate with the ROACH2. It might be a network cable that's been
> unplugged by accident - that's where I've seen those errors before. The
> fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address')
> doesn't actually throw an error if it can't connect to the ROACH2. This
> information would at least help you narrow down the possibilities as to
> what's wrong (i.e. whether it's the kernel on the ROACH2).
>
> Disclaimer: I work only on ROACH, but I'm fairly certain the procedure
> would be the same.
>
> Regards,
> James
>
>
> On Fri, Sep 30, 2016 at 1:36 PM, Heystek Grobler <
> heystekgrob...@gmail.com> wrote:
>
>> Good day everyone
>>
>> I am having difficulties programming the ROACH 2 board. I am
>> following the instructions of CASPER tutorial one.
>>
>> I Have compiled the fpg file and is using the following steps from
>> the tutorial.
>>
>> 1. I entered ipython into the terminal
>> 2. import casperfpga
>> 3. fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address')
>> with the ip address of my roach
>> 4. fpga.upload_to_ram_and_program('your_fpgfile.fpg') with the
>> location of the .fpga file
>>
>> but at point 4 I get the following error:
>>
>> RuntimeError  Traceback (most recent
>> call last)
>>  in ()
>> > 1 fpga.upload_to_ram_and_program('/home/heystek/simulink/ai_t1
>> /bit_files/ai_t1_2016_Sep_14_2052.fpg')
>>
>> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in
>> upload_to_ram_and_program(self, filename, port, timeout,
>> wait_complete)
>> 442 if request_result != '':
>> 443 raise RuntimeError('progremote request(%s) on
>> host %s failed' %
>> --> 444(request_result, self.host))
>> 445
>> 446 # start the upload thread and join
>>
>> RuntimeError: progremote request(Request to client 192.168.33.4
>> failed.) on host 192.168.33.4 failed
>>
>> Am I doing something wrong?
>>
>> I looked at the mail archives and it sugested that I update the
>> kernel of the roach. Is this perhaps the problem? Or am I doing something
>> wrong?
>>
>> Have a wonderful day.
>>
>> Heystek
>>
>
>
>>>
>>>
>>> --
>>>
>>> Adam Isaacson
>>>
>>> DBE: FPGA Engineer

Re: [casper] Programming a ROACH2

2016-10-07 Thread James Smith
Hello Heystek,

If you're still in the Python environment, then PySpead is the one you want.

Regards,
James


On Fri, Oct 7, 2016 at 10:59 AM, Heystek Grobler 
wrote:

> Good Day
>
> After a while of troubleshooting I determined the connection with TCP/IP
> into the board was correct. I updated the file system and kernel of the
> ROACH2 and now I can program it.
>
> I only need to install a package called spead in order to use the .bof
> file with tutorial 3 of CASPER.
>
> Where can a download the spead package from? I can only find PySpead and
> Spead2.
>
> Thanks for everyones help
>
> Heystek!
>
> On Fri, Sep 30, 2016 at 5:28 PM, Adam Isaacson 
> wrote:
>
>> Hi Heystek,
>>
>> If you want to telnet, which is another way of configuring your board,
>> then you need to state the port. Are you doing the following from the
>> terminal:
>>
>> 1)Telnet to port 7147: "telnet  7147".
>>
>> 2)?progremote fpgfile.fpg
>>
>> You say you can ping your board, so you should be able to connect via
>> casperfpga, as you mentioned above. Did you do what James suggested i.e.
>> try running fpga.is_connected()? if it reports "True" then you are
>> connected and if false then you will need to debug further. Are you sure
>> that the IP you are pinging is your roach2 - may sound like a silly
>> question, but I don't know your setup.
>>
>> Kind Regards,
>>
>> Adam
>>
>>
>> On Fri, Sep 30, 2016 at 3:38 PM, Heystek Grobler <
>> heystekgrob...@gmail.com> wrote:
>>
>>> Hi James
>>>
>>> I will try it. Through the terminal I can ping the board, but I cant
>>> open a Telnet connection.
>>>
>>> When I open a ttyUSB connection to the Roach en monitor it, and try to
>>> upload the fga file, the Roach gives the same error "progremote"
>>>
>>> Thats why I'm confused
>>>
>>> Thanks for your help!
>>>
>>> I really appreciate it
>>>
>>> Heystek
>>>
>>>
>>> On Friday, 30 September 2016, James Smith  wrote:
>>>
 Hello Heystek,

 Before you program the ROACH2, I'd suggest trying fpga.is_connected()
 and fpga.est_clk_frequency() to check whether you can actually
 communicate with the ROACH2. It might be a network cable that's been
 unplugged by accident - that's where I've seen those errors before. The
 fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address')
 doesn't actually throw an error if it can't connect to the ROACH2. This
 information would at least help you narrow down the possibilities as to
 what's wrong (i.e. whether it's the kernel on the ROACH2).

 Disclaimer: I work only on ROACH, but I'm fairly certain the procedure
 would be the same.

 Regards,
 James


 On Fri, Sep 30, 2016 at 1:36 PM, Heystek Grobler <
 heystekgrob...@gmail.com> wrote:

> Good day everyone
>
> I am having difficulties programming the ROACH 2 board. I am following
> the instructions of CASPER tutorial one.
>
> I Have compiled the fpg file and is using the following steps from the
> tutorial.
>
> 1. I entered ipython into the terminal
> 2. import casperfpga
> 3. fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address')
> with the ip address of my roach
> 4. fpga.upload_to_ram_and_program('your_fpgfile.fpg') with the
> location of the .fpga file
>
> but at point 4 I get the following error:
>
> RuntimeError  Traceback (most recent call
> last)
>  in ()
> > 1 fpga.upload_to_ram_and_program('/home/heystek/simulink/ai_t1
> /bit_files/ai_t1_2016_Sep_14_2052.fpg')
>
> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in
> upload_to_ram_and_program(self, filename, port, timeout,
> wait_complete)
> 442 if request_result != '':
> 443 raise RuntimeError('progremote request(%s) on host
> %s failed' %
> --> 444(request_result, self.host))
> 445
> 446 # start the upload thread and join
>
> RuntimeError: progremote request(Request to client 192.168.33.4
> failed.) on host 192.168.33.4 failed
>
> Am I doing something wrong?
>
> I looked at the mail archives and it sugested that I update the kernel
> of the roach. Is this perhaps the problem? Or am I doing something wrong?
>
> Have a wonderful day.
>
> Heystek
>


>>
>>
>> --
>>
>> Adam Isaacson
>>
>> DBE: FPGA Engineer
>>
>> SKA-SA
>>
>> 3rd Floor
>>
>> The Park
>>
>> Park Road
>>
>> Pinelands
>>
>> 7405
>>
>>
>> Tel: +27215067300 (W)
>>
>> Fax: +27215067375 (W)
>>
>> Cell: +27825639602
>>
>
>


Re: [casper] Programming a ROACH2

2016-10-07 Thread Heystek Grobler
Good Day

After a while of troubleshooting I determined the connection with TCP/IP
into the board was correct. I updated the file system and kernel of the
ROACH2 and now I can program it.

I only need to install a package called spead in order to use the .bof file
with tutorial 3 of CASPER.

Where can a download the spead package from? I can only find PySpead and
Spead2.

Thanks for everyones help

Heystek!

On Fri, Sep 30, 2016 at 5:28 PM, Adam Isaacson  wrote:

> Hi Heystek,
>
> If you want to telnet, which is another way of configuring your board,
> then you need to state the port. Are you doing the following from the
> terminal:
>
> 1)Telnet to port 7147: "telnet  7147".
>
> 2)?progremote fpgfile.fpg
>
> You say you can ping your board, so you should be able to connect via
> casperfpga, as you mentioned above. Did you do what James suggested i.e.
> try running fpga.is_connected()? if it reports "True" then you are
> connected and if false then you will need to debug further. Are you sure
> that the IP you are pinging is your roach2 - may sound like a silly
> question, but I don't know your setup.
>
> Kind Regards,
>
> Adam
>
>
> On Fri, Sep 30, 2016 at 3:38 PM, Heystek Grobler  > wrote:
>
>> Hi James
>>
>> I will try it. Through the terminal I can ping the board, but I cant open
>> a Telnet connection.
>>
>> When I open a ttyUSB connection to the Roach en monitor it, and try to
>> upload the fga file, the Roach gives the same error "progremote"
>>
>> Thats why I'm confused
>>
>> Thanks for your help!
>>
>> I really appreciate it
>>
>> Heystek
>>
>>
>> On Friday, 30 September 2016, James Smith  wrote:
>>
>>> Hello Heystek,
>>>
>>> Before you program the ROACH2, I'd suggest trying fpga.is_connected()
>>> and fpga.est_clk_frequency() to check whether you can actually
>>> communicate with the ROACH2. It might be a network cable that's been
>>> unplugged by accident - that's where I've seen those errors before. The
>>> fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address') doesn't
>>> actually throw an error if it can't connect to the ROACH2. This information
>>> would at least help you narrow down the possibilities as to what's wrong
>>> (i.e. whether it's the kernel on the ROACH2).
>>>
>>> Disclaimer: I work only on ROACH, but I'm fairly certain the procedure
>>> would be the same.
>>>
>>> Regards,
>>> James
>>>
>>>
>>> On Fri, Sep 30, 2016 at 1:36 PM, Heystek Grobler <
>>> heystekgrob...@gmail.com> wrote:
>>>
 Good day everyone

 I am having difficulties programming the ROACH 2 board. I am following
 the instructions of CASPER tutorial one.

 I Have compiled the fpg file and is using the following steps from the
 tutorial.

 1. I entered ipython into the terminal
 2. import casperfpga
 3. fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address')
 with the ip address of my roach
 4. fpga.upload_to_ram_and_program('your_fpgfile.fpg') with the
 location of the .fpga file

 but at point 4 I get the following error:

 RuntimeError  Traceback (most recent call
 last)
  in ()
 > 1 fpga.upload_to_ram_and_program('/home/heystek/simulink/ai_t1
 /bit_files/ai_t1_2016_Sep_14_2052.fpg')

 /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in
 upload_to_ram_and_program(self, filename, port, timeout, wait_complete)
 442 if request_result != '':
 443 raise RuntimeError('progremote request(%s) on host
 %s failed' %
 --> 444(request_result, self.host))
 445
 446 # start the upload thread and join

 RuntimeError: progremote request(Request to client 192.168.33.4
 failed.) on host 192.168.33.4 failed

 Am I doing something wrong?

 I looked at the mail archives and it sugested that I update the kernel
 of the roach. Is this perhaps the problem? Or am I doing something wrong?

 Have a wonderful day.

 Heystek

>>>
>>>
>
>
> --
>
> Adam Isaacson
>
> DBE: FPGA Engineer
>
> SKA-SA
>
> 3rd Floor
>
> The Park
>
> Park Road
>
> Pinelands
>
> 7405
>
>
> Tel: +27215067300 (W)
>
> Fax: +27215067375 (W)
>
> Cell: +27825639602
>


Re: [casper] Programming a ROACH2

2016-09-30 Thread Adam Isaacson
Hi Heystek,

If you want to telnet, which is another way of configuring your board, then
you need to state the port. Are you doing the following from the terminal:

1)Telnet to port 7147: "telnet  7147".

2)?progremote fpgfile.fpg

You say you can ping your board, so you should be able to connect via
casperfpga, as you mentioned above. Did you do what James suggested i.e.
try running fpga.is_connected()? if it reports "True" then you are
connected and if false then you will need to debug further. Are you sure
that the IP you are pinging is your roach2 - may sound like a silly
question, but I don't know your setup.

Kind Regards,

Adam


On Fri, Sep 30, 2016 at 3:38 PM, Heystek Grobler 
wrote:

> Hi James
>
> I will try it. Through the terminal I can ping the board, but I cant open
> a Telnet connection.
>
> When I open a ttyUSB connection to the Roach en monitor it, and try to
> upload the fga file, the Roach gives the same error "progremote"
>
> Thats why I'm confused
>
> Thanks for your help!
>
> I really appreciate it
>
> Heystek
>
>
> On Friday, 30 September 2016, James Smith  wrote:
>
>> Hello Heystek,
>>
>> Before you program the ROACH2, I'd suggest trying fpga.is_connected()
>> and fpga.est_clk_frequency() to check whether you can actually
>> communicate with the ROACH2. It might be a network cable that's been
>> unplugged by accident - that's where I've seen those errors before. The
>> fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address') doesn't
>> actually throw an error if it can't connect to the ROACH2. This information
>> would at least help you narrow down the possibilities as to what's wrong
>> (i.e. whether it's the kernel on the ROACH2).
>>
>> Disclaimer: I work only on ROACH, but I'm fairly certain the procedure
>> would be the same.
>>
>> Regards,
>> James
>>
>>
>> On Fri, Sep 30, 2016 at 1:36 PM, Heystek Grobler <
>> heystekgrob...@gmail.com> wrote:
>>
>>> Good day everyone
>>>
>>> I am having difficulties programming the ROACH 2 board. I am following
>>> the instructions of CASPER tutorial one.
>>>
>>> I Have compiled the fpg file and is using the following steps from the
>>> tutorial.
>>>
>>> 1. I entered ipython into the terminal
>>> 2. import casperfpga
>>> 3. fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address') with
>>> the ip address of my roach
>>> 4. fpga.upload_to_ram_and_program('your_fpgfile.fpg') with the location
>>> of the .fpga file
>>>
>>> but at point 4 I get the following error:
>>>
>>> RuntimeError  Traceback (most recent call
>>> last)
>>>  in ()
>>> > 1 fpga.upload_to_ram_and_program('/home/heystek/simulink/ai_t1
>>> /bit_files/ai_t1_2016_Sep_14_2052.fpg')
>>>
>>> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in
>>> upload_to_ram_and_program(self, filename, port, timeout, wait_complete)
>>> 442 if request_result != '':
>>> 443 raise RuntimeError('progremote request(%s) on host
>>> %s failed' %
>>> --> 444(request_result, self.host))
>>> 445
>>> 446 # start the upload thread and join
>>>
>>> RuntimeError: progremote request(Request to client 192.168.33.4 failed.)
>>> on host 192.168.33.4 failed
>>>
>>> Am I doing something wrong?
>>>
>>> I looked at the mail archives and it sugested that I update the kernel
>>> of the roach. Is this perhaps the problem? Or am I doing something wrong?
>>>
>>> Have a wonderful day.
>>>
>>> Heystek
>>>
>>
>>


-- 

Adam Isaacson

DBE: FPGA Engineer

SKA-SA

3rd Floor

The Park

Park Road

Pinelands

7405


Tel: +27215067300 (W)

Fax: +27215067375 (W)

Cell: +27825639602


Re: [casper] Programming a ROACH2

2016-09-30 Thread Heystek Grobler
Hi James

I will try it. Through the terminal I can ping the board, but I cant open a
Telnet connection.

When I open a ttyUSB connection to the Roach en monitor it, and try to
upload the fga file, the Roach gives the same error "progremote"

Thats why I'm confused

Thanks for your help!

I really appreciate it

Heystek

On Friday, 30 September 2016, James Smith  wrote:

> Hello Heystek,
>
> Before you program the ROACH2, I'd suggest trying fpga.is_connected() and
> fpga.est_clk_frequency() to check whether you can actually communicate
> with the ROACH2. It might be a network cable that's been unplugged by
> accident - that's where I've seen those errors before. The
> fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address') doesn't
> actually throw an error if it can't connect to the ROACH2. This information
> would at least help you narrow down the possibilities as to what's wrong
> (i.e. whether it's the kernel on the ROACH2).
>
> Disclaimer: I work only on ROACH, but I'm fairly certain the procedure
> would be the same.
>
> Regards,
> James
>
>
> On Fri, Sep 30, 2016 at 1:36 PM, Heystek Grobler  > wrote:
>
>> Good day everyone
>>
>> I am having difficulties programming the ROACH 2 board. I am following
>> the instructions of CASPER tutorial one.
>>
>> I Have compiled the fpg file and is using the following steps from the
>> tutorial.
>>
>> 1. I entered ipython into the terminal
>> 2. import casperfpga
>> 3. fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address') with
>> the ip address of my roach
>> 4. fpga.upload_to_ram_and_program('your_fpgfile.fpg') with the location
>> of the .fpga file
>>
>> but at point 4 I get the following error:
>>
>> RuntimeError  Traceback (most recent call
>> last)
>>  in ()
>> > 1 fpga.upload_to_ram_and_program('/home/heystek/simulink/ai_t1
>> /bit_files/ai_t1_2016_Sep_14_2052.fpg')
>>
>> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in
>> upload_to_ram_and_program(self, filename, port, timeout, wait_complete)
>> 442 if request_result != '':
>> 443 raise RuntimeError('progremote request(%s) on host %s
>> failed' %
>> --> 444(request_result, self.host))
>> 445
>> 446 # start the upload thread and join
>>
>> RuntimeError: progremote request(Request to client 192.168.33.4 failed.)
>> on host 192.168.33.4 failed
>>
>> Am I doing something wrong?
>>
>> I looked at the mail archives and it sugested that I update the kernel of
>> the roach. Is this perhaps the problem? Or am I doing something wrong?
>>
>> Have a wonderful day.
>>
>> Heystek
>>
>
>


Re: [casper] Programming a ROACH2

2016-09-30 Thread James Smith
Hello Heystek,

Before you program the ROACH2, I'd suggest trying fpga.is_connected() and
fpga.est_clk_frequency() to check whether you can actually communicate with
the ROACH2. It might be a network cable that's been unplugged by accident -
that's where I've seen those errors before. The
fpga=casperfpga.katcp_fpga.KatcpFpga('roachname
or ip_address') doesn't actually throw an error if it can't connect to the
ROACH2. This information would at least help you narrow down the
possibilities as to what's wrong (i.e. whether it's the kernel on the
ROACH2).

Disclaimer: I work only on ROACH, but I'm fairly certain the procedure
would be the same.

Regards,
James


On Fri, Sep 30, 2016 at 1:36 PM, Heystek Grobler 
wrote:

> Good day everyone
>
> I am having difficulties programming the ROACH 2 board. I am following the
> instructions of CASPER tutorial one.
>
> I Have compiled the fpg file and is using the following steps from the
> tutorial.
>
> 1. I entered ipython into the terminal
> 2. import casperfpga
> 3. fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address') with
> the ip address of my roach
> 4. fpga.upload_to_ram_and_program('your_fpgfile.fpg') with the location
> of the .fpga file
>
> but at point 4 I get the following error:
>
> RuntimeError  Traceback (most recent call
> last)
>  in ()
> > 1 fpga.upload_to_ram_and_program('/home/heystek/simulink/ai_
> t1/bit_files/ai_t1_2016_Sep_14_2052.fpg')
>
> /usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in
> upload_to_ram_and_program(self, filename, port, timeout, wait_complete)
> 442 if request_result != '':
> 443 raise RuntimeError('progremote request(%s) on host %s
> failed' %
> --> 444(request_result, self.host))
> 445
> 446 # start the upload thread and join
>
> RuntimeError: progremote request(Request to client 192.168.33.4 failed.)
> on host 192.168.33.4 failed
>
> Am I doing something wrong?
>
> I looked at the mail archives and it sugested that I update the kernel of
> the roach. Is this perhaps the problem? Or am I doing something wrong?
>
> Have a wonderful day.
>
> Heystek
>


[casper] Programming a ROACH2

2016-09-30 Thread Heystek Grobler
Good day everyone

I am having difficulties programming the ROACH 2 board. I am following the
instructions of CASPER tutorial one.

I Have compiled the fpg file and is using the following steps from the
tutorial.

1. I entered ipython into the terminal
2. import casperfpga
3. fpga=casperfpga.katcp_fpga.KatcpFpga('roachname or ip_address') with the
ip address of my roach
4. fpga.upload_to_ram_and_program('your_fpgfile.fpg') with the location of
the .fpga file

but at point 4 I get the following error:

RuntimeError  Traceback (most recent call last)
 in ()
> 1 fpga.upload_to_ram_and_program('/home/heystek/
simulink/ai_t1/bit_files/ai_t1_2016_Sep_14_2052.fpg')

/usr/local/lib/python2.7/dist-packages/casperfpga/katcp_fpga.pyc in
upload_to_ram_and_program(self, filename, port, timeout, wait_complete)
442 if request_result != '':
443 raise RuntimeError('progremote request(%s) on host %s
failed' %
--> 444(request_result, self.host))
445
446 # start the upload thread and join

RuntimeError: progremote request(Request to client 192.168.33.4 failed.) on
host 192.168.33.4 failed

Am I doing something wrong?

I looked at the mail archives and it sugested that I update the kernel of
the roach. Is this perhaps the problem? Or am I doing something wrong?

Have a wonderful day.

Heystek