필터 지우기
필터 지우기

How to generate HDL code for fractional sample rate converter in simulink?

조회 수: 1 (최근 30일)
I have a simulink block as follows
I want to generate hdl code for the whole model. Gb, Ib, Kb and Pb are my filters and I am designing fractional sample rate converter. But it only generates hdl code for filter not for up-sampling and down-sampling process. I want to do that because my filter length is 391 and it is very hard to write testbench manually for such a big filter. Please help!
  댓글 수: 2
Kiran Felix Robert
Kiran Felix Robert 2021년 3월 22일
Does MATLAB/Simulink HDL Coder throw any error or a warning when you try to generate HDL code ?
Himadri Debnath
Himadri Debnath 2021년 3월 22일
It only generates hdl code for Gb, Ib, Kb and Pb. These are amy filters. I want to generate verilog code for whole system including upsampling and downsampling process and thus testbench. how to do that?

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

채택된 답변

Kiran Felix Robert
Kiran Felix Robert 2021년 3월 22일
편집: Kiran Felix Robert 2021년 3월 22일
Hi Himadri,
As we see from the upsample and downsample block documentation, they support HDL Code generation. Try Code generation after creating a subsystem with all the blocks, for which you will generate the HDL Code.
In your case, create a subsystem with all the upsample and downsample blocks and the filters. That is, let the sine wave be the input and scope be the output to the subsystem, and generate the code for the new subsystem, This will generate the HDL Code for all your blocks. Refer the Generate HDL Code from Simulink Model.

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by