Home > other >  Beginners VHDL editing 60 s countdown refer error!!!!!!!!!!
Beginners VHDL editing 60 s countdown refer error!!!!!!!!!!

Time:10-05

The LIBRARY ieee.
USE the ieee. Std_logic_1164. All;
USE the ieee. Std_logic_arith. All;
USE the ieee. Std_logic_unsigned. All;

The ENTITY COUNTDOWN IS
The PORT (
CLK: IN std_logic;
LED_ABIT: std_logic_vector (7 downto 0);
LED_SEGUNIT: std_ulogic_vector (7 downto 0);
LED_SEGDECADE: std_ulogic_vector (7 downto 0);

Reset: in std_logic
);
END the ENTITY COUNTDOWN.

ARCHITECTURE TWO OF COUNTDOWN IS

SIGNAL COUNTDECADE: INTEGER RANGE 0 TO 6;
SIGNAL COUNTUNIT: INTEGER RANGE 0 TO 9;
SIGNAL COUNT: INTEGER RANGE 0 TO 60;
SIGNAL COUNT1: std_logic_VECTOR downto 0 (1);
SIGNAL ABIT: std_logic_VECTOR downto 0 (1);
SIGNAL NUM: INTEGER RANGE 0 TO 60;
The BEGIN
The PROCESS (CLK)
The BEGIN
If the reset='0' then -???????
- the state & lt;=s0;
COUNTDECADE<=6;
COUNTUNIT<=0;
ELSIF CLK 'EVENT AND CLK=1 THEN
COUNT<=COUNT + 1;
COUNT1 & lt;=COUNT1 + 1;
IF (COUNT=1) THEN
COUNTDECADE<=5;
COUNTUNIT<=9;
ELSIF (COUNTUNIT=9) then
COUNTUNIT<=0;
COUNTDECADE<=COUNTDECADE - 1;
END the IF;
END the IF;
END the PROCESS.

ABIT & lt; (1=COUNT DOWNTO 0);
LED_ABIT & lt;="00000001" the WHEN ABIT=0 ELSE - a selected scanning signal decoding
"00000010" the WHEN ELSE ABIT=1

LED_SEGDECADE & lt;="00000110" the when ELSE COUNTDECADE=1
"01011011" the when COUNTDECADE=2 ELSE
"01001111" the when COUNTDECADE=3 ELSE
"01100110" the when COUNTDECADE=4 ELSE
"01101101" the when COUNTDECADE=5 ELSE
"01111101" the when COUNTDECADE=6 ELSE

LED_SEGUNIT & lt;="01111111" the WHEN COUNTUNIT=0 ELSE
"00000110" the WHEN ELSE COUNTUNIT=1
"01011011" the WHEN COUNTUNIT=2 ELSE
"01001111" the WHEN COUNTUNIT=3 ELSE
"01100110" the WHEN COUNTUNIT=4 ELSE
"01101101" the WHEN COUNTUNIT=5 ELSE
"01111101" the WHEN COUNTUNIT=6 ELSE
"00000111" the WHEN COUNTUNIT=7 ELSE
"01111111" the WHEN COUNTUNIT=8 ELSE
"01101111" the WHEN COUNTUNIT=9 ELSE
END TWO;

Software error an error expecting the last line "(", or an identifier (" end" is a reserved keyword), or unary operator

For bosses to save!!!!!!

CodePudding user response:

There is a problem!

CodePudding user response:

Friend, error message is very clear, before "END TWO" one less ";" , you finally the when the else statement is not complete! Find the when the else statements example carefully compare how to end
  • Related