iport_weight) oport_weight[i]<=iport_weight;// weight counter should always be smaller than iport weight
else if (weight_dcrease_en)begin
if( counter_is_reset ) begin
oport_weight[i]<= (oport_weight_counter[i]>0)? oport_weight_counter[i]: 1;
end//counter_reset
else begin
if (oport_weight_counter[i]>0 && oport_weight[i] < oport_weight_counter[i]) oport_weight[i]<= oport_weight_counter[i];
end
end//weight_dcr
end//else reset
end //always
assign oports_weight [(i+1)*W-1 : i*W] = oport_weight[i];
end //else
end //for
end
/* verilator lint_off WIDTH */
if(ARBITER_TYPE == "WRRA_CLASSIC") begin : wrra_classic
/* verilator lint_on WIDTH */
// use classic WRRA. only for compasrion with propsoed wrra
classic_weight_counter #(
.WEIGHTw(WEIGHTw)
)
iport_weight_counter
(
.load_i(refresh_w_counter),
.weight_i(iport_weight),
.reset(reset),
.clk(clk),
.decr(weight_dcrease_en),
.out(counter_is_reset)
);
end else begin : wrra_mine
// weight counters
weight_counter #(
.WEIGHTw(WEIGHTw)
)
iport_weight_counter
(
.load_i(refresh_w_counter),
.weight_i(iport_weight),
.reset(reset),
.clk(clk),
.decr(weight_dcrease_en),
.out(counter_is_reset)
);
end
endgenerate
assign weight_is_consumed_o = counter_is_reset; // & flit_is_tail ;
endmodule
/***************
* wrra_contention_gen
* generate contention based on number of request to
* the same output port
***************/
module wrra_contention_gen #(
parameter V=4,
parameter P=5,
parameter WRRA_CONFIG_INDEX=0,
parameter WEIGHTw = 4, // WRRA width
parameter SELF_LOOP_EN ="NO"
)(
ovc_is_assigned_all,
ivc_request_all,
dest_port_all,
iport_weight_all,
oports_weight_all,
contention_all,
limited_oport_weight_all
);
function integer log2;
input integer number; begin
log2=(number <=1) ? 1: 0;
while(2**log2 Error running this command: diff: : No such file or directorydiff -w -U 5 "" "/tmp/Qd4w9f"