Signal X_index has a multi source!

Gast #1404046
Lesenswert?

1
count_up: process(Taste1) 
2
begin
3
if (Taste1 = '1' and Taste1'event) then
4
  if X_index < 99 then
5
    X_index <= X_index + 1;
6
  end if;
7
end if;
8
end process count_up;
9

10
count_down: process(Taste2) 
11
begin
12
if (Taste2 = '1' and Taste2'event) then
13
  if X_index > 0 then
14
    X_index <= X_index - 1;
15
  end if;
16
end if;
17
end process count_down;

Kriege die Fehlermeldung:Signal X_index has a multi source.
Was tun?
Gast #1404082
Lesenswert?

1
count_up_down: process(Taste1, Taste2) 
2
begin
3
if (Taste1 = '1' and Taste1'event) then
4
  if X_index < 99 then
5
    X_index <= X_index + 1;
6
  end if;
7
elsif (Taste2 = '1' and Taste2'event) then
8
  if X_index > 0 then
9
    X_index <= X_index - 1;
10
  end if;
11
end if;
12
end process count_up_down;
Fehlermeldung jetzt:Signal X_index cannot be synthesized, bad 
synchronous description. Wat nu?
Gast #1404895
Lesenswert?

1
count_up_down: process(Generator,Taste1_DFF,Taste2_DFF) 
2
begin
3
  if (Generator = '1' and Generator'event) then
4
    Taste1_DFF <= Taste1;
5
    Taste2_DFF <= Taste2;
6
  end if;
7

8
  if (Taste1_DFF = '1' and Taste1_DFF'event) then
9
    if X_index < 99 then
10
      X_index <= X_index + 1;
11
    end if;
12
  end if;
13

14
  if (Taste2_DFF = '1' and Taste2_DFF'event) then
15
    if X_index > 0 then
16
      X_index <= X_index - 1;
17
    end if;
18
  end if;
19
end process count_up_down;

Leider immer noch Fehlermeldung:ERROR:Xst:827 -  line 46: Signal X_index 
cannot be synthesized, bad synchronous description.
#1405535
Lesenswert?

1
count_up_down: 
2
process(Generator) 
3
begin
4
if rising_edge(Generator) then
5
    
6
  if Taste1 = '1' then
7
    if X_index < 99 then
8
      X_index <= X_index + 1;
9
    end if;
10
  end if;
11

12
  if Taste2 = '1' then
13
    if X_index > 0 then
14
      X_index <= X_index - 1;
15
    end if;
16
  end if;
17

18
end if;
19
end process count_up_down;
Moderator (Firma: Titel) Persönliche Seite #1407830
Lesenswert?

Patrick Sulimma schrieb:
1
 count_up_down:
2
 process(Generator) begin
3
   if rising_edge(Generator) then
4
     if Taste1 = '1' then
5
     ...
6
     end if;
7
   ...
8
   end if;
9
 end process count_up_down;
Das ist jetzt aber immer noch keine Flankenerkennung bei den Tasten. 
Sondern solange die Taste gedrückt ist, zählt der Index mit der 
Taktfrequenz hoch oder runter. Und das kann recht schnell sein...

Wie man Tasten einsynchronisiert und auf Betätigungen reagiert sthet 
z.B. dort: 
http://www.lothar-miller.de/s9y/categories/18-Flankenerkennung
Moderator (Firma: Titel) Persönliche Seite #1408576
Lesenswert?

> bastelboy <= VHDL Anfänger
Ah, jetzt ja...   ;-)

> kostet wahrscheinlich zu viele Logikzellen auf meinem CPLD
Stimmt, da sind pro Taster etliche FFs im Spiel und du hast nur 1 FF pro 
Makrozelle. Aber ohne Eintakten mußt du das Thema Metastabilität genau 
im Auge behalten (siehe auch meine HP).

> CPLD XC9275.
Ist das neu? Die 92er Serie kannte ich noch nicht... :-)

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