Hallo,
ich wollte mal einen PI Regler in Floating Point realisieren und bin
dabei auf folgendes Problem gestoßen: Ich verwende 2 FPU aus
CoreGenerator Bibliothek (Xilinx). Der ISE Compiler sagt z.B.
WARNING:HDLCompiler:871 -
"C:\Users\user71\Desktop\Xilinx_projects\fixed_point\PI_Cntr.vhd" Line
67: Using initial value "00000000000000000000000000000000" for integral
since it is never assigned
dabei verwende ich doch die Variable. Ich vermute mal dass das Problem
bei Port Map liegt.
Kann mir jemand sagen ob ich etwas falsch mache?
Danke im Vorraus
1
libraryIEEE;
2
useIEEE.STD_LOGIC_1164.ALL;
3
useIEEE.NUMERIC_STD.ALL;
4
5
6
entityPI_Cntris
7
Port(clk:inSTD_LOGIC;
8
setpoint:inSTD_LOGIC_VECTOR(31downto0);
9
actualpoint:inSTD_LOGIC_VECTOR(31downto0);
10
output:outSTD_LOGIC_VECTOR(31downto0)
11
);
12
endPI_Cntr;
13
14
15
architectureBehavioralofPI_Cntris
16
17
------------- Begin Cut here for COMPONENT Declaration ------ COMP_TAG
18
COMPONENTfloat_sum
19
PORT(
20
a:INSTD_LOGIC_VECTOR(31DOWNTO0);
21
b:INSTD_LOGIC_VECTOR(31DOWNTO0);
22
operation:INSTD_LOGIC_VECTOR(5DOWNTO0);
23
result:OUTSTD_LOGIC_VECTOR(31DOWNTO0)
24
);
25
ENDCOMPONENT;
26
27
COMPONENTfloat_mult
28
PORT(
29
a:INSTD_LOGIC_VECTOR(31DOWNTO0);
30
b:INSTD_LOGIC_VECTOR(31DOWNTO0);
31
result:OUTSTD_LOGIC_VECTOR(31DOWNTO0)
32
);
33
ENDCOMPONENT;
34
35
36
-- COMP_TAG_END ------ End COMPONENT Declaration ------------
Ich würde probieren, so einen Regler mit Integern machen. Die lassen
sich wesentlich einfacher verrechnen. Und mit einem geeigneten Modell
läuft ein Regler auch mit 32-Bit Integern.
Student schrieb:> 67: Using initial value "00000000000000000000000000000000" for integral> since it is never assigned> dabei verwende ich doch die Variable.
Sososo, das ist eine Variable...
Warum steht da dann /Signal/:
> dabei verwende ich doch die Variable.
Ja, aber immer auf der rechten Seite des Zuweisungspfeils...
BTW: vergiss diese Softwaredenkweise.
Und merk dir schon mal das Wort "Latency". Du wirst es im Verlauf der
Fehlersuche noch ein paar mal hören...
>> Lothar Miller
Sorry es handelt sich wirklich um ein Signal.
Ich habe beides probiert. Wenn ich in Int32 rechne zeigt mir der
Compiler max. Frequenz von 98 Mhz für die Multiplikation. Wenn ich FPU
anwende errechnet 89Mhz. Vom Platz her macht es auch nicht wirklich viel
aus.
Bei der Simulation habe ich bemerkt dass es kein Wert übergeben wird.
Liegt es an die Schreibweise?
Student schrieb:> Bei der Simulation habe ich bemerkt dass es kein Wert übergeben wird.
Wohin soll da ein Wert übergeben werden?
> Liegt es an die Schreibweise?
Naja, du weist dem Signal add_r von 2 Stellen aus etwas zu.
Hier wird in der Portliste ein Ausgang zugewiesen:
result => add_r,
Und hier ein Wert:
add_r <= integral;
Was sollte da herauskommen?
>> Lothar Miller
Vielen Dank. Du bist der beste!!
Ich habe es endlich.
Eine Frage hätte ich trotzdem. Was will mir den Compiler mit Warning
sagen:
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <oper_2> has
a constant value of 0 in block <PI_Cntr>. This FF/Latch will be trimmed
during the optimization process.
1
libraryIEEE;
2
useIEEE.STD_LOGIC_1164.ALL;
3
useIEEE.NUMERIC_STD.ALL;
4
5
6
entityPI_Cntris
7
Port(clk:inSTD_LOGIC;
8
setpoint:inSTD_LOGIC_VECTOR(31downto0);
9
actualpoint:inSTD_LOGIC_VECTOR(31downto0);
10
output:outSTD_LOGIC_VECTOR(31downto0)
11
);
12
endPI_Cntr;
13
14
15
architectureBehavioralofPI_Cntris
16
17
------------- Begin Cut here for COMPONENT Declaration ------ COMP_TAG
18
COMPONENTfloat_sum
19
PORT(
20
a:INSTD_LOGIC_VECTOR(31DOWNTO0);
21
b:INSTD_LOGIC_VECTOR(31DOWNTO0);
22
operation:INSTD_LOGIC_VECTOR(5DOWNTO0);
23
result:OUTSTD_LOGIC_VECTOR(31DOWNTO0)
24
);
25
ENDCOMPONENT;
26
27
COMPONENTfloat_mult
28
PORT(
29
a:INSTD_LOGIC_VECTOR(31DOWNTO0);
30
b:INSTD_LOGIC_VECTOR(31DOWNTO0);
31
result:OUTSTD_LOGIC_VECTOR(31DOWNTO0)
32
);
33
ENDCOMPONENT;
34
35
36
-- COMP_TAG_END ------ End COMPONENT Declaration ------------
Student schrieb:> This FF/Latch will be trimmed>> during the optimization process.
Die Randbedingungen, also das Timing, die Signale von aussen und das
Verhalten der state machines verändern das Signal nicht. Daher wird es
ersetzt. Vermutlich ist das falsch und hat seine Ursache darin, dass Du
etwas nicht angeschlossen hast, eine state machine einen Zustand nicht
erreicht oder sonst etwas (nicht) passiert, was Du (nicht) wolltest. Du
musst das design simulieren und rausfinden, welches Signal sich da nicht
ändert, wesewegen in der Folge das nächste nicht ändert und den Grund
finden.
>> Mirco
Ich bin mir nicht sicher aber es scheint, dass die Warnung nur in einem
Zusammenhang mit DSP48 Element kommt. Ich habe im CoreGenerator die
gleiche Elemente nur auf FF aufbauen lassen(also ohne DSP48 Option) und
sieh mal an es kommen die anderen Meldungen:
WARNING:Xst:387 - The KEEP property attached to the net <C0/sig00000069>
may hinder timing optimization.
You may achieve better results by removing this property
Student schrieb:> Eine Frage hätte ich trotzdem. Was will mir den Compiler mit Warning> sagen:> WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <oper_2> has> a constant value of 0 in block <PI_Cntr>. This FF/Latch will be trimmed> during the optimization process.
Mich wundert eher, dass die anderen oper(5..1) nicht erwähnt werden.
Denn in dem Codebeispiel ändert sich nur oper(0)...
>>Lothar Miller
ich habe nur eine herausgegriffen.
WARNING:Xst:1902 - Value 0 for attribute AUTORESET_PATDET of instance
blk00000090 in unit blk00000090 is not supported
WARNING:Xst:1902 - Value 0 for attribute AUTORESET_PATDET of instance
blk00000091 in unit blk00000091 is not supported
WARNING:Xst:1902 - Value 0 for attribute AUTORESET_PATDET of instance
blk00000092 in unit blk00000092 is not supported
WARNING:Xst:1293 - FF/Latch <oper_1> has a constant value of 0 in block
<PI_Cntr>. This FF/Latch will be trimmed during the optimization
process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <oper_2> has
a constant value of 0 in block <PI_Cntr>. This FF/Latch will be trimmed
during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <oper_3> has
a constant value of 0 in block <PI_Cntr>. This FF/Latch will be trimmed
during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <oper_4> has
a constant value of 0 in block <PI_Cntr>. This FF/Latch will be trimmed
during the optimization process.
WARNING:Xst:1896 - Due to other FF/Latch trimming, FF/Latch <oper_5> has
a constant value of 0 in block <PI_Cntr>. This FF/Latch will be trimmed
during the optimization process.