Data Types Related to I/O Cards
The following data structure describes the I/O card:
char* base_addr; /* -- base of the target memory
location */This declaration is also copied from
types.h
file of the Intrinsics library. The variable of this type is called “card element”. It contains all the information about the I/O card. The purpose of theuser_data
field is to allow users to add whatever data they want to the card element, because card elements are visible to user-written functions.Each card element contains information about all its ports. It is represented as an array of report elements, each of which describes a single port of the card. Thus, the cross-referenced data structure is built in the generated code. Each report element involved in I/O mapping has a pointer to its card element, whereas each card element has an array of pointers to the report elements that are its I/O ports. This data relation is static and is initialized in the
init()
functions generated in the code.It is assumed that each card is controlled by three functions that do the following: