필터 지우기
필터 지우기

How do i define an array as a HDL input?

조회 수: 8 (최근 30일)
Eldin Ramic
Eldin Ramic 2023년 10월 31일
댓글: Eldin Ramic 2023년 11월 9일
Hi,
I want to use an array as an input type in my HDL model, e.g [uint8; uint8], but the following error is generated:
Expression '[uint8; uint8]' for block 'xxx' returns an array of objects.
I cant find any documenation about using arrays as HDL inputs.
Thank you!

채택된 답변

Tom Richter
Tom Richter 2023년 10월 31일
Starting in R2022a, HDL Coder supports matrix types inputs and outputs at the DUT interface. This enhancement reduces the overhead of adding Reshape and Concatenate blocks inside the DUT and also improves readability of the generated HDL code.
I assume you talk about a Simulink model and with HDL model you mean a subsystem (DUT) which contains the algorithm for HDL code generation. With that you can e.g. use a constant block which outputs a matrix and use it as an input to the DUT. If the DUT is a model with imports and outposts you can define to port size (e.g [3, 2]) and the data type (e.g. uint8 or fixdt(1,8,4)). The data type is the same for all matrix entries.
Where did you try to include the [uint8, uint8] term?
More information here.
  댓글 수: 1
Eldin Ramic
Eldin Ramic 2023년 11월 9일
Thank you very much, this helped me.

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

추가 답변 (1개)

Kiran Kintali
Kiran Kintali 2023년 11월 1일
It would be helpful to share your model.
HDL Coder supports vector inputs at the DUT interface. Attached is an example of 40point FFT
You can find similar coding pattern with MATLAB to HDL and vector inputs here.
>> mlhdlc_demo_setup('fft')

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by