repo.or.cz
/
ghdl-vlg.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
verilog: add sv_maps iterators
[ghdl-vlg.git]
/
testsuite
/
synth
/
cnt01
/
cnt02.vhdl
blob
0a2d35ede675518db4204a480957eb90226223db
1
library IEEE;
2
use IEEE.STD_LOGIC_1164.ALL;
3
use IEEE.NUMERIC_STD.ALL;
4
5
entity cnt02 is
6
port (
7
clk : in STD_LOGIC;
8
rst : in STD_LOGIC;
9
10
low : out std_logic
11
);
12
end cnt02;
13
14
architecture behav of cnt02 is
15
signal counter : integer range 0 to 63;
16
begin
17
process(clk)
18
begin
19
if rising_edge(clk) then
20
if rst = '1' then
21
counter <= 63;
22
else
23
counter <= counter - 1;
24
end if;
25
end if;
26
end process;
27
28
low <= '1' when counter < 60 else '0';
29
end behav;