Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rtl/arbiter.v
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ always @* begin
grant_encoded_next = 0;
mask_next = mask_reg;

if (BLOCK == "REQUEST" && grant_reg & request) begin
if (BLOCK == "REQUEST" && |(grant_reg & request)) begin
// granted request still asserted; hold it
grant_valid_next = grant_valid_reg;
grant_next = grant_reg;
grant_encoded_next = grant_encoded_reg;
end else if (BLOCK == "ACKNOWLEDGE" && grant_valid && !(grant_reg & acknowledge)) begin
end else if (BLOCK == "ACKNOWLEDGE" && grant_valid && !(|(grant_reg & acknowledge))) begin
// granted request not yet acknowledged; hold it
grant_valid_next = grant_valid_reg;
grant_next = grant_reg;
Expand Down
2 changes: 2 additions & 0 deletions rtl/priority_encoder.v
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ generate
priority_encoder_inst1 (
.input_unencoded(input_unencoded[W2-1:0]),
.output_valid(valid1),
.output_unencoded(),
.output_encoded(out1)
);
priority_encoder #(
Expand All @@ -80,6 +81,7 @@ generate
priority_encoder_inst2 (
.input_unencoded({{W1-WIDTH{1'b0}}, input_unencoded[WIDTH-1:W2]}),
.output_valid(valid2),
.output_unencoded(),
.output_encoded(out2)
);
// multiplexer to select part
Expand Down