bob2987
Junior Member level 1
- Joined
- Feb 20, 2014
- Messages
- 18
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 192
Hi All !
I'm a student in VHDL design and I am trying to create an accumulator in VHDL. This is my code :
I have an error "syntax error near process". Can anybody help me ? I think I forgot an "end if" but i'm note sure.
Thank you.
Bob
I'm a student in VHDL design and I am trying to create an accumulator in VHDL. This is my code :
Code VHDL - [expand] 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 Library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; entity AC is Port ( store : in STD_LOGIC; ld_AC : in STD_LOGIC; RAZ : in STD_LOGIC; clk : in STD_LOGIC; D : in STD_LOGIC_VECTOR (15 downto 0); Q : out STD_LOGIC_VECTOR (15 downto 0); Q_mem : out STD_LOGIC_VECTOR (15 downto 0)); end AC; architecture Behavioral of AC is signal temp: STD_LOGIC_VECTOR (15 downto 0); begin process (RAZ,clk) begin if RAZ = '0' then Q <= (Q'range => '0'); elsif (clk='1' and clk'event) then if (ld_AC ='1') then temp <= D; else if (store='1') then Q <= temp; else Q <= "ZZZZZZZZZZZZZZZZ"; end if; end if; end process; end Behavioral;
I have an error "syntax error near process". Can anybody help me ? I think I forgot an "end if" but i'm note sure.
Thank you.
Bob
Last edited by a moderator: