You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I'm trying to use two-process design method (https://www.gaisler.com/doc/vhdl2proc.pdf) with ghdl but I'm getting incorrect synthesis results if I use case statements in combinational process. Simple design that should result in a single DFF is contains latches when synthesized by yosys and reportedly Vivado (YosysHQ/yosys#3141 (comment)).
Expected behaviour
In the following example both architectures should result in a single DFF being synthesized.
How to reproduce?
library IEEE;
use IEEE.std_logic_1164.all;
entitydffisport (clk : instd_logic; d, load : instd_logic; q : outstd_logic);
endentitydff;
architecturewith_caseofdffissignal r, rin : std_logic;
begincomb : process (r, d, load) isvariable v : std_logic;
begin
v := r;
case load iswhen'1'=> v := d;
whenothers=>null;
endcase;
rin <= v;
q <= r;
endprocesscomb;
regs : process (clk) isbeginifrising_edge(clk) then
r <= rin;
endif;
endprocessregs;
endarchitecturewith_case;
architecturewith_ifofdffissignal r, rin : std_logic;
begincomb : process (r, d, load) isvariable v : std_logic;
begin
v := r;
if load ='1'then
v := d;
endif;
rin <= v;
q <= r;
endprocesscomb;
regs : process (clk) isbeginifrising_edge(clk) then
r <= rin;
endif;
endprocessregs;
endarchitecturewith_if;
@eugmes: In both of your architectures, the process comb is lacking the signal r in the sensitivity list. This may explain the unexpected synthesis results. The rule for combinatoric processes is to always list all read input signals/ports by the process. Alternatively, you may use the keyword all in the sensitivity list starting with VHDL-2008.
Such sensitivity lists are usually ignored by synthesis tools. Their incompleteness is more a problem during simulation, as the behavior of simulation could differ from the intended (and synthesized) behavior.
Description
I'm trying to use two-process design method (https://www.gaisler.com/doc/vhdl2proc.pdf) with ghdl but I'm getting incorrect synthesis results if I use case statements in combinational process. Simple design that should result in a single DFF is contains latches when synthesized by yosys and reportedly Vivado (YosysHQ/yosys#3141 (comment)).
Expected behaviour
In the following example both architectures should result in a single DFF being synthesized.
How to reproduce?
Context
2.0.0-dev (1.0.0.r950.g8d512a44) [Dunoon edition]
Additional context
with_if
architecture results in an expected one DFF:Incorrect synthesis result for
with_case
architecture:The text was updated successfully, but these errors were encountered: