Hi Kaj,

Are you running a python virtual environment using python 3.5? Once you
start the virtual environment and type python you should see version 3.5.2
or something like that. It doesn't look like it. Here is some documentation
that should be helpful - make sure you follow these steps:

1) How to configure the toollflow:
https://casper-toolflow.readthedocs.io/en/latest/src/Configuring-the-Toolflow.html
2) Running the toolflow:
https://casper-toolflow.readthedocs.io/en/latest/src/Running-the-Toolflow.html

Does your startsg.local file look like this:

export XILINX_PATH=/opt/Xilinx/Vivado/2019.1export
MATLAB_PATH=/usr/local/MATLAB/R2018aexport PLATFORM=lin64export
JASPER_BACKEND=vivado
# over-ride the MATLAB libexpat version with the OS's one.# Using
LD_PRELOAD=${LD_PRELOAD}:"..." rather than just LD_PRELOAD="..."#
ensures that we preserve any other settings already configuredexport
LD_PRELOAD=${LD_PRELOAD}:"/usr/lib/x86_64-linux-gnu/libexpat.so"
# Activate a custom python environment on loadexport
CASPER_PYTHON_VENV_ON_START=/home/user/work/casper_venv


You must run everything from the virtual environment in order to work. The
last line in the startsg.local will automatically start your virtual
environment session, but you can also do it manually e.g. source
~/venv/bin/activate will give you the following "(venv)
aisaacson@adam-cm:~/work/git_work/ska-sa/2019_1/mlib_devel$".
The red (venv) tells you that you are in the virtual python environment.
Remember you also need to install requirements.txt while the virtual
environment is running.

Then all you really need to do is run "./startsg" at the prompt and it
should open up Matlab where you can build your slx file by typing in
"jasper" or "jasper_frontend. if you use "jasper_frontend" then it will
just compile sysgen and the simulink frontend. You can then open another
terminal session and under "mlib_devel" type "source startsg
startsg.local". This will make sure everything is in your path. You can
then copy and paste the exec_flow.py command from the Matlab command window
and then it should build the middle end and backend. Remember to start the
virtual environment for this terminal window as well. This should all be in
the above docs, but if you are still struggling then please send us a step
by step terminal screen capture, so we can see if you are doing everything
correctly, thanks.

I hope this helps!

Kind regards,

Adam Isaacson
South African Radio Astronomy Observatory (SARAO)
Hardware Manager
Cell: (+27) 825639602
Tel:  (+27) 215067300
email: [email protected]



On Sun, Jan 24, 2021 at 7:15 PM Kaj Wiik <[email protected]> wrote:

> Hi!
>
> A followup...
>
> I was able to start (but not run, see below...) the toolflow with the
> following modifications:
>
> - to run jasper_frontend, I had to install python-yaml. I tried first to
> add python3-yaml but it seems that the toolflow is mixing python2 and
> python3?
>
> - I added 'export LM_LICENSE_FILE=/opt/Xilinx/Xilinx.lic' and
> 'export MLIB_DEVEL_PATH=~/mlib_devel' to startsg.local
>
> When matlab gave a command line and I run it, I got the following error
> message that I do not (yet!) understand:
>
> kjwiik@casperx:~/tmp$ source ../mlib_devel/startsg.local
> kjwiik@casperx:~/tmp$ /usr/bin/python
> /home/kjwiik/mlib_devel/jasper_library/exec_flow.py -m
> /home/kjwiik/mlib_devel/jasper_library/test_models/test_zcu111.slx
> --middleware --backend --software
> Starting compile
> Starting Toolflow!
> Frontend is simulink
> Setting compile directory:
> /home/kjwiik/mlib_devel/jasper_library/test_models/test_zcu111
> /home/kjwiik/mlib_devel/jasper_library/platforms/zcu111.yaml
> {'backend_target': 'vivado', 'name': 'zcu111', 'fpga':
> 'xczu28dr-ffvg1517-2-e', 'mmbus_architecture': 'AXI4-Lite', 'sources':
> [], 'cfgbvs': 'GND', 'provides': ['sys_clk'], 'config_voltage': 1.8,
> 'pins': {'clk_100_p': {'loc': 'AM15', 'iostd': 'LVDS'}, 'clk_100_n':
> {'loc': 'AN15', 'iostd': 'LVDS'}, 'led': {'loc': ['AR13', 'AP13',
> 'AR16', 'AP16', 'AP15', 'AN16', 'AN17', 'AV15'], 'iostd': 'LVCMOS18'}},
> 'mmbus_base_address': 2684354560, 'mmbus_address_alignment': 4,
> 'manufacturer': 'Xilinx', 'constraints': []}
> sw_reg
> Traceback (most recent call last):
>    File "/home/kjwiik/mlib_devel/jasper_library/exec_flow.py", line 197,
> in <module>
>      tf.gen_periph_objs()
>    File "/home/kjwiik/mlib_devel/jasper_library/toolflow.py", line 363,
> in gen_periph_objs
>      self.peripherals[pk], self.plat))
>    File
> "/home/kjwiik/mlib_devel/jasper_library/yellow_blocks/yellow_block.py",
> line 65, in make_block
>      return cls(blk,platform,hdl_root=hdl_root)
>    File
> "/home/kjwiik/mlib_devel/jasper_library/yellow_blocks/yellow_block.py",
> line 92, in __init__
>      self.hdl_root = os.getenv('HDL_ROOT').rstrip('/') #: The base
> directory from which source file's locations are specified
> AttributeError: 'NoneType' object has no attribute 'rstrip'
> -----------------------------------------------------------------------
>
> Could this be again a python version problem?
>
> Thanks,
> Kaj
>
> On 1/22/21 6:50 PM, Kaj Wiik wrote:
> > Hi!
> >
> > I tried a bit different route: I installed python3-numpy and
> > python3-setuptools-git Ubuntu packages first and commented out numpy
> > from requirements.txt. At least the installation went fine using these
> > workarounds.
> >
> > About ZCU111 Slack channel, I am very interested (and my colleague
> > [email protected] also), could you please send us an invitation?
> >
> > Many thanks for your kind help!
> >
> > Kaj
> >
> > On 1/20/21 10:22 PM, Dan Werthimer wrote:
> >>
> >> hi kaj,
> >>
> >> regarding your interest in ZCU111:
> >> there's a casper slack channel on RFSOC that you might find useful.
> >> wei liu recently developed a casper ADC yellow block for the ZCU111.
> >>
> >> best wishes,
> >>
> >> dan
> >>
> >>
> >>
> >> Dan Werthimer
> >> Marilyn and Watson Alberts Chair
> >> Astronomy Dept and Space Sciences Lab
> >> University of California, Berkeley
> >>
> >>
> >> On Wed, Jan 20, 2021 at 12:17 PM Kaj Wiik <[email protected]
> >> <mailto:[email protected]>> wrote:
> >>
> >>
> >>
> >>     On 20/01/2021 18:49, Jack Hickish wrote:
> >>
> >>      > I've been using Ubuntu 18.04 LTS without issues, at least with
> >>     the boards which use Vivado 2019. I'm not sure  what versions of
> >>     python the OS came with, but I'm currently running the toolflow in a
> >>     python 3.6.9 virtual env.
> >>
> >>     I first tried with Ubuntu 18.04 LTS but I got stuck with a problem
> >>     with Matlab and some system library versions.
> >>
> >>     I think I'll change the requirements.txt file to read "numpy<1.19"
> >>     and try with that first.
> >>
> >>     I am very interested of all information and experiences with Casper
> >>     on ZCU111. Thanks to Adam for pointing out of a mlib_devel ZCU111
> >>     branch, I haven't noticed that!
> >>
> >>     Thanks!
> >>
> >>     Kaj
> >>
> >>     --     You received this message because you are subscribed to the
> >> Google
> >>     Groups "[email protected]
> >>     <mailto:[email protected]>" group.
> >>     To unsubscribe from this group and stop receiving emails from it,
> >>     send an email to [email protected]
> >>     <mailto:casper%[email protected]>.
> >>     To view this discussion on the web visit
> >>
> >>
> https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/020a6f84-ded9-49cc-2d4a-00a766e743be%40utu.fi.
>
> >>
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "[email protected]" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> >> an email to [email protected]
> >> <mailto:[email protected]>.
> >> To view this discussion on the web visit
> >>
> https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CAGHS_vHQ1bTha%3DFjCe0sGddd3Gt6GrYkh8dgz_eKDWXebf87iQ%40mail.gmail.com
> >> <
> https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CAGHS_vHQ1bTha%3DFjCe0sGddd3Gt6GrYkh8dgz_eKDWXebf87iQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> >>
> >
>
> --
> You received this message because you are subscribed to the Google Groups "
> [email protected]" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/335be9c2-39ca-d9f9-fb8f-960076bfffa1%40utu.fi
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CADTJ%3DnHfh_aUtfTHFxQDP-YOcprHDz7MaGBi8XmoCWOa7DWdPg%40mail.gmail.com.

Reply via email to