Warnung ****** is unused and will be removed from module ******

OP #4454025
Lesenswert?

Hallo zusammen,

ich bin noch recht neu im Bereich der FPGAs / von VHDL und stehe vor 
einem Problem (Warnung) die mich stark verwirrt. Ich habe folgenden Code 
geschrieben:
1
library IEEE;
2
use IEEE.STD_LOGIC_1164.ALL;
3
use IEEE.NUMERIC_STD.ALL;
4

5
entity SimpleTest is
6
    Port ( clk : in STD_LOGIC;
7
           reset : in STD_LOGIC;
8
           start : in STD_LOGIC;
9
           --burst : in STD_LOGIC_VECTOR (11 downto 0);
10
           frequenz : in STD_LOGIC_VECTOR (17 downto 0);
11
           delay : in STD_LOGIC_VECTOR (15 downto 0);
12
           out_signal : out STD_LOGIC);
13
end SimpleTest;
14

15
architecture Behavioral of SimpleTest is
16
signal countDelay : unsigned(15 downto 0);
17
signal delayReady : std_logic;
18
signal countFreq : unsigned(17 downto 0);
19
signal temp_out : std_logic;
20
signal temp_ones : std_logic;
21

22
begin
23
CTRD : process( clk, reset, delayReady, start )
24
begin
25
  if reset = '0' then
26
    countDelay <= (others => '0');
27
  elsif clk='0' and clk'event and delayReady='0' and start='1' then
28
    if countDelay < unsigned(delay) then
29
      countDelay <= countDelay + 1;
30
    else
31
      countDelay <= (others => '0');
32
      delayReady <= '1';
33
    end if ;
34
  end if ;
35
end process ; -- CTRD
36

37
CTRF : process( clk, reset, delayReady, start )
38
begin
39
  if reset = '0' then
40
    countFreq <= (others => '0');
41
  elsif clk='0' and clk'event and delayReady='1' and start='1' then
42
    if delayReady='1' and temp_ones='0' then
43
      temp_out <= '1';
44
      temp_ones <= '1';
45
    end if ;
46
    if countFreq < unsigned(frequenz) then
47
      countFreq <= countFreq + 1;
48
    else
49
      countFreq <= (others => '0');
50
      temp_out <= not temp_out;
51
    end if ;
52
  end if ;
53
end process ; -- CTRF
54

55
out_signal <= temp_out;
56

57
end Behavioral;

und bekomme die Warnungen:
1
[Synth 8-3332] Sequential element (delayReady_reg) is unused and will be removed from module SimpleTest.
2
[Synth 8-3332] Sequential element (temp_ones_reg) is unused and will be removed from module SimpleTest.
3
[Synth 8-3332] Sequential element (\countDelay_reg[0] ) is unused and will be removed from module SimpleTest.
4
[Synth 8-3332] Sequential element (\countDelay_reg[1] ) is unused and will be removed from module SimpleTest.
5
[Synth 8-3332] Sequential element (\countDelay_reg[2] ) is unused and will be removed from module SimpleTest.
6
[Synth 8-3332] Sequential element (\countDelay_reg[3] ) is unused and will be removed from module SimpleTest.
7
[Synth 8-3332] Sequential element (\countDelay_reg[4] ) is unused and will be removed from module SimpleTest.
8
[Synth 8-3332] Sequential element (\countDelay_reg[5] ) is unused and will be removed from module SimpleTest.
9
[Synth 8-3332] Sequential element (\countDelay_reg[6] ) is unused and will be removed from module SimpleTest.
10
[Synth 8-3332] Sequential element (\countDelay_reg[7] ) is unused and will be removed from module SimpleTest.
11
[Synth 8-3332] Sequential element (\countDelay_reg[8] ) is unused and will be removed from module SimpleTest.
12
[Synth 8-3332] Sequential element (\countDelay_reg[9] ) is unused and will be removed from module SimpleTest.
13
[Synth 8-3332] Sequential element (\countDelay_reg[10] ) is unused and will be removed from module SimpleTest.
14
[Synth 8-3332] Sequential element (\countDelay_reg[11] ) is unused and will be removed from module SimpleTest.
15
[Synth 8-3332] Sequential element (\countDelay_reg[12] ) is unused and will be removed from module SimpleTest.
16
[Synth 8-3332] Sequential element (\countDelay_reg[13] ) is unused and will be removed from module SimpleTest.
17
[Synth 8-3332] Sequential element (\countDelay_reg[14] ) is unused and will be removed from module SimpleTest.
18
[Synth 8-3332] Sequential element (\countDelay_reg[15] ) is unused and will be removed from module SimpleTest.

Aber ich benutze sie doch oder ?
folgender Test läuft ohne die Warnung:
1
library IEEE;
2
use IEEE.STD_LOGIC_1164.ALL;
3
use IEEE.NUMERIC_STD.ALL;
4

5
entity SimpleTest is
6
    Port ( clk : in STD_LOGIC;
7
           reset : in STD_LOGIC;
8
           input_test : in STD_LOGIC;
9
           max : in STD_LOGIC_VECTOR (15 downto 0);
10
           output_test : out STD_LOGIC;
11
           output_test2 : out STD_LOGIC);
12
end SimpleTest;
13

14
architecture Behavioral of SimpleTest is
15
signal temp : std_logic;
16
signal count : unsigned(15 downto 0);
17

18
begin
19
CTRD : process( clk, reset )
20
begin
21
  if reset = '0' then
22
        temp <= '0';
23
  elsif clk='1' and clk'event then
24
    if count <= unsigned(max) then
25
      count <= count + 1;
26
    else
27
      count <= (others => '0');
28
      temp <= not temp;
29
    end if ;
30
  end if ;
31
end process ; -- CTRD
32

33
output_test <= temp;
34
output_test2 <= temp and input_test;
35

36
end Behavioral;

Kann mir jemand helfen?
Sry falls sich der Code etwas schrecklich liest aber ich stehe momentan 
am Anfang des lernens ^^
Gast #4454087
Lesenswert?

Versuch mal "delayReady" in einem Resetfall auf 0 zu setzen oder es 
zumindest zu initialisieren.

Für dein zweites Beispiel solltest du dir auch überlegen ob du "count" 
nicht resetten oder initialisieren solltest.
Moderator (Firma: Titel) Persönliche Seite #4454106
Lesenswert?

Dominik G. schrieb:
> elsif clk='0' and clk'event and delayReady='1' and start='1' then
Diese immer noch sehr ungewöhnliche Beschreibung eines Clock-Enables 
solltest du in die "übliche" Schreibweise umformulieren:
http://www.lothar-miller.de/s9y/categories/6-Clock-Enable
Dann sparst du dir diese vielen Signale in der Sensitivliste, die 
sowieso nichts bewirken und trotzdem rein müssen.

Dominik G. schrieb:
> Aber ich benutze sie doch oder ?
Nicht so richtig...
Sehen wir uns mal das temp_ones an. Weil du nirgends eine Resetbedingung 
definierst, sondern das Ding nur abfrägst und dann auf '1' setzt, kann 
die Optimierung dieses Signal gleich mal im Default auf '1' setzen. Du 
hast dir da ja nichts gewünscht.

Genau das Selbe mit delayReady: du hast keinen Init-  oder Reset-Wert 
angegeben, also geht die Toolchain her und "optimiert" das auf '1'. Und 
wenn dieses Signal statisch auf '1' ist, ist auch logischerweise der 
Zähler countDelay unnötig, denn der dient ja nur dazu, das Signal 
delayReady auf '1' zu setzen.

Probiers mal so:
1
signal countDelay : unsigned(15 downto 0) := (others=>'0');
2
signal delayReady : std_logic             := '0';
3
signal countFreq : unsigned(17 downto 0)  := (others=>'0');
4
signal temp_out : std_logic               := '0';
5
signal temp_ones : std_logic              := '0';

Dominik G. schrieb:
> oder ?
Warum kommt Plenken immer mehr in Mode?
Hat so ein simples Fragezeichen denn wirklich seine eigene Zeile 
verdient
?

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren