필터 지우기
필터 지우기

Delay in MATLAB Function block

조회 수: 2 (최근 30일)
悠矢
悠矢 2023년 12월 21일
이동: Angelo Yeo 2023년 12월 25일
Hello, I'm trying to make a radiometer system using HDL Coder.
I am using MATLAB Function block as part of my system (Fig. 1), and I am getting a "delay required" error when generating HDL code, even though I have given the necessary delay for the blocks. I have tried changing the sampling time and the oversampling factor, but this does not solve the problem. Does anyone have a good idea to solve the block delay problem? If so, I would like to know.
I would like to use MATLAB Function block if possible without Deserializer block. The necessary delay is five.
Thanks.
Figure 1:
Code implemented in the above block (I made my own buffering).
function [ValidOut, DataOut] = Bufferring(DataIn, ValidIn, count)
N = 128;
persistent A
p = 1+2i;
if isempty(A)
A = zeros(1, N, 'like', p); //Initialize
end
shift = 1;
row = 1;
m = length(A);
a = zeros(N, 1, 'like', p); //Initialize
if ValidIn == true
A(row,:) = [A(row,(end-mod(shift,m)+1):end) A(row,1:(end-mod(shift,m)))]; //circular shift
A(1, 1) = DataIn; //Input data
if count == (N-1)
DataOut = A'; //Output data
ValidOut = false;
else
DataOut = a; //Output data
ValidOut = true;
end
else
DataOut = a; //Output data
ValidOut = true;
end
end

답변 (1개)

Jacob Mazur
Jacob Mazur 2023년 12월 21일
이동: Angelo Yeo 2023년 12월 25일
Hello,
Sorry to hear your encountering this unexpected error. Please reach out to our technical support team and we'd be happy to investigate this issue further: https://www.mathworks.com/support/contact_us.html
In your email, please include the following information:
  1. The output of executing the following command in the MATLAB Command Window:
>> ver -support
  1. Any Simulink models and MATLAB code files needed to reproduce this error.
Thank you!
  댓글 수: 1
悠矢
悠矢 2023년 12월 25일
이동: Angelo Yeo 2023년 12월 25일
I am very sorry for the delay in responding. Thank you for response.
I understand. I will contact the support team.

댓글을 달려면 로그인하십시오.

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by