Hallo zusammen,
folgend einen Auszug aus meinem Quelltext:
1 | constant A_ADDR_OFFSET : natural := 2;
|
2 | signal B_addr_offset: std_logic_vector(15 downto 0);
|
3 | signal C_addr_offset: std_logic_vector(15 downto 0);
|
4 |
|
5 | -- actual dimension of matrices
|
6 | signal A_act_num_rows, A_act_num_cols: std_logic_vector (0 to 7);
|
7 | signal B_act_num_rows, B_act_num_cols: std_logic_vector (0 to 7);
|
8 |
|
9 | ...
|
10 |
|
11 | -- Auslesen der Matrizendimensionen
|
12 | A_act_num_rows <= BRAM_Din_B(0 to 7);
|
13 | A_act_num_cols <= BRAM_Din_B(8 to 15);
|
14 | B_act_num_rows <= BRAM_Din_B(16 to 23);
|
15 | B_act_num_cols <= BRAM_Din_B(24 to 31);
|
16 |
|
17 | -- Berechnung des Offset auf die Adresse im BRAM bis Matrix B beginnt
|
18 | B_addr_offset <= A_ADDR_OFFSET + A_act_num_rows * A_act_num_cols;
|
19 | C_addr_offset <= A_ADDR_OFFSET + A_act_num_rows * A_act_num_cols +
|
20 | B_act_num_rows * B_act_num_cols;
|
Aus dem BRAM lese ich mir die Informationen über die Matrizendimensionen
ein und berechne den Offset zu den Matrizen.
1. Versuche ich dieses Konstrukt zu synthetisieren erhalte ich folgende
Fehlermeldung:
ERROR:Xst:1706 - Unit <matrix_multiply_ip>: port <D> of FF/Latch
<B_addr_offset_15> has no source
ERROR:Xst:1847 - Design checking failed
Kommentiere ich C_addr_offset aus, wird für B_addr_offset eine
MAC-Einheit synthetisiert.
Kommentiere ich B_addr_offset aus, wird für C_addr_offset keine
MAC-Einheit synthetisiert.
Lasse ich beide drin, wird wohl versucht zwei MAC-Einheiten zu
verschalten, was dann wohl zum Fehler führt.
Multiplier <Mmult__n0067> in block <matrix_multiply_ip> and
adder/subtractor <Madd__n0027> in block <matrix_multiply_ip> are
combined into a MAC<Mmac_Madd__n0027>.
The following registers are also absorbed by the MAC: <B_act_num_rows>
in block <matrix_multiply_ip>.
Multiplier <Mmult__n0071> in block <matrix_multiply_ip> and
adder/subtractor <Madd__n0059> in block <matrix_multiply_ip> are
combined into a MAC<Maddsub__n0071>.
The following registers are also absorbed by the MAC: <A_act_num_rows>
in block <matrix_multiply_ip>, <A_act_num_cols> in block
<matrix_multiply_ip>.
2. In der Berechnung von C_addr_offset werden jeweils zwei 8Bit-Zahlen
miteinander multipliziert und anschließend addiert. Laut meinem
Verständnis müsste das REsultat eine Breite von 17Bit haben.
Synthetisiere ich C_addr_offset allerdings mit dieser Breite erhalte
ich:
Width mismatch. <C_addr_offset> has a width of 17 bits but assigned
expression is 16-bit wide.
Hat jemand konstruktives zu einem oder beiden Punkten beizutragen?
Gruß,
Stefan