- Joined
- Sep 10, 2013
- Messages
- 7,944
- Helped
- 1,823
- Reputation
- 3,656
- Reaction score
- 1,808
- Trophy points
- 1,393
- Location
- USA
- Activity points
- 60,209
Given the exact same two files above with the change of the entity name of the 2nd to lat_reg. I got the following consistent results from two different synthesis tools: XST and Vivado synthesis (I believe for both of these, the core synthesis technology was purchased by Xilinx).I must confess, I never noticed this before. In both Quartus versions, I get the below results by including or excluding the data input in the sensitivity list. I don't think that the behaviour corresponds to the VHDL LRM. I'm also not yet aware of a synthesis attribute controlling the automatic latch to dff conversion.
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity lat is port( enable: in std_logic; Output: out std_logic; Input: in std_logic); end; architecture behavioral of lat is begin -- Infers a latch process (enable, input) is begin if enable = '1' then output <= input; end if; end process; end;
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity lat is port( enable: in std_logic; Output: out std_logic; Input: in std_logic); end; architecture behavioral of lat is begin -- Unexpectedly infers a synchronous register process (enable) is begin if enable = '1' then output <= input; end if; end process; end;
Vivado 2014.3.1
lat:
lat_reg:
lat_reg warnings
ISE 14.7
lat:
lat_reg:
lat_reg warnings
Currently I don't have Synplify installed so I can't check its results.
So the question remains, which tool is doing the correct synthesis? ISE and Vivado both think the description is a poorly written latch as it seems to expect that a register has to have an edge controlled event.