Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint sensitivity lists #361

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Schottkyc137
Copy link
Contributor

Closes #359

Add a linter for sensitivity lists.

For the most part, the linter is designed to be conservative concerning error codes and only emit warnings when absolutely certain. This means that a couple of potential problems will not be raised.

New error codes

  • missing_in_sensitivity_list (default: warning): warns when there is a signal missing in the sensitivity list of a process that is read in a combinational process.
  • superfluous_in_sensitivity_list (default: warning): warns when there is a signal in the sensitivity list of a process that is not read inside the process

Caveats

The linting only applies to combinational processes. To differentiate whether a process is combinational or sequential, a heuristic is applied.
Every process that contains any numbers of if statements with conditions that describe clocked elements are considered sequential. Clocked elements are either rising_edge(clk) or clk'event. This means that especially mixed processes like

process(clk) is
begin
     if rising_edge(clk) then
         -- sequential logic
    end if;
    a <= b;
end process;

won't be linted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] sensitivity-list: evaluation
1 participant