Re: [casper] jasper not working properly after upgrade

2019-11-21 Thread Nitish Ragoomundun
Hi,

Got the toolflow working again. :) Thank you very much for your help.
Yes, the old jasper_library/platform.pyc file was the cause. Removed it and
everything compiles correctly now.

Many thanks.
Best regards,
Nitish


On Wed, Nov 20, 2019 at 9:33 PM Jack Hickish  wrote:

> Hi Nitish,
>
> I think this is related to
> https://github.com/casper-astro/mlib_devel/commit/6e02a6ff98a9394c6b0acac570547d7841630dc9
>
> Could you check if you have a lingering "platform.pyc" file in
> mlib_devel/jasper_library and if so, delete it. Can you also check whether
> this pyc file is in your python installation directory and if so delete
> that too.
>
> I think the problem is that pyc files are not tracked by the repo, so if
> you have a version of mlib_devel from before the above commit you have
> installed from, there will be a platform.pyc file knocking around which
> will get erroneously installed after an upgrade.
>
> Let me know if that doesn't fix things.
>
> Cheers
> Jack
>
> On Wed, 20 Nov 2019 at 08:24, Jack Hickish  wrote:
>
>> Thanks for the detailed report Nitish. I have a vague recollection that
>> this is something simple which might have to do with a previous install of
>> the title not being overwritten properly.
>>
>> I'll dig through my notes and get back to you asap
>>
>> Jack
>>
>> On Wed, 20 Nov 2019, 12:02 am Nitish Ragoomundun, <
>> nitish.ragoomun...@gmail.com> wrote:
>>
>>>
>>> Thank you very much for your replies. I misunderstood the importance of
>>> the virtual environment. So I set it up like described in
>>> https://casper-toolflow.readthedocs.io/en/latest/src/Installing-the-Toolflow.html
>>> and
>>> https://casper-toolflow.readthedocs.io/en/latest/src/Configuring-the-Toolflow.html.
>>> Yes, I am using the latest version of mlib_devel. Found out that we
>>> absolutely needed the LD_PRELOAD variable set or else jasper made an error
>>> looking for symbols for XML...
>>>
>>> Yes, I think changing the shabang line to point to python3 might cause
>>> other issues. There might be other scripts down the pipeline with the same
>>> call to "python".
>>>
>>> Anyway, got the virtual env running and I thought we were good to go but
>>> got another error:
>>>
>>> XSG generation complete.
>>> 
>>> *Front End compile complete*
>>> 
>>> To complete your compile, run the following command in a terminal.
>>> Remember to source your startsg.local environment first!
>>> /home/aragorn/Documents/SNAP/casper_venv/bin/python
>>> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/exec_flow.py -m
>>> /home/aragorn/Documents/SNAP/Spectrum_Analyser/spectrum_480mhz_2048pts_3c.slx
>>> --middleware --backend --software
>>> 
>>> *  Frontend complete!  *
>>> *  Running Backend generation  *
>>> 
>>> Starting compile
>>> Starting Toolflow!
>>> Frontend is simulink
>>> Setting compile directory:
>>> /home/aragorn/Documents/SNAP/Spectrum_Analyser/spectrum_480mhz_2048pts_3c
>>> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/toolflow.py:236:
>>> YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as
>>> the default Loader is unsafe. Please read https://msg.pyyaml.org/load
>>> for full details.
>>>   yaml_dict = yaml.load(fh)
>>>
>>> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/platforms/snap.yaml
>>> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/casper_platform.py:24:
>>> YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as
>>> the default Loader is unsafe. Please read https://msg.pyyaml.org/load
>>> for full details.
>>>   self.conf = yaml.load(fh.read())
>>> {'manufacturer': 'Xilinx', 'backend_target': 'vivado', 'sources': [],
>>> 'name': 'snap', 'invert_sfp_disable': True, 'pins': {'sync_out': {'iostd':
>>> 'LVCMOS25', 'loc': 'H9'}, 'lmx2581_muxout': {'iostd': 'LVCMOS33', 'loc':
>>> 'J19'}, 'mgt_tx_p': {'loc': ['P2', 'K2']}, 'usb_tx': {'iostd': 'LVCMOS25',
>>> 'loc': 'J8'}, 'sync_in_p': {'iostd': 'LVDS_25', 'loc': 'AD25'}, 'zdok0':
>>> {'iostd': 'LVCMOS25', 'loc': ['AA23', 'AB24', 'Y25', 'Y26', 'U24', 'U25',
>>> 'U19', 'U20', 'T24', 'T25', 'M21', 'M22', 'M24', 'L24', 'L22', 'K22',
>>> 'J24', 'J25', 'G25', 'G26', 'Y22', 'AA22', 'Y23', 'AA24', 'V23', 'V24',
>>> 'R22', 'R23', 'R21', 'P21', 'P23', 'N23', 'K25', 'K26', 'K23', 'J23',
>>> 'H21', 'G21', 'G22', 'F23', 'AE23', 'AF23', 'AC23', 'AC24', 'W23', 'W24',
>>> 'T22', 'T23', 'R18', 'P18', 'N18', 'M19', 'N19', 'M20', 'J21', 'H22',
>>> 'G24', 'F24', 'D23', 'D24', 'AE22', 'AF22', 'AB26', 'AC26', 'V21', 'W21',
>>> 'U17', 'T17', 'R16', 'R17', 'P19', 'P20', 'P16', 'N17', 'J26', 'H26',
>>> 'E25', 'D25', 'F22', 'E23']}, 'adc_sdata': {'iostd': 'LVCMOS18', 'loc':
>>> ['AF2', 'AF9', 'W14']}, 'lmx2581_be': {'iostd': 'LVCMOS33', 'loc': 'F15'},
>>> 'adc_sclk': {'iostd': 'LVCMOS33', 'loc': ['M17', 'L18', 'K16']},
>>> 'clk_sel_a': 

Re: [casper] jasper not working properly after upgrade

2019-11-20 Thread Jack Hickish
Hi Nitish,

I think this is related to
https://github.com/casper-astro/mlib_devel/commit/6e02a6ff98a9394c6b0acac570547d7841630dc9

Could you check if you have a lingering "platform.pyc" file in
mlib_devel/jasper_library and if so, delete it. Can you also check whether
this pyc file is in your python installation directory and if so delete
that too.

I think the problem is that pyc files are not tracked by the repo, so if
you have a version of mlib_devel from before the above commit you have
installed from, there will be a platform.pyc file knocking around which
will get erroneously installed after an upgrade.

Let me know if that doesn't fix things.

Cheers
Jack

On Wed, 20 Nov 2019 at 08:24, Jack Hickish  wrote:

> Thanks for the detailed report Nitish. I have a vague recollection that
> this is something simple which might have to do with a previous install of
> the title not being overwritten properly.
>
> I'll dig through my notes and get back to you asap
>
> Jack
>
> On Wed, 20 Nov 2019, 12:02 am Nitish Ragoomundun, <
> nitish.ragoomun...@gmail.com> wrote:
>
>>
>> Thank you very much for your replies. I misunderstood the importance of
>> the virtual environment. So I set it up like described in
>> https://casper-toolflow.readthedocs.io/en/latest/src/Installing-the-Toolflow.html
>> and
>> https://casper-toolflow.readthedocs.io/en/latest/src/Configuring-the-Toolflow.html.
>> Yes, I am using the latest version of mlib_devel. Found out that we
>> absolutely needed the LD_PRELOAD variable set or else jasper made an error
>> looking for symbols for XML...
>>
>> Yes, I think changing the shabang line to point to python3 might cause
>> other issues. There might be other scripts down the pipeline with the same
>> call to "python".
>>
>> Anyway, got the virtual env running and I thought we were good to go but
>> got another error:
>>
>> XSG generation complete.
>> 
>> *Front End compile complete*
>> 
>> To complete your compile, run the following command in a terminal.
>> Remember to source your startsg.local environment first!
>> /home/aragorn/Documents/SNAP/casper_venv/bin/python
>> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/exec_flow.py -m
>> /home/aragorn/Documents/SNAP/Spectrum_Analyser/spectrum_480mhz_2048pts_3c.slx
>> --middleware --backend --software
>> 
>> *  Frontend complete!  *
>> *  Running Backend generation  *
>> 
>> Starting compile
>> Starting Toolflow!
>> Frontend is simulink
>> Setting compile directory:
>> /home/aragorn/Documents/SNAP/Spectrum_Analyser/spectrum_480mhz_2048pts_3c
>> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/toolflow.py:236:
>> YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as
>> the default Loader is unsafe. Please read https://msg.pyyaml.org/load
>> for full details.
>>   yaml_dict = yaml.load(fh)
>>
>> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/platforms/snap.yaml
>> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/casper_platform.py:24:
>> YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as
>> the default Loader is unsafe. Please read https://msg.pyyaml.org/load
>> for full details.
>>   self.conf = yaml.load(fh.read())
>> {'manufacturer': 'Xilinx', 'backend_target': 'vivado', 'sources': [],
>> 'name': 'snap', 'invert_sfp_disable': True, 'pins': {'sync_out': {'iostd':
>> 'LVCMOS25', 'loc': 'H9'}, 'lmx2581_muxout': {'iostd': 'LVCMOS33', 'loc':
>> 'J19'}, 'mgt_tx_p': {'loc': ['P2', 'K2']}, 'usb_tx': {'iostd': 'LVCMOS25',
>> 'loc': 'J8'}, 'sync_in_p': {'iostd': 'LVDS_25', 'loc': 'AD25'}, 'zdok0':
>> {'iostd': 'LVCMOS25', 'loc': ['AA23', 'AB24', 'Y25', 'Y26', 'U24', 'U25',
>> 'U19', 'U20', 'T24', 'T25', 'M21', 'M22', 'M24', 'L24', 'L22', 'K22',
>> 'J24', 'J25', 'G25', 'G26', 'Y22', 'AA22', 'Y23', 'AA24', 'V23', 'V24',
>> 'R22', 'R23', 'R21', 'P21', 'P23', 'N23', 'K25', 'K26', 'K23', 'J23',
>> 'H21', 'G21', 'G22', 'F23', 'AE23', 'AF23', 'AC23', 'AC24', 'W23', 'W24',
>> 'T22', 'T23', 'R18', 'P18', 'N18', 'M19', 'N19', 'M20', 'J21', 'H22',
>> 'G24', 'F24', 'D23', 'D24', 'AE22', 'AF22', 'AB26', 'AC26', 'V21', 'W21',
>> 'U17', 'T17', 'R16', 'R17', 'P19', 'P20', 'P16', 'N17', 'J26', 'H26',
>> 'E25', 'D25', 'F22', 'E23']}, 'adc_sdata': {'iostd': 'LVCMOS18', 'loc':
>> ['AF2', 'AF9', 'W14']}, 'lmx2581_be': {'iostd': 'LVCMOS33', 'loc': 'F15'},
>> 'adc_sclk': {'iostd': 'LVCMOS33', 'loc': ['M17', 'L18', 'K16']},
>> 'clk_sel_a': {'iostd': 'LVCMOS33', 'loc': ['A18']}, 'i2c': {'iostd': 'I2C',
>> 'loc': ['', '', '', '', '', '', 'E18', 'B16', '', 'C16', '', '', '', '',
>> '', '', '', '', 'J20', '', 'K20', '', 'E17', 'G19', '', '', '', '', 'C17',
>> '', 'C18', 'C19', 'B19', '', 'A17', 'B17', 'D20', 'H18', '', 'H17']},
>> 'sync_in_n': {'iostd': 'LVDS_25', 'loc': 'AE25'}, 'adc_lclkp': {'iostd':
>> 'LVDS', 'loc': 

Re: [casper] jasper not working properly after upgrade

2019-11-20 Thread Jack Hickish
Thanks for the detailed report Nitish. I have a vague recollection that
this is something simple which might have to do with a previous install of
the title not being overwritten properly.

I'll dig through my notes and get back to you asap

Jack

On Wed, 20 Nov 2019, 12:02 am Nitish Ragoomundun, <
nitish.ragoomun...@gmail.com> wrote:

>
> Thank you very much for your replies. I misunderstood the importance of
> the virtual environment. So I set it up like described in
> https://casper-toolflow.readthedocs.io/en/latest/src/Installing-the-Toolflow.html
> and
> https://casper-toolflow.readthedocs.io/en/latest/src/Configuring-the-Toolflow.html.
> Yes, I am using the latest version of mlib_devel. Found out that we
> absolutely needed the LD_PRELOAD variable set or else jasper made an error
> looking for symbols for XML...
>
> Yes, I think changing the shabang line to point to python3 might cause
> other issues. There might be other scripts down the pipeline with the same
> call to "python".
>
> Anyway, got the virtual env running and I thought we were good to go but
> got another error:
>
> XSG generation complete.
> 
> *Front End compile complete*
> 
> To complete your compile, run the following command in a terminal.
> Remember to source your startsg.local environment first!
> /home/aragorn/Documents/SNAP/casper_venv/bin/python
> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/exec_flow.py -m
> /home/aragorn/Documents/SNAP/Spectrum_Analyser/spectrum_480mhz_2048pts_3c.slx
> --middleware --backend --software
> 
> *  Frontend complete!  *
> *  Running Backend generation  *
> 
> Starting compile
> Starting Toolflow!
> Frontend is simulink
> Setting compile directory:
> /home/aragorn/Documents/SNAP/Spectrum_Analyser/spectrum_480mhz_2048pts_3c
> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/toolflow.py:236:
> YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as
> the default Loader is unsafe. Please read https://msg.pyyaml.org/load for
> full details.
>   yaml_dict = yaml.load(fh)
>
> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/platforms/snap.yaml
> /home/aragorn/Documents/CASPER/mlib_devel/jasper_library/casper_platform.py:24:
> YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as
> the default Loader is unsafe. Please read https://msg.pyyaml.org/load for
> full details.
>   self.conf = yaml.load(fh.read())
> {'manufacturer': 'Xilinx', 'backend_target': 'vivado', 'sources': [],
> 'name': 'snap', 'invert_sfp_disable': True, 'pins': {'sync_out': {'iostd':
> 'LVCMOS25', 'loc': 'H9'}, 'lmx2581_muxout': {'iostd': 'LVCMOS33', 'loc':
> 'J19'}, 'mgt_tx_p': {'loc': ['P2', 'K2']}, 'usb_tx': {'iostd': 'LVCMOS25',
> 'loc': 'J8'}, 'sync_in_p': {'iostd': 'LVDS_25', 'loc': 'AD25'}, 'zdok0':
> {'iostd': 'LVCMOS25', 'loc': ['AA23', 'AB24', 'Y25', 'Y26', 'U24', 'U25',
> 'U19', 'U20', 'T24', 'T25', 'M21', 'M22', 'M24', 'L24', 'L22', 'K22',
> 'J24', 'J25', 'G25', 'G26', 'Y22', 'AA22', 'Y23', 'AA24', 'V23', 'V24',
> 'R22', 'R23', 'R21', 'P21', 'P23', 'N23', 'K25', 'K26', 'K23', 'J23',
> 'H21', 'G21', 'G22', 'F23', 'AE23', 'AF23', 'AC23', 'AC24', 'W23', 'W24',
> 'T22', 'T23', 'R18', 'P18', 'N18', 'M19', 'N19', 'M20', 'J21', 'H22',
> 'G24', 'F24', 'D23', 'D24', 'AE22', 'AF22', 'AB26', 'AC26', 'V21', 'W21',
> 'U17', 'T17', 'R16', 'R17', 'P19', 'P20', 'P16', 'N17', 'J26', 'H26',
> 'E25', 'D25', 'F22', 'E23']}, 'adc_sdata': {'iostd': 'LVCMOS18', 'loc':
> ['AF2', 'AF9', 'W14']}, 'lmx2581_be': {'iostd': 'LVCMOS33', 'loc': 'F15'},
> 'adc_sclk': {'iostd': 'LVCMOS33', 'loc': ['M17', 'L18', 'K16']},
> 'clk_sel_a': {'iostd': 'LVCMOS33', 'loc': ['A18']}, 'i2c': {'iostd': 'I2C',
> 'loc': ['', '', '', '', '', '', 'E18', 'B16', '', 'C16', '', '', '', '',
> '', '', '', '', 'J20', '', 'K20', '', 'E17', 'G19', '', '', '', '', 'C17',
> '', 'C18', 'C19', 'B19', '', 'A17', 'B17', 'D20', 'H18', '', 'H17']},
> 'sync_in_n': {'iostd': 'LVDS_25', 'loc': 'AE25'}, 'adc_lclkp': {'iostd':
> 'LVDS', 'loc': ['AA3']}, 'spi_flash_csn': {'iostd': 'LVCMOS25', 'loc':
> 'C23'}, 'gpio': {'iostd': 'LVCMOS25', 'loc': ['B21', 'C21', 'B20', 'A20',
> 'H24', 'H23', 'B26', 'R25', 'L17', 'K18']}, 'zdok0_p': {'iostd': 'LVDS_25',
> 'loc': ['AA23', 'Y25', 'U24', 'U19', 'T24', 'M21', 'M24', 'L22', 'J24',
> 'G25', 'Y22', 'Y23', 'V23', 'R22', 'R21', 'P23', 'K25', 'K23', 'H21',
> 'G22', 'AE23', 'AC23', 'W23', 'T22', 'R18', 'N18', 'N19', 'J21', 'G24',
> 'D23', 'AE22', 'AB26', 'V21', 'U17', 'R16', 'P19', 'P16', 'J26', 'E25',
> 'F22']}, 'led': {'iostd': 'LVCMOS25', 'loc': ['C13', 'C14', 'D13', 'D14',
> 'E12', 'E13']}, 'adc2_out': {'iostd': 'LVDS', 'loc': ['AF14', 'AF15',
> 'AD15', 'AE15', 'AE18', 'AF18', 'AF19', 'AF20', 'AA14', 'AA15', 'AC14',
> 'AD14', 'AB19', 'AB20', 'AA19', 'AA20']}, 'lmx2581_le': {'iostd':
> 'LVCMOS33', 'loc': 

Re: [casper] jasper not working properly after upgrade

2019-11-19 Thread Jack Hickish
Re virtual environments -- your simplest work around is probably to use the
`CASPER_PYTHON_VENV_ON_START` variable described at
https://casper-toolflow.readthedocs.io/en/latest/src/Configuring-the-Toolflow.html

Alternatively, if "just" changing the shebang line to point to "python3"
works, that seems like a reasonable thing to do. (Others may disagree).

Cheers
Jack

On Tue, 19 Nov 2019 at 10:08, Wesley New  wrote:

> Hi Nitish
>
> This is a python 2/3 issue. The toolflow has been upgraded to use python
> 3. Most people are running it in a virtual environment and install the
> requirements.txt in the root of mlib_devel. Assuming you are using the
> latest version of mlib_devel in casper-astro.
>
> Hope this helps.
>
> Regards
>
> Wesley
>
> On Tue, 19 Nov 2019, 7:03 PM Nitish Ragoomundun, <
> nitish.ragoomun...@gmail.com> wrote:
>
>> Hi,
>>
>> I was using Matlab R2017b and Vivado 2016.4 until recently. Most things
>> were working until I had issues with the complex fft block and decided to
>> get the latest mlib_devel to program our SNAP board. I followed
>> https://casper-toolflow.readthedocs.io/en/latest/src/Installing-the-Toolflow.html
>> and installed Matlab R2018a and Vivado 2019.1.1 on Ubuntu 16.04. I tested
>> using a design which I know was working before. I noticed that new Matlab
>> could not save the Simulink design if I opened the old one itself. So, I
>> manually made a replica of the .slx design with the same blocks and same
>> parameters. Ctrl+D was successfull. Compilation should have worked but got
>> the following error at some stage after running jasper:
>>
>> .
>> ('wb_register_ppc2simulink_sync',
>> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/wb_register_ppc2simulink_sync'])
>> snap
>> ('infrastructure',
>> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/infrastructure'])
>> ('wbs_arbiter',
>> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/wbs_arbiter'])
>> sys_block
>>  doesn't have
>> an attribute 'fullpath'
>> ('sys_block',
>> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/sys_block'])
>> spi_wb_bridge
>> 
>> doesn't have an attribute 'fullpath'
>> ('spi_wb_bridge',
>> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/spi_wb_bridge'])
>> xadc
>>  doesn't have an
>> attribute 'fullpath'
>> ('xadc/xadc.v',
>> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/xadc/xadc.v'])
>> ('xadc/xadc_wiz_0.xci',
>> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/xadc/xadc_wiz_0.xci'])
>> instantiating user peripherals
>> top:
>> /home/aragorn/Documents/SNAP/new_Spectrum_Analyser/spectrum_480mhz_2048pts_3c/top.v
>> instantiating user_ip
>> regenerating top
>> Dumping pickle of top-level Verilog module
>> Extracting constraints from peripherals
>> Generating physical constraints
>> Traceback (most recent call last):
>>   File
>> "/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/cit2csl.py", line
>> 107, in 
>> sys.stdout.buffer.write(csl)
>> AttributeError: 'file' object has no attribute 'buffer'
>> Failed to generate binary file
>> /home/aragorn/Documents/SNAP/new_Spectrum_Analyser/spectrum_480mhz_2048pts_3c/core_info.jam.tab.bin,
>> error code 256.
>> Traceback (most recent call last):
>>   File
>> "/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/exec_flow.py",
>> line 202, in 
>> tf.write_core_jam_info()
>>   File
>> "/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/toolflow.py",
>> line 525, in write_core_jam_info
>> raise Exception(errmsg)
>> Exception: Failed to generate binary file
>> /home/aragorn/Documents/SNAP/new_Spectrum_Analyser/spectrum_480mhz_2048pts_3c/core_info.jam.tab.bin,
>> error code 256.
>> Error using jasper (line 23)
>> Backend build failed! Check log files for more information
>>
>>
>> If you wish to see the beginning of the messages, please see attached
>> log. The messages in the Matlab window following the jasper command are in
>> Matlab.log.
>> Since the error is a "Traceback" from Python, I am guessing something. I
>> did download the new mlib_devel (master branch) and installed the
>> requirements using pip3. I saw in
>> https://casper-toolflow.readthedocs.io/en/latest/src/Installing-the-Toolflow.html
>> that for SNAP, we need Python3 and I checked dependencies. One thing I
>> noticed by looking into the scripts inside mlib_devel/jasper_library is the
>> line "#! /usr/bin/env python". On Ubuntu 16.04 the default Python is
>> version 2.7 and "python" is actually a symlink at /usr/bin/python which
>> links to /usr/bin/python2.7. So, for example, if exec_flow.py is run, I am
>> pretty sure it is running with python2.7 and not python3.
>>
>> So, what do you think?
>> Can you please advise?
>>
>> Thanks.
>> Regards,
>> Nitish
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "casper@lists.berkeley.edu" group.
>> To unsubscribe 

Re: [casper] jasper not working properly after upgrade

2019-11-19 Thread Wesley New
Hi Nitish

This is a python 2/3 issue. The toolflow has been upgraded to use python 3.
Most people are running it in a virtual environment and install the
requirements.txt in the root of mlib_devel. Assuming you are using the
latest version of mlib_devel in casper-astro.

Hope this helps.

Regards

Wesley

On Tue, 19 Nov 2019, 7:03 PM Nitish Ragoomundun, <
nitish.ragoomun...@gmail.com> wrote:

> Hi,
>
> I was using Matlab R2017b and Vivado 2016.4 until recently. Most things
> were working until I had issues with the complex fft block and decided to
> get the latest mlib_devel to program our SNAP board. I followed
> https://casper-toolflow.readthedocs.io/en/latest/src/Installing-the-Toolflow.html
> and installed Matlab R2018a and Vivado 2019.1.1 on Ubuntu 16.04. I tested
> using a design which I know was working before. I noticed that new Matlab
> could not save the Simulink design if I opened the old one itself. So, I
> manually made a replica of the .slx design with the same blocks and same
> parameters. Ctrl+D was successfull. Compilation should have worked but got
> the following error at some stage after running jasper:
>
> .
> ('wb_register_ppc2simulink_sync',
> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/wb_register_ppc2simulink_sync'])
> snap
> ('infrastructure',
> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/infrastructure'])
> ('wbs_arbiter',
> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/wbs_arbiter'])
> sys_block
>  doesn't have
> an attribute 'fullpath'
> ('sys_block',
> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/sys_block'])
> spi_wb_bridge
> 
> doesn't have an attribute 'fullpath'
> ('spi_wb_bridge',
> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/spi_wb_bridge'])
> xadc
>  doesn't have an
> attribute 'fullpath'
> ('xadc/xadc.v',
> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/xadc/xadc.v'])
> ('xadc/xadc_wiz_0.xci',
> ['/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/hdl_sources/xadc/xadc_wiz_0.xci'])
> instantiating user peripherals
> top:
> /home/aragorn/Documents/SNAP/new_Spectrum_Analyser/spectrum_480mhz_2048pts_3c/top.v
> instantiating user_ip
> regenerating top
> Dumping pickle of top-level Verilog module
> Extracting constraints from peripherals
> Generating physical constraints
> Traceback (most recent call last):
>   File
> "/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/cit2csl.py", line
> 107, in 
> sys.stdout.buffer.write(csl)
> AttributeError: 'file' object has no attribute 'buffer'
> Failed to generate binary file
> /home/aragorn/Documents/SNAP/new_Spectrum_Analyser/spectrum_480mhz_2048pts_3c/core_info.jam.tab.bin,
> error code 256.
> Traceback (most recent call last):
>   File
> "/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/exec_flow.py",
> line 202, in 
> tf.write_core_jam_info()
>   File
> "/home/aragorn/Documents/CASPER/mlib_devel/jasper_library/toolflow.py",
> line 525, in write_core_jam_info
> raise Exception(errmsg)
> Exception: Failed to generate binary file
> /home/aragorn/Documents/SNAP/new_Spectrum_Analyser/spectrum_480mhz_2048pts_3c/core_info.jam.tab.bin,
> error code 256.
> Error using jasper (line 23)
> Backend build failed! Check log files for more information
>
>
> If you wish to see the beginning of the messages, please see attached log.
> The messages in the Matlab window following the jasper command are in
> Matlab.log.
> Since the error is a "Traceback" from Python, I am guessing something. I
> did download the new mlib_devel (master branch) and installed the
> requirements using pip3. I saw in
> https://casper-toolflow.readthedocs.io/en/latest/src/Installing-the-Toolflow.html
> that for SNAP, we need Python3 and I checked dependencies. One thing I
> noticed by looking into the scripts inside mlib_devel/jasper_library is the
> line "#! /usr/bin/env python". On Ubuntu 16.04 the default Python is
> version 2.7 and "python" is actually a symlink at /usr/bin/python which
> links to /usr/bin/python2.7. So, for example, if exec_flow.py is run, I am
> pretty sure it is running with python2.7 and not python3.
>
> So, what do you think?
> Can you please advise?
>
> Thanks.
> Regards,
> Nitish
>
>
>
> --
> 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/CAC6X4cP%3DkUfwym5YKZKxnZvjE%2BwxQNxSo_XcoAx95%2Ba1x5OF6A%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google