ghdl / ghdl

VHDL 2008/93/87 simulator
GNU General Public License v2.0
2.37k stars 362 forks source link

synthesis: unhandled (static) function: IIR_PREDEFINED_IEEE_1164_SCALAR_IS_X #1668

Open dl3yc opened 3 years ago

dl3yc commented 3 years ago

Description I get the following error when trying to synthesize using ghdl:

../../src/ieee2008/fixed_generic_pkg-body.vhdl:3268:12:error: unhandled (static) function: IIR_PREDEFINED_IEEE_1164_SCALAR_IS_X

The code generates no errors during simulation.

Expected behaviour I expect the code to synthesize without errors.

How to reproduce? This demonstrates the problem:

library ieee;
use ieee.std_logic_1164.all;
use ieee.fixed_pkg.all;

entity test is
end entity test;

architecture synthesis of test is
  signal a : sfixed(0 downto 0);
  signal b : std_logic;
begin

a <= (others => '0');

--b <= '1' when a >= to_sfixed(0, a); -- works
b <= '1' when a >= to_sfixed(0, 0, 0); -- fails

end architecture synthesis;
ghdl -a --std=08 test.vhd
ghdl --synth --std=08 test

Context Please, provide the following information:

treforsouthwell commented 3 years ago

I'm seeing similar issues with other IEEE logic e.g:

IIR_PREDEFINED_IEEE_STD_LOGIC_MISC_AND_REDUCE_SUV

Is this an unimplemented feature?

tgingold commented 3 years ago

Yes, please create an issue with a testcase. In general that's rather quick to implement.