1 package slow_memory_map;
2 /*===== Project imports =====*/
3 import defined_types::*;
4 `include "instance_defines.bsv"
5 `include "slow_instance_defines.bsv"
6 /* ==== define the AXI slave numbering ===== */
9 /* ==== define the number of slow peripheral irqs ==== */
11 function Tuple2#(Bool, Bit#(TLog#(Num_Slow_Slaves)))
12 fn_slow_address_mapping (Bit#(`PADDR) addr);
14 if(addr>=`ClintBase && addr<=`ClintEnd)
15 return tuple2(True,fromInteger(valueOf(CLINT_slave_num)));
19 if(addr>=`PLICBase && addr<=`PLICEnd)
20 return tuple2(True,fromInteger(valueOf(Plic_slave_num)));
24 if(addr>=`AxiExp1Base && addr<=`AxiExp1End)
25 return tuple2(True,fromInteger(valueOf(AxiExp1_slave_num)));
29 return tuple2(False,?);