VHDL Kompakt - CES
VHDL Kompakt - CES
VHDL Kompakt - CES
Erfolgreiche ePaper selbst erstellen
Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.
2. Datentypen<br />
Ordnung Die Attribute ermitteln für Aufzählungstypen Werte, Ordnungszahlen und übergeordnete<br />
Typen (bei Untertypen).<br />
22<br />
Syntax<br />
Wertermittlung<br />
〈type〉’succ (〈typeExpr〉) : 〈value〉 -nachfolgender Wert zu 〈typeExpr〉<br />
〈type〉’pred (〈typeExpr〉) : 〈value〉 -vorhergehender –”– 〈typeExpr〉<br />
〈type〉’leftof (〈typeExpr〉) : 〈value〉 -linker –”– 〈typeExpr〉<br />
〈type〉’rightof(〈typeExpr〉) : 〈value〉 -rechter –”– 〈typeExpr〉<br />
Ordnung<br />
〈type〉’pos (〈typeExpr〉) : 〈integer〉 -Position von 〈typeExpr〉<br />
〈type〉’val (〈position〉) : 〈integer〉 -Wert von 〈position〉<br />
Ein- und Ausgabe<br />
〈type〉’image (〈typeExpr〉) : 〈string〉 -Text 〈typeExpr〉<br />
〈type〉’value (〈string〉) : 〈value〉 -Wert zu 〈string〉<br />
übergeordnete Typen – als Argument weiterer Attribute<br />
〈type〉’base〈’attribute〉 : 〈baseType〉 -Basistyp zu 〈type〉<br />
Beispiel<br />
type COLOR is (RED, BLUE, GREEN, YELLOW, BROWN, BLACK);<br />
subtype TLCOL is COLOR range RED to GREEN;<br />
...<br />
COLOR’low = RED<br />
COLOR’succ(RED) = BLUE<br />
TLCOL’base’right<br />
spc13= BLACK<br />
COLOR’base’left = RED<br />
TLCOL’base’succ(GREEN) = YELLOW