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
/
ret01
/
ret01.vhdl
blob
64e7319f1d4d7077fbaef7495cd9c1e765f3e42d
1
library ieee;
2
use ieee.std_logic_1164.all;
3
4
entity ret01 is
5
port (di : std_logic_vector (7 downto 0);
6
res : out integer);
7
end ret01;
8
9
architecture behav of ret01 is
10
function sign (v : std_logic_vector (7 downto 0)) return integer is
11
begin
12
if v (7) = '1' then
13
return -1;
14
else
15
return 1;
16
end if;
17
end sign;
18
begin
19
res <= sign (di);
20
end behav;