ZCU104 pynq_composable install

I am trying to install pynq_composable on a ZCU104, I have a kria kv260 and successfully have the fir filter example working which I am trying to re-create on the ZCU104. I have the latest pynq 3.0 running on the ZCU104 but cannot install the pynq_composable-1.1.0, when I install from github it installs pynq_composable-1.0.2. When I try and use it I get a ModuleNotFoundError: No module named ‘pynq_composable’. Any help would be gratefully appreciated. ( I only know the basics of git and the revisions required etc )

Regards,

Tony

1 Like

Hi @tonys09,

Can you please share the commands you’re using to install it?
How and where are you install it?

Mario

Dear Mario,

I am installing it on a ZCU104 with pynq 3.0

xilinx@pynq:~$ cat /etc/os-release

NAME=“PynqLinux”

VERSION=“3.0 (Belfast)”

ID=pynqlinux

ID_LIKE=ubuntu

PRETTY_NAME=“PynqLinux, based on Ubuntu 22.04”

VERSION_ID=“3.0”

HOME_URL=“https://www.pynq.io/

SUPPORT_URL=“https://discuss.pynq.io/

BUG_REPORT_URL=“https://www.pynq.io

PRIVACY_POLICY_URL=“https://www.pynq.io

VERSION_CODENAME=Belfast

UBUNTU_CODENAME=jammy

xilinx@pynq:~$

I took the basic instructions from this link:

https://github.com/Xilinx/PYNQ_Composable_Pipeline#install-composable-pipeline-on-your-board

I have attempted it twice, neither time did it work,

Firstly I did:

git clone https://github.com/Xilinx/PYNQ_Composable_Pipeline

python3 -m pip install PYNQ_Composable_Pipeline/ --no-build-isolation

pynq-get-notebooks pynq_composable -p $PYNQ_JUPYTER_NOTEBOOKS

Which did not work, then I removed the PYNQ_Composable_Pipeline directory and attempted:

Hi @tonys09,

I think you are installing the Composable overlay outside the pynq environment.
I suggest you run the installation commands from the terminal that is available inside the JupyterLab. Or follow these steps to enable to environment

I also suggest you install the from the branch v1.1.0-dev

Mario

Mario,

Can you give me the git command to install from the v1.1.0-dev branch, I really am very new to git.

Sorry,

tony

@tonys09

You should run this on the JupyterLab terminal

git clone https://github.com/Xilinx/PYNQ_Composable_Pipeline -b v1.1.0-dev
python3 -m pip install PYNQ_Composable_Pipeline/ --no-build-isolation
pynq-get-notebooks pynq_composable -p $PYNQ_JUPYTER_NOTEBOOKS

You can see how to open the terminal here

Mario

Thanks for the help, I am now able to import pynq_composable.
I have built a bitfile based on the tutorial on the fir filter.
I only have vivado 2020.2 currently so built the bit file with that.
I saw that the fir_paths.json file format has changed so copied that.
Unfortunately when I try and run the tutorial I hit a problem when I run:

cfilter.compose([cfilter.ps_in, cfilter.fir_lowpass, cfilter.ps_out])

cfilter.graph

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Input In [11], in <cell line: 1>()
----> 1 cfilter.compose([cfilter.ps_in, cfilter.fir_lowpass, cfilter.ps_out])
      3 cfilter.graph

File /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq_composable/composable.py:537, in Composable.compose(self, cle_list)
    535     break
    536 ckey = self._relative_path(ip._fullpath, 'si')
--> 537 csi = self._c_dict[ckey]['si']
    538 cmi = self._c_dict[ckey].get('mi')
    539 nextip = linear_pipeline[i+1]

KeyError: 'si'

Is it possibly because I am using the wrong version of Vivado or do you think there could be another reason ?

Thanks

Tony

What are you seeing in c_dict?

cfilter.c_dict

{‘axis_data_fifo’: {‘si’: [0, 1, 2, 4, 5],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘axis_data_fifo’},
‘fir_bandpass’: {‘mi’: [2],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘fir_compiler’},
‘fir_lowpass’: {‘mi’: [3],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘fir_compiler’},
‘fir_highpass’: {‘mi’: [4],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘fir_compiler’},
‘fir_stopband’: {‘mi’: [5],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘fir_compiler’},
‘ps_in’: {‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘axi_dma’,
‘si’: [3],
‘default’: True,
‘fullpath’: ‘axi_dma’},
‘ps_out’: {‘mi’: [1],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘axi_dma’,
‘default’: True,
‘fullpath’: ‘axi_dma’}}

Tony

Hi @tonys09,

Can you share an screenshot of the composable hierarchy?

I think that you added a FIFO after each filter and this is causing the problem.

As you can see, fir_lowpass is missing the si key, that it is assigned to the axis_data_fifo

Mario


I presume you mean in vivado ?

Yes, Vivado.

The output of the FIR filters are not connected to the inputs on the switch.

You should get something like this


The order of the connection does not matter, but they need to be connected.

Mario

1 Like

Thanks, that was the problem I must have rushed that part and missed the connections back to the switch, all working now.

One final question, why does the bandpass key show up as an “mi” rather than an “si” ?

{‘fir_stopband’: {‘si’: [0],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘fir_compiler’,
‘mi’: [5]},
‘axis_data_fifo’: {‘mi’: [0],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘axis_data_fifo’,
‘si’: [5]},
‘fir_lowpass’: {‘si’: [1],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘fir_compiler’,
‘mi’: [3]},
‘fir_highpass’: {‘si’: [2],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘fir_compiler’,
‘mi’: [4]},
‘fir_bandpass’: {‘mi’: [2],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘fir_compiler’,
‘si’: [4]},
‘ps_in’: {‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘axi_dma’,
‘si’: [3],
‘default’: True,
‘fullpath’: ‘axi_dma’},
‘ps_out’: {‘mi’: [1],
‘dfx’: False,
‘loaded’: True,
‘modtype’: ‘axi_dma’,
‘default’: True,
‘fullpath’: ‘axi_dma’}}

Hi,

If you format the code in JSON style, you will see that the si key is part of the fir_bandpass dictionary.
They don’t need to be in order

Mario

1 Like