2 use ieee.std_logic_1164.
all;
3 use ieee.numeric_std.
all;
9 a
: in std_logic_vector(3 downto 0);
10 accum
: out std_logic_vector(3 downto 0)
14 architecture rtl
of accumulator
is
16 signal accumL
: unsigned
(3 downto 0);
20 accumulate
: process (clk
, rst
) begin
23 elsif (clk
'event and clk
= '1') then
24 accumL
<= accumL
+ to_unsigned
(a
);
28 accum
<= std_logic_vector(accumL
);