From 605010e33d2153f0f499ed508f66933945ae53f4 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Mon, 7 Dec 2020 07:17:38 +1100 Subject: [PATCH] Fix ghdl warning due to variable shadowing in icache Fix a couple of ghdl warnings: icache.vhdl:387:21:warning: declaration of "i" hides constant "i" [-Whide] icache.vhdl:400:17:warning: declaration of "i" hides constant "i" [-Whide] Signed-off-by: Anton Blanchard --- icache.vhdl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/icache.vhdl b/icache.vhdl index d24a146..a0c0612 100644 --- a/icache.vhdl +++ b/icache.vhdl @@ -384,9 +384,9 @@ begin if r.store_tag(TAG_BITS - 1) = '0' then wr_dat <= wishbone_in.dat; else - for i in 0 to (wishbone_in.dat'length / 8) - 1 loop - j := ((i / 4) * 4) + (3 - (i mod 4)); - wr_dat(i * 8 + 7 downto i * 8) <= wishbone_in.dat(j * 8 + 7 downto j * 8); + for ii in 0 to (wishbone_in.dat'length / 8) - 1 loop + j := ((ii / 4) * 4) + (3 - (ii mod 4)); + wr_dat(ii * 8 + 7 downto ii * 8) <= wishbone_in.dat(j * 8 + 7 downto j * 8); end loop; end if; do_read <= not (stall_in or use_previous); @@ -397,8 +397,8 @@ begin cache_out(i) <= dout; rd_addr <= std_ulogic_vector(to_unsigned(req_row, ROW_BITS)); wr_addr <= std_ulogic_vector(to_unsigned(r.store_row, ROW_BITS)); - for i in 0 to ROW_SIZE-1 loop - wr_sel(i) <= do_write; + for ii in 0 to ROW_SIZE-1 loop + wr_sel(ii) <= do_write; end loop; end process; end generate; -- 2.30.2