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
/
iassoc01
/
iassoc03.vhdl
blob
f2284b86bfaaa808a65e2403cd85f73c12229eef
1
use work.pkg.all;
2
3
entity riassoc03 is
4
port (v : nat_arr (1 to 2);
5
res : out natural);
6
end riassoc03;
7
8
architecture behav of riassoc03 is
9
begin
10
process (v)
11
variable t : natural;
12
begin
13
t := 0;
14
for i in v'range loop
15
t := t + v (i);
16
end loop;
17
res <= t;
18
end process;
19
end behav;
20
21
entity iassoc03 is
22
port (a, b : natural;
23
res : out natural);
24
end iassoc03;
25
26
architecture behav of iassoc03 is
27
begin
28
inst : entity work.riassoc03
29
port map (v (1) => a, v (2) => b, res => res);
30
end behav;