OpenCores
URL https://opencores.org/ocsvn/ion/ion/trunk

Subversion Repositories ion

[/] [ion/] [trunk/] [vhdl/] [mips_pkg.vhdl] - Diff between revs 72 and 75

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 72 Rev 75
Line 48... Line 48...
subtype t_memory_type is std_logic_vector(7 downto 5);
subtype t_memory_type is std_logic_vector(7 downto 5);
-- These are all the types the cache knows about
-- These are all the types the cache knows about
constant MT_BRAM : t_memory_type            := "000";
constant MT_BRAM : t_memory_type            := "000";
constant MT_IO_SYNC : t_memory_type         := "001";
constant MT_IO_SYNC : t_memory_type         := "001";
constant MT_SRAM_16B : t_memory_type        := "010";
constant MT_SRAM_16B : t_memory_type        := "010";
constant MT_FLASH_16B : t_memory_type       := "011";
constant MT_SRAM_8B : t_memory_type         := "011";
constant MT_DDR_16B : t_memory_type         := "100";
constant MT_DDR_16B : t_memory_type         := "100";
constant MT_UNMAPPED : t_memory_type        := "111";
constant MT_UNMAPPED : t_memory_type        := "111";
 
 
-- Wait state counter -- we're supporting static memory from 10 to >100 ns
-- Wait state counter -- we're supporting static memory from 10 to >100 ns
subtype t_wait_state_count is std_logic_vector(2 downto 0);
subtype t_wait_state_count is std_logic_vector(2 downto 0);
Line 142... Line 142...
    when others     => return (MT_UNMAPPED ,'0','0',"000"); -- stray
    when others     => return (MT_UNMAPPED ,'0','0',"000"); -- stray
    end case;
    end case;
 
 
end function decode_addr_plasma;
end function decode_addr_plasma;
 
 
-- Address decoding for MIPS-I-like system
-- Address decoding for MIPS-I-like system as implemented in target hardware
function decode_addr_mips1(addr : t_addr_decode) return t_range_attr is
function decode_addr_mips1(addr : t_addr_decode) return t_range_attr is
begin
begin
 
 
    case addr(31 downto 27) is
    case addr(31 downto 27) is
    when "00000"    => return (MT_SRAM_16B ,'1','1',"011"); -- useg
    when "00000"    => return (MT_SRAM_16B ,'1','1',"000"); -- useg
    when "10000"    => return (MT_SRAM_16B ,'1','1',"000"); -- kseg0
    when "10000"    => return (MT_SRAM_16B ,'1','1',"000"); -- kseg0
    --when "10100"    => return (MT_IO_SYNC  ,'1','0',"000"); -- kseg1 i/o
    --when "10100"    => return (MT_IO_SYNC  ,'1','0',"000"); -- kseg1 i/o
    when "00100"    => return (MT_IO_SYNC  ,'1','0',"000"); -- kseg1 i/o
    when "00100"    => return (MT_IO_SYNC  ,'1','0',"000"); -- kseg1 i/o
    when "10110"    => return (MT_FLASH_16B,'0','0',"011"); -- kseg1 flash
    when "10110"    => return (MT_SRAM_8B  ,'0','0',"011"); -- kseg1 flash
    when "10111"    => return (MT_BRAM     ,'0','0',"000"); -- kseg1 boot rom
    when "10111"    => return (MT_BRAM     ,'0','0',"000"); -- kseg1 boot rom
    when others     => return (MT_UNMAPPED ,'0','0',"000"); -- stray
    when others     => return (MT_UNMAPPED ,'0','0',"000"); -- stray
    end case;
    end case;
 
 
end function decode_addr_mips1;
end function decode_addr_mips1;

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.