Aus QFSM generierten vhdl-code compilieren

#864296
Lesenswert?

Hallo zusammen,

Im Rahmen einer Projektarbeit beschäftige ich mich mit Quartus II. 
Mittlerweile kenn ich des Programm ganz gut, nur VHDL bereitet mir 
großes Kopfzerbrechen.

Ich wäre deshalb für Tipps zur Lösung für folgendes Problem sehr 
dankbar.

Mit dem Programm QFSM ist es möglich aus Zustandsdiagrammen VHDL Code zu 
generieren. Der erzeugte Code eines 3-Bit Modulo6 Zählers lässt sich in 
Quartus aber nicht compilieren. Es werden zwei Fehlermeldungen 
Ausgegeben:
1
Error (10500): VHDL syntax error at 3BM6Vorw.vhdl(25) near text "3";  expecting an identifier
2
Error (10500): VHDL syntax error at 3BM6Vorw.vhdl(32) near text "3";  expecting an identifier

Der Code:
1
LIBRARY IEEE;
2

3
USE IEEE.std_logic_1164.ALL;
4

5
ENTITY 3BM6Vor IS
6
  PORT (clk: IN std_ulogic;
7
        srst_n: IN std_ulogic;
8
        a: IN std_ulogic_vector(0 DOWNTO 0);
9
        q: OUT std_ulogic_vector(2 DOWNTO 0));
10
END 3BM6Vor;
11

12
ARCHITECTURE behave OF 3BM6Vor IS
13

14
TYPE state_type IS (1, 2, 3, 4, 5, 6);
15
SIGNAL next_state, current_state : state_type;
16

17
-- comments for syf which comes with alliance : http://www-asim.lip6.fr/alliance
18
-- interpreted as comments by other tools
19
  --pragma CURRENT_STATE current_state
20
  --pragma NEXT_STATE next_state
21
  --pragma CLOCK clk
22

23
BEGIN
24
  state_register: PROCESS (clk)
25
  BEGIN
26
    IF ( clk = '1' AND NOT clk'STABLE ) THEN
27
      current_state <= next_state;
28
    END IF;
29
  END PROCESS;
30

31
  next_state_and_output_logic: PROCESS (current_state, a)
32
  BEGIN
33
    IF srst_n='0' THEN 
34
        next_state <= 1;
35
    ELSE
36
    CASE current_state IS
37
      WHEN 1 => q <= "001";
38
        IF a="0" THEN
39
          next_state <= 2;
40
        ELSIF a="1" THEN
41
          next_state <= 1;
42
        END IF;
43
      WHEN 2 => q <= "010";
44
        IF a="0" THEN
45
          next_state <= 3;
46
        ELSIF a="1" THEN
47
          next_state <= 2;
48
        END IF;
49
      WHEN 3 => q <= "011";
50
        IF a="0" THEN
51
          next_state <= 4;
52
        ELSIF a="1" THEN
53
          next_state <= 3;
54
        END IF;
55
      WHEN 4 => q <= "100";
56
        IF a="0" THEN
57
          next_state <= 5;
58
        ELSIF a="1" THEN
59
          next_state <= 4;
60
        END IF;
61
      WHEN 5 => q <= "101";
62
        IF a="0" THEN
63
          next_state <= 6;
64
        ELSIF a="1" THEN
65
          next_state <= 5;
66
        END IF;
67
      WHEN 6 => q <= "110";
68
        IF a="0" THEN
69
          next_state <= 1;
70
        ELSIF a="1" THEN
71
          next_state <= 6;
72
        END IF;
73
      WHEN OTHERS => null;
74
    END CASE;
75
    END IF;
76
  END PROCESS;
77

78
END behave;

Kann mich jemand über die Problematik aufklären? In QFSM lässt sich 
alles ohne Probleme simulieren.

Grüsse,
Agrippa

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