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

Make sure push_ready[i] not dependent on push_valid[i] in br_flow_arb libraries #172

Open
zhemao-openai opened this issue Nov 18, 2024 · 0 comments

Comments

@zhemao-openai
Copy link
Contributor

The various flow arbiter implementations have the following logic ostensibly to make an individual bit in push_ready not depend on its own push_valid.

  for (genvar i = 0; i < NumFlows; i++) begin : gen_push_ready
    always_comb begin
      push_ready[i] = pop_ready;
      for (int j = 0; j < NumFlows; j++) begin
        if (i != j) begin
          push_ready[i] &= !grant[j];
        end
      end
    end
  end

However, this doesn’t actually accomplish it’s stated goal, since the grant[j] might depend on push_valid[i] even if i != j. Besides this, it creates a lot of additional logic that causes timing issues. The proper way to fix this is to create internal versions of the base arbiter modules that expose a “can_grant” signal for which can_grant[i] is true if no higher priority request is asserted. The request, grant, and can_grant signals should meet the invariant grant == (request & can_grant).

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

No branches or pull requests

1 participant