Skip to content
Snippets Groups Projects
Commit 2ed3886f authored by NIORE Corentin's avatar NIORE Corentin
Browse files

Update file operativeUnit.vhd

parent 1776a639
Branches
No related tags found
No related merge requests found
......@@ -130,7 +130,7 @@ begin
-- Process to describe the counter providing the selection adresses
-- of the multiplexers
incr_address : process (I_clock, I_reset) isster(SR_readAddress);
incr_address : process (I_clock, I_reset) is
begin
if I_reset = '1' then -- asynchronous reset (active high)
......@@ -169,6 +169,9 @@ begin
elsif rising_edge(I_clock) then
if I_loadSum = '1' then
SR_sum <= SC_addResult;
elsif I_initSum = '1' then
SR_sum <= (others => '0');
end if;
end if;
end process sum_acc;
......@@ -177,12 +180,14 @@ begin
store_result : process (I_clock, I_reset) is
begin
if I_reset = '1' then
SR_filteredSample <= (other => '0');
SR_filteredSample <= (others => '0');
elsif rising_edge(I_clock) then
if I_loadOutput = '1';
for i in 20 downto 5 loop
SR_filteredSample(i-4) <= SR_sum(i)
end loop;
if I_loadOutput = '1' then
if(SC_addResult(14)='0') then
SR_filteredSample <= SC_addResult(30 downto 15);
else
SR_filteredSample <= SC_addResult(30 downto 15)+1;
end if;
end if;
end if;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment