The below code gives me an error hat i cant read from out object Q Im sure newer version of VHDL supports it, how do i enable in Vivado does anyone know? Before i used GHDL compiler with a flag option --use ieee=08  Or something similar to this

library IEEE;
use IEEE.Std_logic_1164.all;

--Non-gated SR latch, general configuration 2NORS
--Only works when using the new VHDL version

--Declare SR_Latch entity
entity SRLatch is
port(
clk: in std_logic;
set : in std_logic:='0';
reset : in std_logic:= '0';
Q : out std_logic:='0';
Q_n : out std_logic:='1'
);
end SRLatch;

architecture behavioural of SRLatch is

begin
process(clk) begin
Q <= reset NOR Q_n;
Q_n <= set NOR Q;
end process;
end behavioural;

$$$$

• You don't need the latest VHDL version, VHDL-2008 will do. Try enabling VHDL-2008 support : Vivado may or may not support this 2008 feature (in 2020). In ghdl the option is --std=08 – Brian Drummond Aug 13 '20 at 13:52
• The -2008 dependency is evaluating an output, which isn't supported in previous versions, requiring the use of mode buffer. Another issue may be the process is not synthesis eligible. clk isn't read in the process, while set , reset, Q and Q_n` which are read and are not in the sensitivity list. See IEEE Std 1076.6-2004 RTL Synthesis (withdrawn) 6. Modeling hardware elements, 6.2 Level-sensitive sequential logic, 6.2.1.1 Level-sensitive storage from process with sensitivity list "The process sensitivity list shall contain all signals read within the process statement." – user8352 Aug 13 '20 at 20:53
• Note that I applied those changes to a bunch of my libraries and used VHDL-2008 and as far as I can tell, they continue to synthesize and operate properly however the simulation results are bonkers. I suspect VHDL-2008 might not be properly supported in simulation. Let me know if you see any different. – DKNguyen Aug 18 '20 at 4:40
• Oh, I just found in VHDL 2008 for boolean conditions you can just have the signal name and boolean operators now. No need for an equal sign. So now you can go if (A or B). You don't need to go if (A='1') or (B='1') anymore. – DKNguyen Aug 29 '20 at 1:49

It never worked as far as I know. Not just in Vivado. Q is an output. You cannot read an output as you attempted with NOR. You can only write to it.

You could use inout, but this is dangerous. But best practice is to manipulate an internal signal and write that to Q.

But I believe you can set VHDL-2008 somewhere in the menu settings. Don't know about a syntactical way to do it though.

EDIT: It seems to be hiding in plain sight. It is set per source file in the "Source File Properties" window which is probably already open and just sitting in your regular layout in Vivado.

Also from the Vivado manual starting page 203: