Adding of two signals and convert into vhdl

1 view (last 30 days)
I have a problem at converting floating point to fixed point ???Can u please help?
function[y] = addsig(x, x1)
fs=100;
N=1000;
A=1000;
dt=1/fs;
t=dt*(0:N-1);
x=A*sin(2*pi*f*t);
x1=A*sin(2*pi*f*t);
y=x+x1;
coder.extrinsic(''plot')
plot(y)
end
  2 Comments
KALYAN ACHARJYA
KALYAN ACHARJYA on 24 Nov 2018
Edited: madhan ravi on 24 Nov 2018
Any Issue?
have you checked here?
madhan ravi
madhan ravi on 24 Nov 2018
coder.extrinsic(''plot')
^-^----change this
coder.extrinsic('plot')

Sign in to comment.

Answers (1)

Kiran Kintali
Kiran Kintali on 19 Oct 2020
If you are using autoamted floating point to fixed point conversion tool please share the testbench.
https://www.mathworks.com/help/fixedpoint/ug/fixed-point-conversion.html

Products


Release

R2014b

Community Treasure Hunt

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

Start Hunting!