[an error occurred while processing this directive]
|
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;entity maximum is
Port
(
value : in integer range 0 to 65535;
max_value : out integer range 0 to 65535;clk : in std_logic;
reset : in std_logic
);
end maximum;architecture Behavioral of maximum is
signal max_val : integer range 0 to 65535;
begin
find_max: process
begin
wait until clk'event and clk='1';if reset='1'
then
max_val <= 0;
max_value <= 0;
else
max_value <= max_val;
if value > max_val then max_val <= value;
end if;
end if;end process;
end Behavioral;
E-mail: info@telesys.ru