/* * Copyright (c) 2019 -2021 MINRES Technolgies GmbH * * SPDX-License-Identifier: Apache-2.0 */ #ifndef _PLATFORM_H_ #define _PLATFORM_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace tgc_vp { class system : public sc_core::sc_module { public: SC_HAS_PROCESS(system);// NOLINT sc_core::sc_vector> pins_o{"pins_o", 32}; sc_core::sc_vector> pins_i{"pins_i", 32}; sc_core::sc_in erst_n{"erst_n"}; system(sc_core::sc_module_name nm); private: sysc::tgfs::core_complex core_complex{"core_complex"}; scc::router<> router; vpvper::sifive::uart_terminal uart0{"uart0"}; vpvper::sifive::uart uart1{"uart1"}; std::unique_ptr qspi0_ptr, qspi1_ptr, qspi2_ptr; vpvper::sifive::pwm pwm0{"pwm0"}, pwm1{"pwm1"}, pwm2{"pwm2"}; vpvper::sifive::gpio gpio0{"gpio0"}; vpvper::sifive::plic plic{"plic"}; vpvper::sifive::aon aon{"aon"}; vpvper::sifive::prci prci{"prci"}; vpvper::sifive::clint clint{"clint"}; using mem_qspi_t = scc::memory<512_MB, scc::LT>; mem_qspi_t mem_qspi{"mem_qspi"}; using mem_ram_t = scc::memory<128_kB, scc::LT>; mem_ram_t mem_ram{"mem_ram"}; sc_core::sc_signal tlclk_s{"tlclk_s"}; sc_core::sc_signal lfclk_s{"lfclk_s"}; sc_core::sc_signal rst_s{"rst_s"}, mtime_int_s{"mtime_int_s"}, msie_int_s{"msie_int_s"}; sc_core::sc_vector> global_int_s{"global_int_s", 256}, local_int_s{"local_int_s", 16}; sc_core::sc_signal core_int_s{"core_int_s"}; protected: void gen_reset(); vpvper::sifive::spi& qspi0; vpvper::sifive::spi& qspi1; vpvper::sifive::spi& qspi2; #include "tgc_vp/gen/platform_mmap.h" }; } /* namespace sysc */ #endif /* _PLATFORM_H_ */