blob: 85410cc0e4ffa914346c56cebee883600080b641 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity issue3 is
port (foo : in integer;
foobar : out signed (3 downto 0));
end issue3;
architecture beh of issue3 is
subtype n_int is integer range -1 to 1;
begin
with n_int'(foo) select
foobar <= signed'("0001") when -1,
signed'("0010") when 0,
signed'("0011") when 1;
end architecture;
|