HDL coder fails generating wavelet denoise function

조회 수: 2 (최근 30일)
Massimiliano Buonamico
Massimiliano Buonamico 2021년 10월 11일
답변: Kiran Kintali 2021년 11월 23일
Hi all,
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
% wavsystem
% 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',...
'ThresholdRule','Soft','NoiseEstimate','LevelIndependent');
y = y(:);
y = y(1:1024);
end
function sizein = getInputSizeImpl(~)
sizein = [1024,1];
end
end
end
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.

답변 (1개)

Kiran Kintali
Kiran Kintali 2021년 11월 23일
Support for C/C++ code generation exists for wdenoise.
I have reported the HDL Code Generation request for this function to development team.

카테고리

Help CenterFile Exchange에서 HDL Verifier에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by