diff --git a/lib/CPUs/MIPS/src/core/dcache.vhd b/lib/CPUs/MIPS/src/core/dcache.vhd index a135bee..5731416 100644 --- a/lib/CPUs/MIPS/src/core/dcache.vhd +++ b/lib/CPUs/MIPS/src/core/dcache.vhd @@ -1,7 +1,6 @@ LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.NUMERIC_STD.ALL; -use IEEE.MATH_REAL.ALL; library work; use work.mips_types.all; @@ -77,17 +76,6 @@ COMPONENT dpram_2w2r is ); END COMPONENT; - function lg2(x : natural) return natural is - begin - return natural(ceil(log2(real(x)))); - end lg2; - - function po2(x : natural) return natural is - begin - - return 2**lg2(x); - end po2; - constant word_index_width : natural := lg2(line_size); constant cache_index_width : natural := lg2(cache_size) - word_index_width; constant tag_width : natural := 32 - word_index_width - cache_index_width - 2; diff --git a/lib/CPUs/MIPS/src/core/icache.vhd b/lib/CPUs/MIPS/src/core/icache.vhd index 258c687..7511525 100644 --- a/lib/CPUs/MIPS/src/core/icache.vhd +++ b/lib/CPUs/MIPS/src/core/icache.vhd @@ -1,7 +1,6 @@ LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.NUMERIC_STD.ALL; -use IEEE.MATH_REAL.ALL; library work; use work.mips_types.all; @@ -51,17 +50,6 @@ COMPONENT dpram_1w1r ); END COMPONENT; - function lg2(x : natural) return natural is - begin - return natural(ceil(log2(real(x)))); - end lg2; - - function po2(x : natural) return natural is - begin - - return 2**lg2(x); - end po2; - constant word_index_width : natural := lg2(line_size); constant cache_index_width : natural := lg2(cache_size) - word_index_width; constant tag_width : natural := 32 - word_index_width - cache_index_width - 2;