Filter löschen
Filter löschen

Cannot write to AXI-Lite registers [HDL coder, PYNQ, HDL Vision toolbox]

12 Ansichten (letzte 30 Tage)
Anton Wasser
Anton Wasser am 14 Apr. 2024
Bearbeitet: Kiran Kintali am 15 Apr. 2024
Hello, I am trying to implement a sobel filter using HDL Coder from simulink but I have some issues. For some reason, I am unable to write to the AXI-Lite registers for starting the IP and setting parameters. The target interface for the video stream is AXI-Stream and I am transferring data to it via the DMA IP. I am using PYNQ to control the IP. Below is an example of what is wrong:
As you can see the IP datetime holds the value when I created the IP so I can access that register atleast. However I am unable to set the start and parameter registers, so the IP is unusable. Passing a frame to the IP via DMA only results in a blank frame being returned. I initally suspected the TLAST signal to be the culprit, but according to this document TLAST will be set based on the frame size parameters:
Thanks in advance for any answers. I am new to using Matlab/simulink for hdl code generation so sorry if I missed something that should be obvious.
EDIT: I attempted to write the registers with devmem2, and the results were the same except i got bus error for every other register. Which rules out PYNQ incompatibility, but confuses me

Antworten (1)

Kiran Kintali
Kiran Kintali am 15 Apr. 2024
Bearbeitet: Kiran Kintali am 15 Apr. 2024
For sobel filter examples using HDL Coder from Simulink consider reviewing these examples.
(sampleIn and sampleOut DUT)
(frameIn and frameOut DUT)
You can also see how interact with the FPGA in the seciton "Live Frame-Based Model Running on FPGA" in the above example. There are examples in there on how to read and write a Frame in MATLAB.
I am assuming you have your own PYNQ setup where you are interacting with HDL Coder generated IP Core. If this is the case you might want to review the section which talks about AXI4RegisterReadback for AXI lite registers
hdlset_param('hdlcoder_led_vector/DUT', 'AXI4RegisterReadback', 'on');
If you want additional control on DUT IP ports that you model at Simulink DUT level there is additional guidance here...
Feel free to share your model and setup for additional support.




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by