Hello! I'm newbie in this topic, so sorry if I say something dumb. I have the following code, which always comeback with a 'vcom-1576 error expecting BEGIN at line 12 in ModelSim. What I'm missing from the code? Thanks for the help in advance!
1 | library IEEE; |
2 | use IEEE.std_logic_1164.all; |
3 | entity MODULE is |
4 | port ( X,Y,BIN : in std_logic_vector(3 downto 0); |
5 | D : out std_logic_vector(3 downto 0); |
6 | BOUT : out std_logic_vector |
7 | );
|
8 | end MODULE; |
9 | |
10 | |
11 | architecture behavioral of MODULE is |
12 | p1: process(X, Y,BIN); |
13 | variable var_D, var_BIN : std_logic_vector(3 downto 0); |
14 | begin
|
15 | var_BIN := BIN; |
16 | for j in 0 to 3 loop |
17 | var_D(j) := X(j) xor Y(j) xor var_BIN; |
18 | var_BOUT(j) := (not X(j) and Y(j)) or (not X(j) and var_BIN(j)) or (Y(j) and var_BIN(j)); |
19 | end loop; |
20 | D<=var_D; |
21 | BOUT<=var_BOUT; |
22 | end process p1; |
23 | end behavioral; |