blob: 54d0be3462311c1cd2d5fc379f6d7a43ac46f7b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
library ieee;
use ieee.std_logic_1164.all;
entity ent is
port (
clk: in std_logic;
reset: in std_logic);
end entity;
architecture a of ent is
begin
foo: process(clk, reset)
variable counter: integer range 0 to 15;
begin
if reset = '1' then
counter := counter'high;
elsif rising_edge(clk) then
counter := counter - 1;
end if;
end process;
end;
|