i have matlab 2011,,can i genarate vhdl and verilog code for 2d dct from it by using hdl coder

조회 수: 2 (최근 30일)
i have matlab 2011,,can i genarate vhdl and verilog code for 2d dct from it by using hdl coder
  댓글 수: 1
Cogli
Cogli 2015년 11월 30일
First I am not sure if HDL coder can generate VHDL and Verilog code. But I may point out that you can use dct instead of dct2 to ensure MATLAB coder works.
This is because dct2 is not supported by MATLAB Coder (see full supported function list here ).
But however dct is supported, conditionally. Therefore, in some cases you can separate dct2() as dct(dct().').' to compute dct2. For example a validation code looks like
N = 10;
x = rand(N,N);
max(max(abs((dct2(x) - dct(dct(x).').'))))
from which we get
ans =
0
So, you can first use two dcts to compute dct2 instead, and then generate your code using MATLAB coder.

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

채택된 답변

Tim McBrayer
Tim McBrayer 2015년 12월 16일
In R2011b, the name of the HDL code generator was Simulink HDL Coder. It allows you to generate VHDL or Verilog code from Simulink designs. You can generate HDL from MATLAB in this release by placing the MATLAB code in a MATLAB Function block in a Simulink block diagram. The ability to generate HDL directly from MATLAB code was added in R2012a, at which point the product was renamed to HDL Coder.

추가 답변 (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