On 11 Sep 2006 02:57:18 -0700,
wrote:
> type R is record
> flag1 : boolean;
> flag2 : boolean;
> flag3 : boolean;
> end record R;
> type A is array (0 to 3) of R;
> signal flags : A;
> If I wanted to assign all flag1 elements to false
[...]
You could use an aggregate expression:
A <= (others => (FALSE, FALSE, FALSE));
or, if you prefer,
A <= (others => (flag1 => FALSE, flag2 => FALSE, flag3 => FALSE));
But that would assign to flag2 and flag3 as well. If you want
to assign to only part of the record, I think you have no choice
but to use a procedural loop.
Don't forget that booleans are reliably initialised to FALSE
anyway, without you needing to do anything about it.
--
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
http://www.MYCOMPANY.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.