Skip to content

Commit d72e933

Browse files
author
sgong
committed
fix csc image read jump control
1 parent 0a826a1 commit d72e933

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

vmod/nvdla/csc/NV_NVDLA_CSC_dl.v

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,13 @@ wire is_dat_req_addr_last_plus1_wrap;
12841284
wire [CBUF_ADDR_WIDTH-1:0] dat_req_addr_last_plus1_wrap;
12851285
wire mon_dat_req_addr_last_plus1_wrap;
12861286
wire [LOG2_ATOMC:0] pixel_w_cnt_plus1;
1287-
//: &eperl::flop("-wid 7 -q stripe_cnt_d1 -d stripe_cnt");
1287+
wire stripe_begin_disable_jump_w;
1288+
//every stripe will start form the head Byte of an entry, no need to jump
1289+
assign stripe_begin_disable_jump_w = sub_h_total_g0[2] ? (stripe_cnt[6:2]==5'b0) : //stripe_cnt = 0/1/2/3
1290+
sub_h_total_g0[1] ? (stripe_cnt[6:1]==6'b0) : //stripe_cnt = 0/1
1291+
stripe_cnt==7'b0; //stripe_cnt = 0
1292+
1293+
//: &eperl::flop("-q stripe_begin_disable_jump -d stripe_begin_disable_jump_w");
12881294

12891295
assign dat_req_addr_last_plus1 = dat_req_addr_last+1'b1;
12901296
assign is_dat_req_addr_last_plus1_wrap = (dat_req_addr_last_plus1 >= {data_bank, {LOG2_CBUF_BANK_DEPTH{1'b0}}});
@@ -1294,7 +1300,7 @@ assign dat_req_addr_last_plus1_real = is_dat_req_addr_last_plus1_wrap ? dat_req
12941300
//then csc need read 2 entries simultaneously, then shift out unneeded part.
12951301
//this address jump should not happened because of execution of next stripe
12961302
assign sc2buf_dat_rd_next1_enable = is_img_d1[10]&&sc2buf_dat_rd_en_w&&(dat_req_addr_w != dat_req_addr_last_plus1_real)
1297-
&&(pixel_w_cnt_plus1[LOG2_ATOMC:0]!=CSC_ATOMC)&&(|stripe_cnt_d1);
1303+
&&(pixel_w_cnt_plus1[LOG2_ATOMC:0]!=CSC_ATOMC)&&(~stripe_begin_disable_jump);
12981304
assign sc2buf_dat_rd_next1_disable_w = !sc2buf_dat_rd_next1_enable;
12991305
assign pixel_w_cnt_plus1 = pixel_w_cnt[LOG2_ATOMC-1:0]+1'b1; //element need shift
13001306
assign sc2buf_dat_rd_shift_w = sc2buf_dat_rd_next1_enable ? {pixel_w_cnt_plus1[LOG2_ATOMC-1:0], {NVDLA_BPE_LOG2{1'b0}}} : {CBUF_RD_DATA_SHIFT_WIDTH{1'd0}};

0 commit comments

Comments
 (0)