How to convert matlab code to VHDL code?

조회 수: 7 (최근 30일)
SRI
SRI 2014년 9월 10일
댓글: priyanka shinde 2020년 4월 8일
How to convert matlab code to VHDL code?
Thanks In Advance

채택된 답변

Rick Rosson
Rick Rosson 2014년 9월 10일
  댓글 수: 1
SRI
SRI 2014년 9월 11일
Hi could you please mention with one example for this conversion
thanks in advance

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

추가 답변 (2개)

Asad Aleem
Asad Aleem 2017년 2월 2일
In order to translate a Matlab code to HDL, all you have to do is to utilize HDL code. HDL coder is an extension of Matlab. I have checked its working on Matlab 16b.

priyanka shinde
priyanka shinde 2020년 4월 8일
clc ;
clear all;
close all;
xn=input('Enter the sequence=');
N=input('Enter the value of N=');
Xk=dft_fun(xn,N);
disp(Xk)
k=0:N-1;
subplot(2,1,1)
stem(k,abs(Xk))
xlabel('k')
ylabel('|Xk|')
title('Magnitude Plot')
subplot(2,1,2)
stem(k,angle(Xk))
xlabel('k')
ylabel('angle(Xk)')
title('Phase Plot')
function Xk=dft_fun(xn,N)
L=length(xn);
if(N<L)
error('N should always be greater than or equal to L')
end
xn=[xn zeros(1,N-L)];
for k=0:N-1
for n=0:N-1
Wn=exp(-j*2*pi*n*k/N);
X1(k+1,n+1)=Wn;
end
end
Xk=X1*xn';
  댓글 수: 1
priyanka shinde
priyanka shinde 2020년 4월 8일
i require to convert matlab code to hdl code
what process i do?

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

카테고리

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