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
(access code list) class.
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
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
from this list.
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
bof the 4-th element of array
myvarthen the corresponding
aclis constructed as follows:
acl *myacl = new(2) acl; *myacl << 4 << 1;Note,
new(2) aclcreates a new empty
aclinstance which can store up to 2 int values. The operators
<<is used to store a int value (or a whole
acllist) at the current end of a
aclinstance. Note further that
aclinstances can only be created via a new operator because its actual size has to be passed over at runtime!