MATLAB DESIGN HDL CODER RELEASE NOTES Betriebsanweisung Seite 71

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 410
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 70
System Generator for DSP User Guide www.xilinx.com 71
UG640 (v 12.2) July 23, 2010
Compiling MATLAB into an FPGA
Example of disp Function
The following MCode function shows how to use the disp function to print variable
values.
function x = testdisp(a, b)
persistent dly, dly = xl_state(zeros(1, 8), a);
persistent rom, rom = xl_state([3, 2, 1, 0], a);
disp('Hello World!');
disp(['num2str(dly) is ', num2str(dly)]);
disp('disp(dly) is ');
disp(dly);
disp('disp(rom) is ');
disp(rom);
a2 = dly.back;
dly.push_front_pop_back(a);
x = a + b;
disp(['a = ', num2str(a), ', ', ...
'b = ', num2str(b), ', ', ...
'x = ', num2str(x)]);
disp(num2str(true));
disp('disp(10) is');
disp(10);
disp('disp(-10) is');
disp(-10);
disp('disp(a) is ');
disp(a);
disp('disp(a == b)');
disp(a==b);
The Enable print with disp option must be checked.
Seitenansicht 70
1 2 ... 66 67 68 69 70 71 72 73 74 75 76 ... 409 410

Kommentare zu diesen Handbüchern

Keine Kommentare