how can i show figure in my m-file?
古いコメントを表示
Hi Im going to execute these codes in matlab in order tc generate hdl code
:function [iport,tnext] = ADD_TESTER (oport, tnow, portinfo)
persistent ud; %Create a struct to store persistent user data
tnext = []; %initialize tnext to null
iport = struct(); %initialize iport to null
if(nargin ==3) %First call has 3 arguments
ud.call_count = 0; %Initialize call counter
tnext = tnow+100e-9;%Next invocation after 100 ns
iport.a = '0';
iport.b = '0';
iport.cin = '0';
else
ud.call_count = ud.call_count + 1;
if ud.call_count < 8 %run for 8 cycles
tnext = tnow+100e-9; %Next invocation after 100 ns
bin = dec2bin(ud.call_count,3);%Convert counter to binary string
iport.a = bin(1); %Assign bits of bin to 3 inputs
iport.b = bin(2);
iport.cin = bin(3);
else
disp('Over'); %If 8 cycles are over, don’t invoke with tnext
end
end
AND THE ERROR IS:Error in ADD_TESTER (line 15)
ud.call_count = ud.call_count + 1;
>> ADD_TESTER
15 ud.call_count = ud.call_count + 1;
K>>
PLZ HELP ME THANK YOU SO MUCH!
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Get Started with HDL Coder についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!