Request a Demo Start a Trial

Signal or variable is never read

Signals and variables that are written but never read are indicative of redundant code, potential logic errors, or inefficiencies in the design. This linting rule detects signals or variables that are never read, as illustrated in the example below.

architecture rtl of example is
    signal unread_signal : std_logic;
begin
    process (clk)
    begin
        if rising_edge(clk) then
            unread_signal <= '1'; -- Written, but never read
        end if;
    end process;
end architecture;
architecture rtl of example is
begin
    process (clk)
        variable unread_variable : integer := 0;
    begin
        if rising_edge(clk) then
            unread_variable := 42; -- Assigned, but never used
        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:

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