Hallo,
ihr hab mir beim letzten Mal so toll geholfen, ich hoffe ihr könnt das
diesmal auch.
Ich habe ein Problem bei der Spezifikation einer Konfiguration. Gegeben
sind eine Entität X mit einer Architektur A, die zwei Komponenten c1 vom
Typ C1 und c2 vom Typ C2 verwendet. Ich möchte zu A eine
Standard-Konfiguration Aconfig angeben, die aber nur c1 konkret
festlegt. c2 soll immer erst bei der Verwendung von X genau festgelegt
werden.
Erstelle ich nun eine Konfiguration für irgendeine Einheit, die eine
Komponente mit der Architektur A verwendet, so klappt die Zuweisung von
A zu X mittels "use entity" und danach die konkrete Festlegung für c2
auch bestens. Benutze ich allerdings für die Bindung "use
configuration", so wird die darauffolgende Bindung für c2 einfach
ignoriert, und die null-Konfiguration verwendet (also die zuletzt
analysierte Einheit).
Ich bin mir nicht sicher, wie genau der Sprachstandard in diesem Punkt
definiert ist, meine Bücher sagen zu dieser Kombination leider nichts
aus. Mich würde jetzt interessieren, ob das prinzipiell nicht
funktioniert, oder nur, ob mein Programm (Active-HDL) das nicht korrekt
verarbeitet. Oder vielleicht gibt es doch noch einen Trick, wie man das
Problem lösen könnte (möglichst mit der vorhandenen Aufteilung in
Konfigurationen).
Hier ist das Problem nochmal in gekürzter Quellcode-Form:
1 | entity X is ...
|
2 | end entity;
|
3 |
|
4 | architecture A of X is ...
|
5 | component C1 ...
|
6 |
|
7 | component C2 ...
|
8 |
|
9 | end architecture;
|
10 |
|
11 | -- Standard-Konfiguration für A
|
12 | configuration Aconfig of X is
|
13 | for A
|
14 | for c1 : C1 use entity ...
|
15 | end for;
|
16 | -- Keine Standard-Bindung für C2!
|
17 | end architecture;
|
18 |
|
19 | ---
|
20 |
|
21 | -- Funktioniert wie erwartet:
|
22 | configuration Bconfig_1 of Y is
|
23 | for B
|
24 | for x : X
|
25 | use entity X (A);
|
26 | for A
|
27 | c2 : C2 use entity ...
|
28 | end for;
|
29 | end for;
|
30 | end for
|
31 | end configuration;
|
32 |
|
33 | -- Funktioniert nicht:
|
34 | configuration Bconfig_2 of Y is
|
35 | for B
|
36 | for x : X
|
37 | use configuration Aconfig;
|
38 | -- Diese Bindung wird einfach ignoriert:
|
39 | for A
|
40 | c2 : C2 use entity ...
|
41 | end for;
|
42 | end for;
|
43 | end for
|
44 | end configuration;
|
Viele Grüße,
Maciej