Hallo!
Ich habe da ein Problem mit der Zuweisung von Signalen unterschiedlichen
Typs.
Etwas vereinfacht stellt sich mein Problem wie folgt dar:
1 | type A_type is array (0 to 8) of signed(8 downto 0);
|
2 | type B_type is array (0 to 7) of signed(8 downto 0);
|
3 |
|
4 | signal A : A_type;
|
5 | signal B : B_type;
|
6 |
|
7 | --- ...
|
8 |
|
9 | A(0 to 5) <= B(0 to 5);
|
10 |
|
11 | -- Fehler: Target type A_type in signal assignment is different from expression type B_type.
|
Wenn ich die letzte Zeile explizit caste
1 | A(0 to 5) <= A_type(B(0 to 5));
|
bekomme ich den Fehler:
Length of type "A_type" is 9; length of operand is 8.
Daher erscheint es mir so, dass Modelsim in der Anweisung
nicht versteht, dass ich hier jeweils dieselbe Anzahl Signale zuweise.
Weiß jemand eine Lösung?
Gruß,
dito