From 068727434d4d8678ad66d312e50b4d5952ea64f8 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 26 Jan 2023 16:53:34 +0000 Subject: [PATCH] HMBSED3000-192. Revert pixel buffer to generic IP component. Fixed library pixel buf to work with D3000 and still works with SI1536 --- generic_ip/pixel_buffer/2/src/pixel_buffer_2.vhd | 9 +++++++-- .../pixel_buffer/2/src/pixel_buffer_zero_gap_2.vhd | 10 +++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/generic_ip/pixel_buffer/2/src/pixel_buffer_2.vhd b/generic_ip/pixel_buffer/2/src/pixel_buffer_2.vhd index 871a95b..46201f8 100644 --- a/generic_ip/pixel_buffer/2/src/pixel_buffer_2.vhd +++ b/generic_ip/pixel_buffer/2/src/pixel_buffer_2.vhd @@ -308,8 +308,13 @@ begin wr_ptr_start_plusgap <= std_logic_vector(unsigned(wr_ptr_start) + 16); -- Word count wrap BPP3 (packed to 4) => 15 for depth of 128) - word_wrap <= std_logic_vector(to_unsigned((4*SHIFT_DEPTH/32)-1,PX_DEPTH_LOG2+1)) when not ADD_PADDING or ((pixel_buf_wr_shft(0) or pixel_buf_wr_shft(2) or pixel_buf_wr_shft(4) or pixel_buf_wr_shft(6)) = '1') else - std_logic_vector(to_unsigned((2*SHIFT_DEPTH/32)-1,PX_DEPTH_LOG2+1)); + GEN_PAD : if ADD_PADDING generate + word_wrap <= std_logic_vector(to_unsigned((4*SHIFT_DEPTH/32)-1,PX_DEPTH_LOG2+1)) when ((pixel_buf_wr_shft(0) or pixel_buf_wr_shft(2) or pixel_buf_wr_shft(4) or pixel_buf_wr_shft(6)) = '1') else + std_logic_vector(to_unsigned((2*SHIFT_DEPTH/32)-1,PX_DEPTH_LOG2+1)); + else generate + word_wrap <= std_logic_vector(to_unsigned((4*SHIFT_DEPTH/32)-1,PX_DEPTH_LOG2+1)); + end generate; + -- The pixel buffer droppy deletion count is a function of the number of words -- in the shift: e.g. 64 bits = 8, 96 bits = 12, 128 bits = 16 etc. diff --git a/generic_ip/pixel_buffer/2/src/pixel_buffer_zero_gap_2.vhd b/generic_ip/pixel_buffer/2/src/pixel_buffer_zero_gap_2.vhd index c314feb..bf2e7e5 100644 --- a/generic_ip/pixel_buffer/2/src/pixel_buffer_zero_gap_2.vhd +++ b/generic_ip/pixel_buffer/2/src/pixel_buffer_zero_gap_2.vhd @@ -160,6 +160,7 @@ architecture rtl of pixel_buffer_zero_gap_2 is signal buf_active_late : buf_vec_t(SUB_HEADS-1 downto 0)(NUM_CHANS-1 downto 0); signal buf_active_late_int : buf_vec_t(SUB_HEADS-1 downto 0)(NUM_CHANS-1 downto 0); signal master_buf : std_logic_vector(NUM_CHANS-1 downto 0); + signal pb_data_enable : buf_vec_t(MAX_OP_WIDTH-1 downto 0)(NUM_CHANS-1 downto 0); signal clr_buf_active : buf_vec_t(SUB_HEADS-1 downto 0)(NUM_CHANS-1 downto 0); signal clr_buf_active_rdreq : std_logic_vector(NUM_CHANS-1 downto 0); @@ -264,9 +265,16 @@ begin start_req_int(i) <= buf_active_int(0)(i) and seq_1st_start_req; GEN_Q : for j in 0 to MAX_OP_WIDTH-1 generate - q(i)(j*32+31 downto j*32) <= rd_data(i)(j*32+31 downto j*32) when buf_active_late_int(j/2)(i) else (others => '0'); + q(i)(j*32+31 downto j*32) <= rd_data(i)(j*32+31 downto j*32) when pb_data_enable(j)(i) else (others => '0'); + + GEN_EN : if SUB_HEADS >= 4 and (MAX_OP_WIDTH/2) = SUB_HEADS generate + pb_data_enable(j)(i) <= buf_active_late_int(j/2)(i); -- 1536 must zero sub head data so merge works correctly + else generate + pb_data_enable(j)(i) <= buf_active_late_int(0)(i); -- Any Heads without Sub Heads - disable whole pixel buffer output + end generate; end generate; + clr_buf_active_rdreq(i) <= (last_stripe(i)(MAX_OP_WIDTH-1) and is_last_wave(i) and rd_req_int(i)) or last_stripe_dropped(i); -- if the last stripe of the image is dropped, the above case never happens