We use this tag in our repo for supporting ROACH1:
https://github.com/ska-sa/casperfpga/releases/tag/AVN_legacy
Note that you can't use upload_to_ram_and_program. It's a three-step
process.

fpga.system_info['program_filename'] = '%s.bof' % gateware #bof needs to be
on the roachfs for this to work
fpga.program()
fpga.get_system_information('%s.fpg' % gateware) #fpg file needs to be in
current working directory

Give that a spin.



On Fri, May 10, 2019 at 9:06 AM Adam Isaacson <aisaac...@ska.ac.za> wrote:

> Hi Indrajit,
>
> This how to is fairly old now - many changes have been made since then and
> we have and are moving all CASPER documentation to ReadtheDocs or at least
> readme.md files in github, which can be easily added to ReadtheDocs if
> necessary. The casperfpga repo still needs to be properly documented and
> this is due to happen in July after the Hardware Porting Workshop. If ROACH
> support is lacking and it becomes a requirement, then we can look at this
> as a task to add during that week. Jack, would be able to give you better
> feedback here.
>
> I am assuming you are using the casper-astro repo? I know Jack made a
> recent change to get casperfpga working with ROACH2 i.e. the
> upload_to_ram_and_program() can now configure the FPGA on ROACH2. I am not
> sure about ROACH1 - a bit before my time here. Others may know more.
>
> casper-astro casperfpga repo:
> https://github.com/casper-astro/casperfpga/commits/master
>
> In this repo there is a readme.md file, which explains how to install
> casperfpga and also references commit hashes that work with ROACH/ROACH2. I
> haven't tried them so I am not sure.
>
> I hope this helps.
>
> Kind regards,
>
> Adam Isaacson
> South African Radio Astronomy Observatory (SARAO)
> Hardware Manager
> Cell: (+27) 825639602
> Tel:  (+27) 215067300
> email: aisaac...@ska.ac.za
>
>
>
> On Fri, May 10, 2019 at 7:44 AM Indrajit Barve <indra...@iiap.res.in>
> wrote:
>
>> Dear Adam,
>>
>> I followed the steps which you have given in the bellow link to install
>> casperfpga package.
>>
>> https://www.mail-archive.com/casper@lists.berkeley.edu/msg06436.html
>>
>> https://docs.google.com/document/d/1mqDIwhHo3981_Rq9Ma6Dl8UnQUzPah6DKQ55fsaeI4c/edit
>> By following the steps via git . Hope it downloads the latest version of
>> katcp and casperfpga.
>>
>> I am using ROACH1 and I am trying to program the device and I am getting
>> the following errors.
>>
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>
>>
>> import time,struct,sys,logging,casperfpga
>> from struct import *
>> fpga = casperfpga.katcp_fpga.KatcpFpga('100.100.100.1',7147,10)
>> bitstream='spectrum_test14_2019_May_09_1616.bof'
>> fpga.system_info['program_filename'] = bitstream
>> fpga.program()
>> time.sleep(3)
>>
>> *'module' object has no attribute 'katcp_fpga' *
>>
>> I tried the other ways
>>
>> roach = casperfpga.CasperFpga('100.100.100.1')
>> roach.upload_to_ram_and_program('spectrum_test14_2019_May_09_1616.fpg')
>>
>>
>>
>>
>> ---------------------------------------------------------------------------
>> TypeError                                 Traceback (most recent call
>> last)
>> <ipython-input-10-e89a752b4c79> in <module>()
>> ----> 1
>> roach.upload_to_ram_and_program('spectrum_test14_2019_May_09_1616.fpg')
>>
>> /usr/local/lib/python2.7/dist-packages/casperfpga-3.2.dev644+devel.3377047-py2.7-linux-x86_64.egg/casperfpga/casperfpga.pyc
>> in upload_to_ram_and_program(self, filename, wait_complete, legacy_reg_map,
>> chunk_size, initialise_objects)
>>     278             filename = self.bitstream
>>     279         rv = self.transport.upload_to_ram_and_program(
>> --> 280             filename=filename, wait_complete=wait_complete,
>> chunk_size=chunk_size)
>>     281         if not wait_complete:
>>     282             return True
>>
>> TypeError: upload_to_ram_and_program() got an unexpected keyword argument
>> 'chunk_size'
>>
>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>
>>
>>
>>
>>
>> Indrajit Barve
>> indra...@iiap.res.in
>> 080-22541492
>>
> --
> You received this message because you are subscribed to the Google Groups "
> casper@lists.berkeley.edu" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to casper+unsubscr...@lists.berkeley.edu.
> To post to this group, send email to casper@lists.berkeley.edu.
>

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

Reply via email to