Request a Demo Start a Trial

Signal or variable is never written

Signals and variables that are read but never assigned a value are indicative of bugs, incomplete logic, or inefficiencies in the implementation. This linting rule detects signals or variables that are never written, as illustrated in the example below.

architecture rtl of example is
    signal unwritten_signal : std_logic;
begin
    process(unwritten_signal)
    begin
        if unwritten_signal = '1' then  -- Read but never assigned
            report "Signal is high";
        end if;
    end process;
end architecture;
architecture rtl of example is
begin
    process (clk)
    variable unwritten_variable : integer;'
    begin
        if rising_edge(clk) then
            if unwritten_variable = 10 then  -- Read but never assigned
                report "Variable is 10";
            end if;
        end if;
    end process;
end architecture;

Note that this rule is set to warning warning by default.

Rule Configuration

This rule can be disabled for your project, or its severity and parameters can be modified in the project linting settings. Alternatively, it can be manually configured with the following template:

88/severity/${path}={error|warning|info|ignore}