Hi, thank you for your reply. I’ve taken your advice from this thread and other questions and am trying to fix the issues - it would be great if you could provide some advice on the following work I’ve done:
To try and fix the idling and TLAST issue, I created a new HLS design in the Vitis Unified IDE, based on the updated Vitis Vision Library format:
accel2.cpp
#include "accel2.hpp"
// void func(hls::stream, hls::stream, rows, cols)
// xres <-> cols (image width)
// yres <-> rows (image height)
// e.g. 1920x1080 <-> xres * yres
void cvtcolor(axi_stream& img_in, axi_stream& img_out, int rows, int cols) {
#pragma HLS INTERFACE axis port=img_in
#pragma HLS INTERFACE axis port=img_out
#pragma HLS INTERFACE s_axilite port=rows
#pragma HLS INTERFACE s_axilite port=cols
#pragma HLS INTERFACE s_axilite port=return
gray_image img_mat_gray(rows, cols);
RGB_image img_mat_rgb(rows, cols);
#pragma HLS DATAFLOW
xf::cv::AXIvideo2xfMat(img_in, img_mat_rgb);
xf::cv::rgb2gray<XF_8UC3, XF_8UC1, MAX_HEIGHT, MAX_WIDTH, XF_NPPC1, XF_CV_DEPTH, XF_CV_DEPTH>(img_mat_rgb, img_mat_gray);
xf::cv::xfMat2AXIvideo(img_mat_gray, img_out);
}
accel2.hpp
#include "ap_fixed.h"
#include "stdint.h"
#include "hls_stream.h"
#include "ap_axi_sdata.h"
#include "ap_int.h"
#include "common/xf_common.hpp"
#include "common/xf_utility.hpp"
#include "common/xf_infra.hpp"
#include "imgproc/xf_cvt_color.hpp"
#include "imgproc/xf_cvt_color_1.hpp"
//#include "imgproc/xf_rgb2hsv.hpp"
#include "imgproc/xf_bgr2hsv.hpp"
#define MAX_WIDTH 1920
#define MAX_HEIGHT 1080
#define XF_CV_DEPTH 2
typedef ap_axiu<32,1,1,1> axi_pixel;
typedef hls::stream<axi_pixel> axi_stream;
// Update Mat definitions to use xf::cv namespace and appropriate types
typedef xf::cv::Mat<XF_8UC3, MAX_HEIGHT, MAX_WIDTH, XF_NPPC1, XF_CV_DEPTH> RGB_image;
typedef xf::cv::Mat<XF_8UC1, MAX_HEIGHT, MAX_WIDTH, XF_NPPC1, XF_CV_DEPTH> gray_image;
void cvtcolor(axi_stream& img_in, axi_stream& img_out, int rows, int cols);
And this is my block design:
According to this answer, TLAST should be generated correctly. However I cannot find the signal in the synthesis report - it may be that it was generated, but it is not shown in the new synthesis report format.
Is there any other way to verify that TLAST was generated? Is it necessary for TLAST to be generated to avoid the deadlock waiting state of the DMA?
Also, assuming that I would want the function to be used to analyse a live video stream on the Jupyter Notebook, would it be better to use the VDMA instead of the DMA?
Thank you!