Jun 14, 2018

Features of for... loop in VHDL


If you didn't noticed, in my previous post I used "for" like "foreach" across enumerate type


1
2
3
type LaneIndex is (L0,L1,L2,L3);
...
for Lane in LaneIndex loop

In fact, you also can use it like that

for i in Arr'range loop
if Arr is an array.

Or you can use it like that:


1
2
3
subtype LanesRange is integer range 0 to LanesInCore-1;
...
for Lane in LanesRange loop
Highly recommend!

No comments:

Post a Comment