1
0
This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
SEm-ExamMidterm2024/VHD/hdl/ex_24_1_1_studentVersion.vhd

23 lines
465 B
VHDL
Raw Permalink Normal View History

2024-03-22 12:16:48 +00:00
architecture studentVersion of ex_24_1_1 is
signal counter : unsigned(counterBitNb-1 downto 0);
begin
process(clock, reset) begin
if reset = '1' then
counter <= (others => '0');
elsif rising_edge(clock) then
if en = '1' then
if up_down = '1' then
counter <= counter + 1;
else
counter <= counter -1;
end if;
end if;
end if;
end process;
position <= counter;
end studentVersion;