matlab to vhdl conversion

i want to write a matlab code for an user defined input for finding rise time,peak time and fall time which i then need to convert to vhdl. Input can be upto 16bit.

4 Comments

Yash - what have you tried so far?
i have used interpolation to find the rise time n peak time for already defined values but this cannot be converted to vhdl so we need some variables
x=-4:4;
y=[0 0.15 0.4 1.2 2.3 2.36 1.3 0.9 0]
cs=spline(x,[0 y 0]);
plot(x,y,'o');
x2=interp1(x(1:4),y(1:4),0.9,'spline')
x1=interp1(x(1:4),y(1:4),0.1,'spline')
xr=x2-x1
x4=interp1(x(5:9),y(5:9),0.1,'spline')
x3=interp1(x(5:9),y(5:9),0.9,'spline')
xf= x4-x3
As it can be seen i have defined y already with some numbers so in place of that i want to use y1,y2,y3..so on
Are y1, y2, etc. vectors or just scalars? If you want to use them in place of y then why not do so?
y1 y2 etc correspond to scalar values they are each a bit like 0 or 1

Sign in to comment.

Answers (1)

mouh nyquist
mouh nyquist on 2 Jan 2015
there is a gooood file in matlab file exchange ; I hope that will help you

2 Comments

file named what?
tape vhdl ; all the best

Sign in to comment.

Tags

Asked:

on 1 Jan 2015

Commented:

on 16 Jan 2015

Community Treasure Hunt

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

Start Hunting!