Adapted to latest sc-components change
This commit is contained in:
parent
a374dfe0d1
commit
3ed0e5ec45
|
@ -17,11 +17,11 @@
|
|||
#define _E300_PLAT_MAP_H_
|
||||
// need double braces, see
|
||||
// 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 = {{
|
||||
{i_plic.socket, 0x0c000000, 0x200008},
|
||||
{i_gpio.socket, 0x10012000, 0x1000},
|
||||
{i_uart.socket, 0x10013000, 0x1000},
|
||||
{i_spi.socket, 0x10014000, 0x1000},
|
||||
const std::array<scc::target_name_map_entry<32>, 4> e300_plat_map = {{
|
||||
{"plic", 0x0c000000, 0x200008},
|
||||
{"gpio", 0x10012000, 0x1000},
|
||||
{"uart", 0x10013000, 0x1000},
|
||||
{"spi", 0x10014000, 0x1000},
|
||||
}};
|
||||
|
||||
#endif /* _E300_PLAT_MAP_H_ */
|
||||
|
|
|
@ -42,12 +42,14 @@ simple_system::simple_system(sc_core::sc_module_name nm)
|
|||
|
||||
// bus connections
|
||||
i_master.intor(i_router.target[0]);
|
||||
size_t i = 0;
|
||||
for (const auto &e : e300_plat_map) {
|
||||
i_router.initiator[i](e.target);
|
||||
i_router.add_target_range(i, e.start, e.size);
|
||||
i++;
|
||||
}
|
||||
i_router.bind_target(i_plic.socket, 0, "plic");
|
||||
i_router.bind_target(i_uart.socket, 1, "uart");
|
||||
i_router.bind_target(i_spi.socket, 2, "spi");
|
||||
i_router.bind_target(i_gpio.socket, 3, "gpio");
|
||||
|
||||
// target address ranges
|
||||
for (const auto &e : e300_plat_map)
|
||||
i_router.add_target_range(e.name, e.start, e.size);
|
||||
|
||||
// clock/reset connections
|
||||
i_uart.clk_i(s_clk);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0f5b5f68e7d5d481b4f8da2620df633495c989d9
|
||||
Subproject commit 6e0a8f8d259e4d8cca8b38dc089ed08f10db3a2d
|
Loading…
Reference in New Issue