Initial commit
This commit is contained in:
19
Libs/AhbLite/hdl/ahbDecoder_RTL.vhd
Normal file
19
Libs/AhbLite/hdl/ahbDecoder_RTL.vhd
Normal file
@@ -0,0 +1,19 @@
|
||||
LIBRARY AhbLite;
|
||||
USE AhbLite.ahbLite.all;
|
||||
|
||||
ARCHITECTURE RTL OF ahbDecoder IS
|
||||
BEGIN
|
||||
|
||||
decodeAddress: process(hAddr)
|
||||
variable mask: unsigned(hAddr'range);
|
||||
begin
|
||||
hSel <= (others => '0');
|
||||
for index in hSel'range loop
|
||||
mask := to_unsigned(ahbMemoryLocation(index).addressMask, mask'length);
|
||||
if (hAddr and mask) = ahbMemoryLocation(index).baseAddress then
|
||||
hSel(index) <= '1';
|
||||
end if;
|
||||
end loop;
|
||||
end process decodeAddress;
|
||||
|
||||
END ARCHITECTURE RTL;
|
||||
Reference in New Issue
Block a user