MATLAB DESIGN HDL CODER RELEASE NOTES Betriebsanweisung Seite 60

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 410
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 59
60 www.xilinx.com System Generator for DSP User Guide
UG640 (v 12.2) July 23, 2010
Chapter 1: Hardware Design Using System Generator
Optional Input Ports
This example shows how to use the parameter passing mechanism of MCode blocks to
specify whether or not to use optional input ports on MCode blocks.
The following M-code, which defines M-function xl_m_addsub is contained in file
xl_m_addsub.m:
function s = xl_m_addsub(a, b, sub)
if sub
s = a - b;
else
s = a + b;
end
The following diagram shows a subsystem containing two MCode blocks that use M-
function xl_m_addsub.
Seitenansicht 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 409 410

Kommentare zu diesen Handbüchern

Keine Kommentare