You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Board name (e.g. Pynq-Z2): ADM-XRC-9Z1 (custom US+ MPSoC)
Pull request type (bug fix / new feature): bug fix
Pull request number: -
Description: Register access using register_map breaks down for Vitis HLS IP with width argument
I created the following BGR2RGB HLS IP using the Vitis Vision Library:
Note
config.h contains constants and data types, utils.h contains xfMat2axis to produce a stream where last is only asserted for the last pixel, compatible with standard DMA engines. These files are omitted for brevity, can be provided on request.
Using the following custom driver, when the config, start or stop methods are called or any direct calls to self.register_map causes RecursionError:
frompynqimportDefaultIPclassBGR2RGB(DefaultIP):
"""Colour channel conversion IP handling BGR to RGB conversion."""bindto= ["xilinx.com:hls:bgr2rgb_accel:1.0"]
def__init__(self, description):
super().__init__(description)
defconfig(self, height: int, width: int) ->None:
""" Configure the IP with the image resolution. Args: height (int): image height in pixels. width (int): image width in pixels. """self.register_map.height=heightself.register_map.width=widthdefstart(self) ->None:
"""Start the IP in auto restart mode."""self.register_map.CTRL=0x81defstop(self) ->None:
"""Stop the IP."""self.register_map.CTRL=0x00
Example stack trace:
Note
Stack trace is from larger design that works if I use (rows, cols) instead of (height, width).
register_mapbreaks down for Vitis HLS IP withwidthargumentI created the following BGR2RGB HLS IP using the Vitis Vision Library:
Note
config.hcontains constants and data types,utils.hcontainsxfMat2axisto produce a stream wherelastis only asserted for the last pixel, compatible with standard DMA engines. These files are omitted for brevity, can be provided on request.Using the following custom driver, when the
config,startorstopmethods are called or any direct calls toself.register_mapcausesRecursionError:Example stack trace:
Note
Stack trace is from larger design that works if I use
(rows, cols)instead of(height, width).