YodaTheGreat
Programmer
Hi All,
I have 2 Signal INPUT_A and INPUT_B.
And I want Inc/Dec a variable with this signals
Process (INPUT_A,INPUT_B,Reset)
Begin
If Reset = '1' Then
-- Async reset etc
Else
If Falling_Edge(INPUT_A) Then
If INPUT_B='1' Then
Variable <= Variable + X"01";
Else
Variable <= Variable - X"01";
End If;
End If;
If Falling_Edge(INPUT_B) Then
If INPUT_A='1' Then
Variable <= Variable - X"01";
Else
Variable <= Variable + X"01";
End If;
End If;
If Rising_Edge(INPUT_A) Then
If INPUT_B='1' Then
Variable <= Variable + X"01";
Else
Variable <= Variable - X"01";
End If;
End If;
If Rising_Edge(INPUT_B) Then
If INPUT_A='1' Then
Variable <= Variable - X"01";
Else
Variable <= Variable + X"01";
End If;
End If;
End If;
End Process;
But This Code don't Work.....
Have you a Solution, Please.
Some Code for Me.
Best regards Yodathegreat.
VHDL Beginer..
I have 2 Signal INPUT_A and INPUT_B.
And I want Inc/Dec a variable with this signals
Process (INPUT_A,INPUT_B,Reset)
Begin
If Reset = '1' Then
-- Async reset etc
Else
If Falling_Edge(INPUT_A) Then
If INPUT_B='1' Then
Variable <= Variable + X"01";
Else
Variable <= Variable - X"01";
End If;
End If;
If Falling_Edge(INPUT_B) Then
If INPUT_A='1' Then
Variable <= Variable - X"01";
Else
Variable <= Variable + X"01";
End If;
End If;
If Rising_Edge(INPUT_A) Then
If INPUT_B='1' Then
Variable <= Variable + X"01";
Else
Variable <= Variable - X"01";
End If;
End If;
If Rising_Edge(INPUT_B) Then
If INPUT_A='1' Then
Variable <= Variable - X"01";
Else
Variable <= Variable + X"01";
End If;
End If;
End If;
End Process;
But This Code don't Work.....
Have you a Solution, Please.
Some Code for Me.
Best regards Yodathegreat.
VHDL Beginer..