URL
https://opencores.org/ocsvn/ion/ion/trunk
Subversion Repositories ion
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 47 to Rev 48
- ↔ Reverse comparison
Rev 47 → Rev 48
/ion/trunk/vhdl/mips_pkg.vhdl
5,13 → 5,14
|
package mips_pkg is |
|
-- FIXME this stuff belongs in the cache module where address decoding is made |
-- (besides, they should be module generics, not package constants) |
subtype t_addr_decode is std_logic_vector(31 downto 24); |
constant ADDR_BOOT : t_addr_decode := X"00"; |
constant ADDR_XRAM : t_addr_decode := X"80"; |
constant ADDR_IO : t_addr_decode := X"20"; |
|
subtype t_addr_decode is std_logic_vector(31 downto 16); |
constant ADDR_BOOT : t_addr_decode := X"0000"; |
constant ADDR_XRAM : t_addr_decode := X"8000"; |
constant ADDR_IO : t_addr_decode := X"2000"; |
|
|
subtype t_addr is std_logic_vector(31 downto 0); |
subtype t_word is std_logic_vector(31 downto 0); |
subtype t_dword is std_logic_vector(63 downto 0); |
58,9 → 59,6
-- CAN BE USED IN SYNTHESIZABLE CODE as long as called with constant arguments |
function log2(A : natural) return natural; |
|
-- Return '1' if address A is within a given memory area |
-- CAN BE USED IN SYNTHESIZABLE CODE as long as called with constant arguments |
function addr_decode(A : std_logic_vector; mask : t_addr_decode) return std_logic; |
|
end package; |
|
76,13 → 74,4
return(30); |
end function log2; |
|
function addr_decode(A : std_logic_vector; mask : t_addr_decode) return std_logic is |
begin |
if A(mask'high downto mask'low) = mask then |
return '1'; |
else |
return '0'; |
end if; |
end function addr_decode; |
|
end package body; |