Updated to latest scc version
This commit is contained in:
		| @@ -13,10 +13,6 @@ add_executable (simple_system | ||||
| # Link the executable to the sc_components library. Since the sc_components library has | ||||
| # public include directories we will use those link directories when building | ||||
| # simple_system | ||||
| target_link_libraries (simple_system LINK_PUBLIC sc-components) | ||||
| target_link_libraries (simple_system LINK_PUBLIC ${SystemC_LIBRARIES}) | ||||
| target_link_libraries (simple_system LINK_PUBLIC ${SCV_LIBRARIES}) | ||||
| target_link_libraries (simple_system LINK_PUBLIC scc) | ||||
| target_link_libraries (simple_system LINK_PUBLIC ${Boost_LIBRARIES} ) | ||||
| target_link_libraries (simple_system LINK_PUBLIC ${CMAKE_THREAD_LIBS_INIT}) | ||||
| target_link_libraries (simple_system LINK_PUBLIC ${ZLIB_LIBRARY}) | ||||
| target_link_libraries (simple_system LINK_PUBLIC ${CMAKE_DL_LIBS}) | ||||
|   | ||||
| @@ -18,10 +18,10 @@ | ||||
| // 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, 0x0c000000, 0x200008}, | ||||
|     {&i_gpio, 0x10012000, 0x1000}, | ||||
|     {&i_uart, 0x10013000, 0x1000}, | ||||
|     {&i_spi, 0x10014000, 0x1000}, | ||||
|     {i_plic.socket, 0x0c000000, 0x200008}, | ||||
|     {i_gpio.socket, 0x10012000, 0x1000}, | ||||
|     {i_uart.socket, 0x10013000, 0x1000}, | ||||
|     {i_spi.socket, 0x10014000, 0x1000}, | ||||
| }}; | ||||
|  | ||||
| #endif /* _E300_PLAT_MAP_H_ */ | ||||
|   | ||||
| @@ -25,7 +25,7 @@ gpio::gpio(sc_core::sc_module_name nm) | ||||
| , tlm_target<>(clk) | ||||
| , NAMED(clk_i) | ||||
| , NAMED(rst_i) | ||||
| , NAMEDD(gpio_regs, regs) { | ||||
| , NAMEDD(regs, gpio_regs) { | ||||
|     regs->registerResources(*this); | ||||
|     SC_METHOD(clock_cb); | ||||
|     sensitive << clk_i; | ||||
|   | ||||
| @@ -50,8 +50,7 @@ plic::plic(sc_core::sc_module_name nm) | ||||
| , NAMED(rst_i) | ||||
| , NAMED(global_interrupts_i, 256) | ||||
| , NAMED(core_interrupt_o) | ||||
| , NAMEDD(plic_regs, regs) | ||||
|  | ||||
| , NAMEDD(regs, plic_regs) | ||||
| { | ||||
|     regs->registerResources(*this); | ||||
|     // register callbacks | ||||
|   | ||||
| @@ -21,11 +21,12 @@ | ||||
|  */ | ||||
|  | ||||
| #include "simple_system.h" | ||||
| #include <boost/program_options.hpp> | ||||
| #include <sstream> | ||||
| #include <scc/report.h> | ||||
| #include <scc/scv_tr_db.h> | ||||
| #include <scc/tracer.h> | ||||
| #include <cci_utils/broker.h> | ||||
| #include <boost/program_options.hpp> | ||||
| #include <sstream> | ||||
|  | ||||
| using namespace sysc; | ||||
| using namespace scc; | ||||
| @@ -38,10 +39,12 @@ const size_t ERROR_UNHANDLED_EXCEPTION = 2; | ||||
| } // namespace | ||||
|  | ||||
| int sc_main(int argc, char *argv[]) { | ||||
|     sc_core::sc_report_handler::set_actions( "/IEEE_Std_1666/deprecated", sc_core::SC_DO_NOTHING ); | ||||
|     sc_core::sc_report_handler::set_actions(sc_core::SC_ID_MORE_THAN_ONE_SIGNAL_DRIVER_, sc_core::SC_DO_NOTHING); | ||||
|     /////////////////////////////////////////////////////////////////////////// | ||||
|     // setup initial logging | ||||
|     // create global CCI broker | ||||
|     /////////////////////////////////////////////////////////////////////////// | ||||
|     scc::Logger<>::reporting_level() = logging::INFO; | ||||
|     cci::cci_register_broker(new cci_utils::broker("Global Broker")); | ||||
|     /////////////////////////////////////////////////////////////////////////// | ||||
|     // CLI argument parsing | ||||
|     /////////////////////////////////////////////////////////////////////////// | ||||
| @@ -67,12 +70,10 @@ int sc_main(int argc, char *argv[]) { | ||||
|         std::cerr << desc << std::endl; | ||||
|         return ERROR_IN_COMMAND_LINE; | ||||
|     } | ||||
|     if (vm.count("debug")) { | ||||
|     	LOGGER(DEFAULT)::reporting_level() = log::DEBUG; | ||||
|         LOGGER(SystemC)::reporting_level() = log::DEBUG; | ||||
|         scc::Logger<>::reporting_level() = log::DEBUG; | ||||
|     } | ||||
|  | ||||
|     /////////////////////////////////////////////////////////////////////////// | ||||
|     // configure logging | ||||
|     /////////////////////////////////////////////////////////////////////////// | ||||
|     scc::init_logging(vm.count("debug")?logging::DEBUG:logging::INFO); | ||||
|     /////////////////////////////////////////////////////////////////////////// | ||||
|     // set up tracing & transaction recording | ||||
|     /////////////////////////////////////////////////////////////////////////// | ||||
|   | ||||
| @@ -42,8 +42,8 @@ simple_system::simple_system(sc_core::sc_module_name nm) | ||||
|     i_master.intor(i_router.target[0]); | ||||
|     size_t i = 0; | ||||
|     for (const auto &e : e300_plat_map) { | ||||
|         i_router.initiator[i](e.target->socket); | ||||
|         i_router.add_target_range(i, e.start, e.size); | ||||
|         i_router.initiator[i](e.target); | ||||
|         i_router.set_target_range(i, e.start, e.size); | ||||
|         i++; | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -25,7 +25,7 @@ spi::spi(sc_core::sc_module_name nm) | ||||
| , tlm_target<>(clk) | ||||
| , NAMED(clk_i) | ||||
| , NAMED(rst_i) | ||||
| , NAMEDD(spi_regs, regs) { | ||||
| , NAMEDD(regs, spi_regs) { | ||||
|     regs->registerResources(*this); | ||||
|     SC_METHOD(clock_cb); | ||||
|     sensitive << clk_i; | ||||
|   | ||||
| @@ -25,7 +25,7 @@ uart::uart(sc_core::sc_module_name nm) | ||||
| , tlm_target<>(clk) | ||||
| , NAMED(clk_i) | ||||
| , NAMED(rst_i) | ||||
| , NAMEDD(uart_regs, regs) { | ||||
| , NAMEDD(regs, uart_regs) { | ||||
|     regs->registerResources(*this); | ||||
|     SC_METHOD(clock_cb); | ||||
|     sensitive << clk_i; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user