verilog: add sv_maps iterators
[ghdl-vlg.git] / testsuite / synth / issue1442 / fixed_round_crash_incorrect.vhdl
blobf8856b014943ed47e4fbe507a946342c3ec8227a
1 library IEEE;
2 use IEEE.STD_LOGIC_1164.ALL;
3 use IEEE.NUMERIC_STD.ALL;
4 use IEEE.FIXED_PKG.ALL;
6 entity fixed_round_crash_incorrect is
7     Port (
8         input_fixed: in SFIXED(3 downto -2);
9         output_signed: out SIGNED(3 downto 0)
10     );
11 end entity;
13 architecture Behavioral of fixed_round_crash_incorrect is
14     -- real * sfixed(a downto b) -> sfixed(2a+1 downto 2b)
15     signal intermediate: SFIXED(3 downto -2);
16 begin
17     intermediate <= 1.5*input_fixed;
18     output_signed <= to_signed(input_fixed, 4);
19 end Behavioral;