VHDL Programming

(C. Jardin) #1

102 Chapter Four


Access types are very powerful tools for modeling complex and abstract
types of systems. Access types bring programming language types of
operations to VHDL processes.

File Types


A file type allows declarations of objects that have a type FILE. A file object
type is actually a subset of the variable object type. A variable object can be
assigned with a variable assignment statement, while a file object cannot
be assigned. A file object can be read from, written to, and checked for end
of file only with special procedures and functions.
Files consist of sequential streams of a particular type. A file whose
base object type is INTEGERconsists of a sequential stream of integers.
This is shown in Figure 4-10.
A file whose object type is a complex record type consists of a sequential
stream of complex records. An example of how this might look is shown
in Figure 4-11.
At the end of the stream of data is an end-of-file mark. Two procedures
and one function allow operations on file objects:

READ(file, data)Procedure

Stack Element

Data

NXT

Stack Element

Data

NXT

Stack Element

Data

NXT

List_Head

Temp_Elem

Figure 4-8
Move Head Pointer
to Next Element.


Stack Element
Data

NXT

Stack Element

Data

NXT

List_Head

Temp_Elem

Figure 4-9
Deallocate Element.

Free download pdf