Guest
Is there any technique (other than a for loop) to assign an element in
all records of an array?
Consider a record R defined as follows:
type R is record
flag1 : boolean;
flag2 : boolean;
flag3 : boolean;
end record R;
and an array A of records of type R defined as:
type A is array (0 to 3) of R;
signal flags : A;
To assign flag1 in array element 0 I would do:
flags(0).flag1 <= false;
If I wanted to assign all flag1 elements to false I could use a for
loop
for i in 0 to 3 loop
flags(i).flag1 <= false;
end loop;
Is there anyway to do the same thing using the "others" statement?
Cheers
Alex
all records of an array?
Consider a record R defined as follows:
type R is record
flag1 : boolean;
flag2 : boolean;
flag3 : boolean;
end record R;
and an array A of records of type R defined as:
type A is array (0 to 3) of R;
signal flags : A;
To assign flag1 in array element 0 I would do:
flags(0).flag1 <= false;
If I wanted to assign all flag1 elements to false I could use a for
loop
for i in 0 to 3 loop
flags(i).flag1 <= false;
end loop;
Is there anyway to do the same thing using the "others" statement?
Cheers
Alex