Skip to content

Commit

Permalink
Bugfix for arbitrator locking
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdevlin authored and bsdevlin committed Jul 20, 2019
1 parent 9bbc0d9 commit 77afff4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
eclipse.preferences.version=1
encoding//ip_cores/ec/src/rtl/ec_fp12_arithmetic.sv=UTF-8
encoding//ip_cores/ec/src/rtl/ec_fp2_arithmetic.sv=UTF-8
encoding//ip_cores/ec/src/rtl/ec_fp6_arithmetic.sv=UTF-8
18 changes: 11 additions & 7 deletions ip_cores/util/src/rtl/packet_arb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,19 @@ always_ff @ (posedge i_clk) begin
locked <= 0;
idx <= 0;
end else begin
if (~locked) begin
idx <= get_next(idx);
if (val[get_next(idx)] && ~(eop[idx] && rdy[idx])) begin
locked <= 1;
end
end else if (eop[idx] && val[idx] && rdy[idx]) begin
idx <= get_next(idx);

if (~locked) idx <= get_next(idx);

if (val[idx]) begin
locked <= 1;
idx <= idx;
end

if (eop[idx] && val[idx] && rdy[idx]) begin
locked <= 0;
idx <= get_next(idx);
end

end
end

Expand Down

0 comments on commit 77afff4

Please sign in to comment.