trurl
Junior Member level 2
Hi,
Can anybody tell why the following code can not be synthesized?
Xilinx says signal acc can not be synthesized.
Thanks in advance.
Regards.
Can anybody tell why the following code can not be synthesized?
Xilinx says signal acc can not be synthesized.
Code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
entity mac is
Port( in1 : in signed(11 downto 0);
in2 : in signed(11 downto 0);
clk : in std_logic;
rst : in std_logic;
acc : out signed(23 downto 0));
end mac;
architecture behavioural of mac is
signal prod, reg : signed(23 downto 0);
begin
process(clk,rst,in1,in2)
variable sum : signed(23 downto 0);
begin
prod <= in1 * in2;
if (rst'event and rst = '0') then
reg <= (OTHERS=>'0');
elsif (clk'event and clk='0') then
sum := prod + reg;
reg <= sum;
acc <= reg;
end if;
end process;
end behavioural;
Thanks in advance.
Regards.