Az előadás letöltése folymat van. Kérjük, várjon

Az előadás letöltése folymat van. Kérjük, várjon

Bevezetés a tárgyakhoz Tárgyak  Objects are the containers for values of a specified type  Objects are either signals, variables or constants  Once.

Hasonló előadás


Az előadások a következő témára: "Bevezetés a tárgyakhoz Tárgyak  Objects are the containers for values of a specified type  Objects are either signals, variables or constants  Once."— Előadás másolata:

1 Bevezetés a tárgyakhoz Tárgyak  Objects are the containers for values of a specified type  Objects are either signals, variables or constants  Once an object is declared of a certain type, operations can be performed on the object within the bounds set in the type declaration  If objects of different types are mixed or exceed boundaries set by the type declaration, an error is displayed

2 Bevezetés a tárgyakhoz Típus meghatározások  Scalar type definition:  Physical  Floating point  Enumeration  Integer  Composite type definition:  Array  Record  File type definition  Subsets of types may also be used

3 Bevezetés a tárgyakhoz Skalár típusok - Fizikai  Physical type:  Describes a quantity measurement of an item. This is expressed in a multiple of a base unit of measurement in a range that is specified  Example: TYPE measure IS RANGE 0 TO 100 TYPE measure IS RANGE 0 TO 100 UNITS UNITS mm; mm; cm=10mm; cm=10mm; END UNITS; END UNITS;

4 Bevezetés a tárgyakhoz Skalár típusok - Lebegőpontos  Floating point type:  Defines a collection of numbers that provide an approximation to real numbers  Problem: it is not possible for hardware to handle infinitely long real numbers  Example: TYPE half_hour IS RANGE 0.0 TO 29.99; TYPE half_hour IS RANGE 0.0 TO 29.99;

5 Bevezetés a tárgyakhoz Skalár típusok - Felsorolás  Enumeration type:  Permit to define a customized set of values  The literals can be either identifier literals (letters, underscores, digits etc.) or character literals  Example: TYPE wire_color IS (red, black, green); TYPE wire_color IS (red, black, green);

6 Bevezetés a tárgyakhoz Skalár típusok - Egész  Integer type:  Sets of positive or negative whole numbers.  Their range are machine dependent, typically  2.147.483.648 for 32-bit systems  Example: TYPE test_int IS RANGE -100 TO 100; TYPE test_int IS RANGE -100 TO 100;

7 Bevezetés a tárgyakhoz Skalár típusok – Rácsrend (Array)  Array type:  A named array is a collection of elements that are of the same type  Arrays may be configured in one or more dimensions.  Each array element is referenced by one or more index value  Example: TYPE array_10 IS ARRAY (0 TO 9) OF integer; TYPE array_10 IS ARRAY (0 TO 9) OF integer;

8 Bevezetés a tárgyakhoz Skalár típusok – Jegyzék (record)  Records:  A record is a composite type whose elements can be of various types  Its purpose is to group together objects of different types that can be operated as a single object  Example: TYPE coordinates IS RECORD TYPE coordinates IS RECORD xvalue,yvalue,zvalue:integer; xvalue,yvalue,zvalue:integer; END RECORD; END RECORD;

9 Bevezetés a tárgyakhoz Fájl típus  File type:  Allows the declaration of external files that contain objects of the type specified

10 Bevezetés a tárgyakhoz Példa

11 Bit típus  Bit is a type which is defined in the standard in VHDL  Bit can only assume the values ‘0’ or ‘1’


Letölteni ppt "Bevezetés a tárgyakhoz Tárgyak  Objects are the containers for values of a specified type  Objects are either signals, variables or constants  Once."

Hasonló előadás


Google Hirdetések