Info
此问题已关闭。 请重新打开它进行编辑或回答。
Error while conversion from Matlab to VHDL
2 次查看(过去 30 天)
显示 更早的评论
This is my Matlab Code
%#codegen
function y = neha(data)
Persistent hMod hDemod;
if isempty(hMOd)
hMod = comm.BPSKModulator;
hDemod = comm.BPSKDemodulator;
end
modSignal = step(hMod, data);
y = step(hDemod, modSignal);
end
This is my Test Bench
clear neha;
x=[1 0 1 0 1 0 1 1 0 0 1 ]
len=size(x)
y=zeros(1,len);
for ii=1:len
data =x(ii);
y(ii) = neha(data);
end
I have validate the code. But while conversion into VHDL I am getting this error
neha FixPt:15 - error - Single and Double Data Types are not supported in HDL conversion
3 个评论
Walter Roberson
2013-10-14
Ah I was getting function calls and indexing confused. In any case see the Answer I gave.
回答(1 个)
Walter Roberson
2013-10-14
x = uint8([1 0 1 0 1 0 1 1 0 0 1 ]);
and
y = zeros(1, len, class(x));
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!