---------------------------------------------------------------------------- -- top.vhd -- Constants based on Function -- Version 1.0 -- -- Copyright (C) 2017 H.Poetzl -- -- This program is free software: you can redistribute it and/or -- modify it under the terms of the GNU General Public License -- as published by the Free Software Foundation, either version -- 2 of the License, or (at your option) any later version. -- ---------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.ALL; use work.const_pkg.ALL; entity top is port ( CLK : in std_logic; I : in integer; O : out boolean ); end entity; architecture RTL of top is begin check_proc : process(CLK) begin if rising_edge(CLK) then if I = CONST_C - 1 then O <= True; else O <= False; end if; end if; end process; end RTL;