Hello!
I'm trying to build the following thing: a 7-segment-led that increases its value every time a switch is pressed.
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity sevsegment is Port ( clk_i: in std_logic; sevseg : out std_logic_vector(6 downto 0); reset : in std_logic; switch: in std_logic); end sevsegment;
architecture Behavioral of sevsegment is signal sevseg_s: std_logic_vector(6 downto 0); begin
process(reset,switch,clk_i) variable counter: integer range 0 to 9; begin if clk_i'event and clk_i='1' then if reset='0' then counter:=0; sevseg_s