mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 21:39:10 -04:00
minor update
This commit is contained in:
parent
5adfd5ec68
commit
4480ed8b0e
2 changed files with 7 additions and 4 deletions
|
@ -41,6 +41,7 @@ module VX_cyclic_arbiter #(
|
|||
localparam IS_POW2 = (1 << LOG_NUM_REQS) == NUM_REQS;
|
||||
|
||||
wire [LOG_NUM_REQS-1:0] grant_index_um;
|
||||
wire [NUM_REQS-1:0] grant_onehot_um;
|
||||
reg [LOG_NUM_REQS-1:0] grant_index_r;
|
||||
|
||||
always @(posedge clk) begin
|
||||
|
@ -59,13 +60,15 @@ module VX_cyclic_arbiter #(
|
|||
.N (NUM_REQS)
|
||||
) priority_encoder (
|
||||
.data_in (requests),
|
||||
`UNUSED_PIN (onehot_out),
|
||||
.onehot_out (grant_onehot_um),
|
||||
.index_out (grant_index_um),
|
||||
.valid_out (grant_valid)
|
||||
);
|
||||
|
||||
assign grant_index = requests[grant_index_r] ? grant_index_r : grant_index_um;
|
||||
assign grant_onehot = NUM_REQS'(grant_valid) << grant_index;
|
||||
wire is_hit = requests[grant_index_r];
|
||||
|
||||
assign grant_index = is_hit ? grant_index_r : grant_index_um;
|
||||
assign grant_onehot = is_hit ? (NUM_REQS'(1) << grant_index) : grant_onehot_um;
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ module VX_local_mem import VX_gpu_pkg::*; #(
|
|||
.NUM_OUTPUTS (NUM_BANKS),
|
||||
.DATAW (REQ_DATAW),
|
||||
.PERF_CTR_BITS (`PERF_CTR_BITS),
|
||||
.ARBITER ("R"),
|
||||
.ARBITER ("C"),
|
||||
.OUT_BUF (3) // output should be registered for the data_store addressing
|
||||
) req_xbar (
|
||||
.clk (clk),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue