Skip to content

ERROR: wire not found for $posedge #146

@stevenbell

Description

@stevenbell

I've got a relatively simple code example with abnormal style which doesn't synthesize:

library IEEE;
use IEEE.std_logic_1164.all;

entity lfsr2 is
  port(
    clk : in std_logic;
    reset : in std_logic;
    b : out std_logic
  );
end lfsr2;



architecture synth of lfsr2 is


signal a : std_logic;
signal c : std_logic;

begin

  
process (clk) begin

    if reset = '1' then
        if rising_edge(clk) then
            b <= '1';
            c <= '1';
        end if;
    else
        if rising_edge(clk) then
            c <= a;
            b <= c;
        end if;
    end if;
    
end process;

a <= b xor c;

end;

Running yosys -m ghdl -p "ghdl --std=08 lfsr2; write_json netlist.json" gives:

 Yosys 0.9+3911 (git sha1 dcd9f0af, clang 7.0.1-8+deb10u2 -fPIC -Os)


-- Running command `ghdl --std=08 lfsr2; write_json netlist.json' --

1. Executing GHDL.
Importing module lfsr2.
ERROR: wire not found for $posedge

Currently using docker image (hdlc/ghdl - yosys - 189a1f80cd33).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions