1 package slow_memory_map;
2 /*===== Project imports =====*/
3 import defined_types::*;
4 `include "instance_defines.bsv"
5 /* ==== define the AXI Addresses ==== */
8 /* ==== define the AXI slave numbering ===== */
11 /* ==== define the number of slow peripheral irqs ==== */
13 function Tuple2#(Bool, Bit#(TLog#(Num_Slow_Slaves)))
14 fn_slow_address_mapping (Bit#(`PADDR) addr);
16 if(addr>=`ClintBase && addr<=`ClintEnd)
17 return tuple2(True,fromInteger(valueOf(CLINT_slave_num)));
21 if(addr>=`PLICBase && addr<=`PLICEnd)
22 return tuple2(True,fromInteger(valueOf(Plic_slave_num)));
26 if(addr>=`AxiExp1Base && addr<=`AxiExp1End)
27 return tuple2(True,fromInteger(valueOf(AxiExp1_slave_num)));
31 return tuple2(False,?);