Nabend zusammen,
ich hab dieses kleine Programm aus einer Seite kopiert, um VHDL zu
lernen.
Leider bekomme ich aber eine Fehlermeldung die ich mir nicht erklären
kann.
Ich hab vorher schon in anderen Foren mal nachgeschaut, ob es so ein
ähnliches Problem gab.
Zwar fand ich eine Lösung, aber die funktioniert leider auch nicht.
Hoffe nun, dass mir jemand hier helfen kann.
1 | library IEEE;
|
2 | use IEEE.STD_LOGIC_1164.ALL;
|
3 | --use IEEE.STD_LOGIC_ARITH.ALL;
|
4 | --use IEEE.STD_LOGIC_UNSIGNED.ALL;
|
5 | use IEEE.NUMERIC_STD.all;
|
6 |
|
7 |
|
8 |
|
9 | ---------- 2to4 Decoder --------------------------
|
10 | ------------- Beginn entity ------------------
|
11 | entity 2to4_decoder is [Hier die Line 33]
|
12 | Port ( SWA : in STD_LOGIC_VECTOR (1 downto 0); -- 2-bit input
|
13 | LED : out STD_LOGIC_VECTOR (3 downto 0); -- 4-bit output
|
14 | EN : in STD_LOGIC); -- enable input
|
15 | end 2to4_decoder;
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | ----------------- Beginn architecture -------------
|
21 | architecture Behavioral of 2to4_decoder is
|
22 |
|
23 | begin
|
24 |
|
25 | ----------------- Beginn process ------------------
|
26 | process (SWA, EN)
|
27 | begin
|
28 |
|
29 | LED <= "1111"; -- default output value
|
30 | if (EN = '1') then -- active high enable pin
|
31 | case SWA is
|
32 | when "00" => LED(0) <= '0';
|
33 | when "01" => LED(1) <= '0';
|
34 | when "10" => LED(2) <= '0';
|
35 | when "11" => LED(3) <= '0';
|
36 | when others => LED <= "1111";
|
37 | end case;
|
38 | end if;
|
39 | end process;
|
40 |
|
41 |
|
42 |
|
43 | end Behavioral;
|
Hier die Fehlermeldung:
ERROR:HDLParsers:164 - "C:/Users/.../tutprog5/2to4_decoder.vhd"
Line 33. parse error, unexpected INTEGER_LITERAL, expecting IDENTIFIER