ghdl / ghdl-yosys-plugin

VHDL synthesis (based on ghdl)
GNU General Public License v3.0
296 stars 32 forks source link

ERROR: Unsupported(1): instance \11 of $smod. #102

Closed rodrigomelo9 closed 4 years ago

rodrigomelo9 commented 4 years ago

I was verifying GHDL --synth and the ghdl-yosys-plugin with examples from Xilinx. I found a problem with a file for ISE, called counters_8.vhd, which fails only with the plugin:

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;

entity counters_8 is
    generic (MAX : integer := 12);
    port(C, CLR : in std_logic;
         Q : out integer range 0 to MAX-1);
end counters_8;

architecture archi of counters_8 is
    signal cnt : integer range 0 to MAX-1;
begin
    process (C, CLR)
    begin
        if (CLR='1') then
            cnt <= 0;
        elsif (rising_edge(C)) then
            cnt <= (cnt + 1) mod MAX ;
        end if;
    end process;

    Q <= cnt;

end archi;
$ docker run --rm -t -v $(pwd):/src -w /src ghdl/synth:beta yosys -m ghdl -Q -p 'ghdl -fsynopsys examples/ise/HDL_Coding_Techniques/counters/counters_8.vhd -e counters_8'

-- Running command `ghdl -fsynopsys examples/ise/HDL_Coding_Techniques/counters/counters_8.vhd -e counters_8' --

1. Executing GHDL.
Importing module counters_8.
ERROR: Unsupported(1): instance \11 of $smod.
tgingold commented 4 years ago

Thank you for the issue.