next up previous contents
Next: Signals and assignments Up: Data types and type Previous: Generic arrays   Contents

Structure

A structure is a collection of signals that are referred to by symbolic names, rather than numeric subscripts. A structure declaration has this form:
  foo : struct {
    c1 : type1;
    c2 : type2;
    ...
    cn : typen;
}
where c1...cn are symbolic names. This declaration is exactly equivalent to the declarations:
  foo.c1 : type1;
  foo.c2 : type1;
  ..
  foo.cn : type1;
That is, like an array, a structure is simply a collection of signals with similar names. Nonetheless, syntactic expansions make it possible to treat structures as if they were first-class objects, testing them for equality, assigning them and passing them as parameters. This is described in section 10.18 below.



2002-10-28