HDL coder fails generating wavelet denoise function
5 ビュー (過去 30 日間)
I'm trying to create an HDL model to process data coming from an audio channel using the DSP builder and the HDL coder.
The aim is to implement the HDL subsystem and then integrate into an HDL import module into the main design.
This is the subsystem for which I want to generate the HDL.
This is the wavsystem. The reason why I had to make it fixed on the output is that the serializer block accepts only data of fixed size.
classdef wavsystem < matlab.System
% implements wdenoise algorithm on a fixed size array of 1024 elements
methods(Access = protected)
function y = stepImpl(~,u)
y = wdenoise(u,10,'Wavelet','coif4','DenoisingMethod','SURE',...
y = y(:);
y = y(1:1024);
function sizein = getInputSizeImpl(~)
sizein = [1024,1];
I'm able to run the simulation but when I try to generate the HDL code using the workflow advisor I get this error.
Compilation errors when generating code for: \MATLAB System Error during MATLAB code compilation: Error Path: C:\Program Files\MATLAB\R2021a\toolbox\wavelet\wavelet\wdenoise.m Error Location: (@Row: --> 412 @Column: --> 9) The coder.varsize() built-in function can only be used when support for dynamic matrices is turned on.
If I try to make it variable size the serializer complains and I'm not even able to run the simulation.
Any idea on how to proceed?
Should I make a copy of that file and try to remove the call to coder.varsize()?
Any advice would be more than appreciated.