Adapted to latest sc-components change
This commit is contained in:
		@@ -17,11 +17,11 @@
 | 
				
			|||||||
#define _E300_PLAT_MAP_H_
 | 
					#define _E300_PLAT_MAP_H_
 | 
				
			||||||
// need double braces, see
 | 
					// need double braces, see
 | 
				
			||||||
// https://stackoverflow.com/questions/6893700/how-to-construct-stdarray-object-with-initializer-list#6894191
 | 
					// https://stackoverflow.com/questions/6893700/how-to-construct-stdarray-object-with-initializer-list#6894191
 | 
				
			||||||
const std::array<scc::target_memory_map_entry<32>, 4> e300_plat_map = {{
 | 
					const std::array<scc::target_name_map_entry<32>, 4> e300_plat_map = {{
 | 
				
			||||||
    {i_plic.socket, 0x0c000000, 0x200008},
 | 
					    {"plic", 0x0c000000, 0x200008},
 | 
				
			||||||
    {i_gpio.socket, 0x10012000, 0x1000},
 | 
					    {"gpio", 0x10012000, 0x1000},
 | 
				
			||||||
    {i_uart.socket, 0x10013000, 0x1000},
 | 
					    {"uart", 0x10013000, 0x1000},
 | 
				
			||||||
    {i_spi.socket, 0x10014000, 0x1000},
 | 
					    {"spi",  0x10014000, 0x1000},
 | 
				
			||||||
}};
 | 
					}};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* _E300_PLAT_MAP_H_ */
 | 
					#endif /* _E300_PLAT_MAP_H_ */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,12 +42,14 @@ simple_system::simple_system(sc_core::sc_module_name nm)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // bus connections
 | 
					    // bus connections
 | 
				
			||||||
    i_master.intor(i_router.target[0]);
 | 
					    i_master.intor(i_router.target[0]);
 | 
				
			||||||
    size_t i = 0;
 | 
					    i_router.bind_target(i_plic.socket, 0, "plic");
 | 
				
			||||||
    for (const auto &e : e300_plat_map) {
 | 
					    i_router.bind_target(i_uart.socket, 1, "uart");
 | 
				
			||||||
        i_router.initiator[i](e.target);
 | 
					    i_router.bind_target(i_spi.socket,  2, "spi");
 | 
				
			||||||
        i_router.add_target_range(i, e.start, e.size);
 | 
					    i_router.bind_target(i_gpio.socket, 3, "gpio");
 | 
				
			||||||
        i++;
 | 
					
 | 
				
			||||||
    }
 | 
					    // target address ranges
 | 
				
			||||||
 | 
					    for (const auto &e : e300_plat_map)
 | 
				
			||||||
 | 
					        i_router.add_target_range(e.name, e.start, e.size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // clock/reset connections
 | 
					    // clock/reset connections
 | 
				
			||||||
    i_uart.clk_i(s_clk);
 | 
					    i_uart.clk_i(s_clk);
 | 
				
			||||||
 
 | 
				
			|||||||
 Submodule sc-components updated: 0f5b5f68e7...6e0a8f8d25
									
								
							
		Reference in New Issue
	
	Block a user