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
/
issue944
/
ent.vhdl
blob
88dd4f5313adaed02bddc34b772ca2db8ea5ad4e
1
library ieee;
2
use ieee.std_logic_1164.all;
3
4
entity ent is
5
end;
6
7
architecture a of ent is
8
function count_ones(vec : std_logic_vector) return natural is
9
variable temp : natural := 0;
10
begin
11
for i in vec'range loop
12
if vec(i) then
13
temp := temp + 1;
14
end if;
15
end loop;
16
17
return temp;
18
end count_ones;
19
20
constant test : natural := count_ones("10101");
21
begin
22
end;