I would like to ask if it is possible to use alias with multi dimensional arrays in VHDL and how to solve (1).
I have the following array defined at the beginning of the architecture>
subtype WORD8 is STD_LOGIC_VECTOR (7 downto 0);
type IMEM is array (0 to 576) of WORD8;
signal MEM: IMEM;
Through the program I use processes and I alias a part of the memory like so>
alias Version: STD_LOGIC_VECTOR (3 downto 0) is MEM(0)(3 downto 0);
alias IHL: STD_LOGIC_VECTOR (3 downto 0) is MEM(0)(7 downto 4);
This following line is alias too, both of the lines work
alias TOS: STD_LOGIC_VECTOR (7 downto 0) is MEM(1);
alias TOS: STD_LOGIC_VECTOR (7 downto 0) is MEM(1)(7 downto 0);
Now I have a data which is larger than WORD8, of length 2xWORD8. I tried the following code but, without success. It causes>
Error: indexed name is not a 'std_logic_vector'
--(1) How to solve this?
alias TL: STD_LOGIC_VECTOR (15 downto 0) is MEM(3 downto 2);
This line also gives the same error>
alias TL: STD_LOGIC_VECTOR (15 downto 0) is MEM(3 downto 2)(7 downto 0);
I was experimenting a workaround, but also with no success>
alias TL2: STD_LOGIC_VECTOR (7 downto 0) is MEM(2);
alias TL3: STD_LOGIC_VECTOR (7 downto 0) is MEM(3);
alias TL4: STD_LOGIC_VECTOR (15 downto 0) is TL3&TL2;