[casper] Skarab programming error "Skarab has not come back after programming"

2022-01-10 Thread June Tantiparimongkol
Hi! Casperities,

I'm writing to you guys for question on Skarab upload and programming
error. Now, we're trying to program some fpg file into the platform but it
fails. The error shows "*ERROR 192.168.3.2 transport_skarab.py:755 - Skarab
has not come back after programming.*"
So, I have try on generate new fpg files with tutorial design without
editing (in https://github.com/casper-astro/tutorials_devel.git ) and
upload and program. After, when we upload and programm new fpg file from
tut_intro, tut_40gbe, tut_hmc, it shows the same errors too (as shown in
figure). On the other hand, it has no problem when we worked on tutorial by
using the example fpg files which are provided within tutorial_devel
folder. Also, it has no problem with new-generate fpg file from
skarab_adc_test and tut_spec which we have to generate due to mezzanine
site configuration.

But there're some condition for our work that we have to generate new fpg
file with our computer which has Ubuntu 20 OS due to our Ubuntu 18 OS has
not enough resource to run on execution flow.

So, I wonder that what is the problems. Could anyone suggest us about this
please.

Thanks and sincerely,
-- June
National Astronomical Research Institute of Thailand (NARIT)
[image: Skarab has not come back after programming.png]

-- 
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 view this discussion on the web visit 
https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CABKTCqFRWfX9ujJmfyXYF_h%3D_izsQB9MXM6yUxifByasV2Kv9g%40mail.gmail.com.


Re: [casper] Skarab programming error "Skarab has not come back after programming"

2022-01-12 Thread June Tantiparimongkol
Hi ! Wes,

Thank you for your immediate response and reminding me about this issue on
1GbE yellow block. It really helps!!

Best regards,
--June

ในวันที่ อ. 11 ม.ค. 2022 เวลา 14:11 Wesley New 
เขียนว่า:

> Hi June,
>
> Over what ethernet interface are you connecting to the SKARAB? 1GbE or
> 40GbE. IIRC the boot firmware comes with both a 1gbe and 1 of the 40gbe
> interfaces built in. The designs you mention would only have the 1 or more
> 40gbe ethernet interfaces included. You would see the symptoms you are
> describing if you initially connect via 1gbe and then it is not included in
> the uploaded design.
>
> Hope this helps.
>
> Regards
>
> Wes
>
>
>
> On Mon, Jan 10, 2022 at 11:35 PM June Tantiparimongkol <
> junepn...@gmail.com> wrote:
>
>> Hi! Casperities,
>>
>> I'm writing to you guys for question on Skarab upload and programming
>> error. Now, we're trying to program some fpg file into the platform but it
>> fails. The error shows "*ERROR 192.168.3.2 transport_skarab.py:755 -
>> Skarab has not come back after programming.*"
>> So, I have try on generate new fpg files with tutorial design without
>> editing (in https://github.com/casper-astro/tutorials_devel.git ) and
>> upload and program. After, when we upload and programm new fpg file from
>> tut_intro, tut_40gbe, tut_hmc, it shows the same errors too (as shown in
>> figure). On the other hand, it has no problem when we worked on tutorial by
>> using the example fpg files which are provided within tutorial_devel
>> folder. Also, it has no problem with new-generate fpg file from
>> skarab_adc_test and tut_spec which we have to generate due to mezzanine
>> site configuration.
>>
>> But there're some condition for our work that we have to generate new fpg
>> file with our computer which has Ubuntu 20 OS due to our Ubuntu 18 OS has
>> not enough resource to run on execution flow.
>>
>> So, I wonder that what is the problems. Could anyone suggest us about
>> this please.
>>
>> Thanks and sincerely,
>> -- June
>> National Astronomical Research Institute of Thailand (NARIT)
>> [image: Skarab has not come back after programming.png]
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CABKTCqFRWfX9ujJmfyXYF_h%3D_izsQB9MXM6yUxifByasV2Kv9g%40mail.gmail.com
>> <https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CABKTCqFRWfX9ujJmfyXYF_h%3D_izsQB9MXM6yUxifByasV2Kv9g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CAE2vkmWHYEK0fnA35LOnBsvKJzXixB4_cgNB%3DYUgJckUwcmwRg%40mail.gmail.com
> <https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CAE2vkmWHYEK0fnA35LOnBsvKJzXixB4_cgNB%3DYUgJckUwcmwRg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Sincerely,
June Tantiparimongkol
e-mail address: junepn...@gmail.com

-- 
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 view this discussion on the web visit 
https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CABKTCqFXEnk6Hh7M9PtvZu0W15A4Cu%2BWZ4GviqWe89Er7zMm5g%40mail.gmail.com.


[casper] Question on Casperfpga python 3.8 version

2023-05-29 Thread June Tantiparimongkol
Dear all,

Due to the upgrade of '*casperfpga*' library from python 2.7 to 3.8, I have
tried to upgrade my software to a newer version. But still got stuck on
problems that I still can't properly install and use it as I have followed
the information on
https://casper-toolflow.readthedocs.io/en/latest/src/How-to-install-casperfpga.html.
I have pulled '*casperfpga*' repository from
https://github.com/casper-astro/casperfpga.git on *py38* branch

During installation, I have found error, "*katcp==0.9.1 required tornado <5
>=4.3*". So, I have re-install it by define "*tornado<5*" in
requirements.txt and do pip install. Later, it shows another error,
"*circus==0.18.0
required tornado>5*", which circus is defined in *setup.py *

Later, when finish the installation procedure, I am able to import '
*casperfpga*' library, connect with my SKARAB hardware port. But I am
unable to upload and program firmware file (.fpg) to hardware with error
occured as  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in
position 33033: invalid start byte as detailed belows

Python 3.8.10 (default, Mar 13 2023, 10:26:41)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.12.2 -- An enhanced Interactive Python. Type '?' for help.






*In [1]: import casperfpgaIn [2]: fpga =
casperfpga.CasperFpga('192.168.91.121')In [3]: fpga.is_connected()Out[3]:
True*

*In [4]:
fpga.upload_to_ram_and_program('Data_streaming_2ps_40gbe_2022-10-26_2143.fpg')*
2023-05-29 14:26:02.83 ERROR 192.168.91.121 transport_skarab.py:715 -
Failed to program.
---
UnicodeDecodeErrorTraceback (most recent call last)
Cell In[4], line 1
> 1
fpga.upload_to_ram_and_program('Data_streaming_2ps_40gbe_2022-10-26_2143.fpg')

File
~/work/skarab/casperfpga-py3/cfpga_venv/lib/python3.8/site-packages/casperfpga/casperfpga.py:348,
in CasperFpga.upload_to_ram_and_program(self, filename, wait_complete,
initialise_objects, **kwargs)
345 else:
346 filename = self.bitstream
--> 348 rv = self.transport.upload_to_ram_and_program(
349 filename=filename, wait_complete=wait_complete, **kwargs)
351 if not wait_complete:
352 return True

File
~/work/skarab/casperfpga-py3/cfpga_venv/lib/python3.8/site-packages/casperfpga/transport_skarab.py:712,
in SkarabTransport.upload_to_ram_and_program(self, filename, port, timeout,
wait_complete, skip_verification, **kwargs)
709 chunk_size = 1988
711 try:
--> 712 upload_time = self.upload_to_ram(filename, not
skip_verification, chunk_size)
714 except:
715 self.logger.error('Failed to program.')

File
~/work/skarab/casperfpga-py3/cfpga_venv/lib/python3.8/site-packages/casperfpga/transport_skarab.py:641,
in SkarabTransport.upload_to_ram(self, filename, verify, chunk_size)
638 raise ValueError(errmsg)
639 # else: Continue!
--> 641 upload_time = skfops.upload_to_ram_progska(filename, [self.parent],
chunk_size)
642 self.logger.debug('Uploaded bitstream in %.1f seconds.' %
upload_time)
643 return upload_time

File
~/work/skarab/casperfpga-py3/cfpga_venv/lib/python3.8/site-packages/casperfpga/skarab_fileops.py:252,
in upload_to_ram_progska(filename, fpga_list, chunk_size)
250 processor = choose_processor(filename)
251 processor = processor(filename, binname)
--> 252 binname = processor.make_bin()[1]
253 fpga_hosts = [fpga.host for fpga in fpga_list]
255 # clear sdram of all fpgas before uploading

File
~/work/skarab/casperfpga-py3/cfpga_venv/lib/python3.8/site-packages/casperfpga/skarab_fileops.py:75,
in FpgProcessor.make_bin(self)
 71 """
 72 :return: the name of a produced .bin file
 73 """
 74 fpg_file = open(self.image_file, 'r')
---> 75 fpg_contents = fpg_file.read()
 76 fpg_file.close()
 78 # scan for the end of the fpg header

File /usr/lib/python3.8/codecs.py:322, in
BufferedIncrementalDecoder.decode(self, input, final)
319 def decode(self, input, final=False):
320 # decode input (taking the buffer into account)
321 data = self.buffer + input
--> 322 (result, consumed) = self._buffer_decode(data, self.errors,
final)
323 # keep undecoded input until the next call
324 self.buffer = data[consumed:]

*UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position
33033: invalid start byte*

>From my opinion, I think the error might be occurred by the python library
installation, e.g. tornado version conflict with katcp and circus in
different direction. But I have already tried on install "tornado<5" and
"circus==0.16.0" (which the error of tornado version would not shown.) But
still got *'utf-8' codec can't decode byte 0x8b in position 33033: invalid
start byte* error with the casperfpga version shown as "casperfpga-3.4.
.*dirty*."

As an unexpert, I really don't know what is the root cause for this
problem. So, anyone please do suggest me about it.

Thanks a