Guten Morgen, ich hab einen 3D-Vector:
1 | subtype cell is std_logic_vector(1 downto 0); |
2 | type row is array(8 downto 0) of cell; |
3 | type slice is array(2 downto 0) of row; |
4 | type cuboid is array(26 downto 0) of slice; |
5 | |
6 | signal state : cuboid; |
gibt es eine andere Möglichkeit den in einen std_logic_vector zu casten, als es über einen eigenen Prozess zu machen?
1 | process(state) |
2 | variable tmp : integer range 0 to 2047; |
3 | begin
|
4 | for Z in 0 to 26 loop |
5 | for Y in 0 to 2 loop |
6 | for X in 0 to 8 loop |
7 | tmp := (Z*27+Y*9+X)*2; -- every cell has 2 bits |
8 | flat(tmp+1 downto tmp) <= state(Z)(Y)(X); |
9 | end loop; |
10 | end loop; |
11 | end loop; |
12 | end process; |
Könnte "alias" sowas? Viele Grüße, Mampf