next up previous contents
Next: acl Class Variables Up: Internal Code Generator Classes Previous: winfo_item Class Methods

   
The acl Class

During elaboration or simulation sometimes a part of a composite signal has to be selected respectively addressed for a specific action. While code created by the code generators can do this directly via the operators provided by the composite type classes the kernel cannot use type classes because they are unknown at kernel compile time. Hence, a common method to address a arbitrary part of a composite object is needed which can be evaluated by the simulation kernel. In the FreeHDL system this task is done by the acl (access code list) class.

A acl instance is simply a array of int values which describe the path beginning at a composite object down to the part of the object which is addressed by the acl instance. Each acl instances has a static size which might differ between different acl instances. Further, in the head of the list some informations to maintain the instance are stored.

Because creating and removing acl instances might occur very often during simulation, currently unused acl instances are not really removed from the system but stored into a ``free acl'' list. Consecutive create operations receive new acl instances from this list.

Example:

TYPE myrec IS RECORD a : INTEGER; b : BIT; END RECORD;
TYPE myarray IS ARRAY (0 TO 10) OF myrec;
...
VARIABLE myvar : myarray;
If we want to address b of the 4-th element of array myvar then the corresponding acl is constructed as follows:
acl *myacl = new(2) acl;

*myacl << 4 << 1;
Note, new(2) acl creates a new empty acl instance which can store up to 2 int values. The operators << is used to store a int value (or a whole acl list) at the current end of a acl instance. Note further that acl instances can only be created via a new operator because its actual size has to be passed over at runtime!



 
next up previous contents
Next: acl Class Variables Up: Internal Code Generator Classes Previous: winfo_item Class Methods

1998-11-17