diff --git a/generic_ip/preslicer/0/src/preslicer_0.vhd b/generic_ip/preslicer/0/src/preslicer_0.vhd index 93799d7..8d48fb7 100644 --- a/generic_ip/preslicer/0/src/preslicer_0.vhd +++ b/generic_ip/preslicer/0/src/preslicer_0.vhd @@ -97,12 +97,11 @@ architecture rtl of preslicer_0 is signal almost_full : std_logic; signal q : std_logic_vector(32 downto 0); - constant DWORD_BITS : integer := 32; - constant STRIPE_SIZE_POW2 : integer := 2**log2((SHIFT_DEPTH * MAX_OP_WIDTH) / DWORD_BITS); - + constant DWORD_BITS : integer := 32; + constant STRIPE_SIZE : integer := ((SHIFT_DEPTH * MAX_OP_WIDTH) / DWORD_BITS); - constant DEPTH : natural range 1 to 8182 := STRIPE_SIZE_POW2 * NUM_STRIPES_DEPTH; -- in 32bit words (+ 1 bit flag) - constant ALMOST_FULL_THRESH : natural range 1 to 1024 := STRIPE_SIZE_POW2 * (NUM_STRIPES_DEPTH - NUM_STRIPES_FULL_MARGIN); + constant DEPTH : natural range 1 to 8182 := STRIPE_SIZE * NUM_STRIPES_DEPTH; -- in 32bit words (+ 1 bit flag) + constant ALMOST_FULL_THRESH : natural range 1 to 1024 := STRIPE_SIZE * (NUM_STRIPES_DEPTH - NUM_STRIPES_FULL_MARGIN); signal usedw : std_logic_vector(log2(DEPTH) - 1 downto 0); signal bpp1_slice : exp_data_t; @@ -138,14 +137,14 @@ begin bpp3_slice(2) <= shift_reg(2); bpp3_slice(1) <= shift_reg(1); bpp3_slice(0) <= shift_reg(0); - + -- @formatter:off -- Pull out the bits from the shift register for the 2BPP mode bpp2_slice(3) <= shift_reg(1)(32) & "00" & shift_reg(1)(31 downto 30) & "00" & shift_reg(1)(29 downto 28) & "00" & shift_reg(1)(27 downto 26) & "00" & shift_reg(1)(25 downto 24) & "00" & shift_reg(1)(23 downto 22) & "00" & shift_reg(1)(21 downto 20) & "00" & shift_reg(1)(19 downto 18) & "00" & shift_reg(1)(17 downto 16); - + bpp2_slice(2) <= "000" & shift_reg(1)(15 downto 14) & "00" & shift_reg(1)(13 downto 12) & "00" & shift_reg(1)(11 downto 10) & "00" & shift_reg(1)( 9 downto 8) & "00" & shift_reg(1)( 7 downto 6) & "00" & shift_reg(1)( 5 downto 4) & @@ -184,7 +183,7 @@ begin read_phase <= '1' when (bpp_mode = 2x"1" and word_num (0) = 2x"2") or (bpp_mode = 2x"2" and word_num(0)(1) = '0') or bpp_mode = 2x"3" or bpp_mode = 2x"0" else '0'; - + -- @formatter:on -- Flag when the word_num index is 0- word_num_is_zero <= '1' when word_num(0) = 2x"0" else '0';