Hallo,
ik heb 2 files:
-- dflipflop.vhd --
-- configflip.vhd
ModelSIM wordt gebruikt als compiler.
deze meldingen worden gegenereerd:
# ** Error: H:/computerorganisatie/work/configflip.vhd(24): Illegal sequential statement.
# ** Error: H:/computerorganisatie/work/configflip.vhd(30): Illegal sequential statement.
# ** Error: H:/computerorganisatie/work/configflip.vhd(35): Illegal sequential statement.
# ** Error: H:/computerorganisatie/work/configflip.vhd(44): Cannot assign to signal 'd_in'.
# ** Error: H:/computerorganisatie/work/configflip.vhd(45): Illegal sequential statement.
# ** Error: H:/computerorganisatie/work/configflip.vhd(52): VHDL Compiler exiting
iemand een idee?
alvast bedankt
ik heb 2 files:
-- dflipflop.vhd --
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;
ENTITY dflipflop IS
PORT(RESET: IN std_logic;
D: IN std_logic;
CLK: IN std_logic;
Q:OUT std_logic);
END dflipflop;
ARCHITECTURE dfliparch OF dflipflop IS
BEGIN
process(RESET,CLK)
begin
if RESET= '1' then
Q <= '0';
elsif rising_edge(CLK) then
Q <= D;
end if;
end process;
END dfliparch; |
-- configflip.vhd
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
| LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;
ENTITY configflip IS
PORT(R:IN std_logic;
S:IN std_logic_vector(1 downto 0);
D:IN std_logic_vector(1 downto 0);
CLK: IN std_logic;
Q:OUT std_logic);
END configflip;
ARCHITECTURE fliparch OF configflip IS
signal d_out,d_in,qx,qi: std_logic;
BEGIN
process (S)
BEGIN
case S is
-- d-flipflop
when "00" =>
n1: ENTITY work.dflipflop(dfliparch) PORT MAP(R,D(0),CLK,qx);
Q <= qx;
-- t-flipflop
when "01" =>
qi <= D(0) XOR d_out AFTER 5 ns;
n2 : ENTITY work.dflipflop(dfliparch) PORT MAP(R,d_in,d_out);
Q <= d_out;
-- de-flipflop
when "10" =>
n3: ENTITY work.dflipflop(dfliparch) PORT MAP(R,D(0),qx);
if D(1) = '1' then
Q <= qx;
else
Q <= '0';
end if;
-- jk-flipflop
when "11" =>
d_in := (NOT(D(0)) AND d_out) OR (D(1) AND (NOT(d_out)));
n4: ENTITY work.dflipflop(dfliparch) PORT MAP(R,d_in,d_out);
Q <= d_out;
when others =>
Q <= '0';
end case;
END process;
END fliparch; |
ModelSIM wordt gebruikt als compiler.
deze meldingen worden gegenereerd:
# ** Error: H:/computerorganisatie/work/configflip.vhd(24): Illegal sequential statement.
# ** Error: H:/computerorganisatie/work/configflip.vhd(30): Illegal sequential statement.
# ** Error: H:/computerorganisatie/work/configflip.vhd(35): Illegal sequential statement.
# ** Error: H:/computerorganisatie/work/configflip.vhd(44): Cannot assign to signal 'd_in'.
# ** Error: H:/computerorganisatie/work/configflip.vhd(45): Illegal sequential statement.
# ** Error: H:/computerorganisatie/work/configflip.vhd(52): VHDL Compiler exiting
iemand een idee?
alvast bedankt