adapt to changes in scc
This commit is contained in:
		| @@ -47,7 +47,7 @@ | ||||
| #include "scc/memory.h" | ||||
| #include "scc/router.h" | ||||
| #include "scc/utilities.h" | ||||
| #include "tlm/tlm_signal_sockets.h" | ||||
| #include "tlm/scc/tlm_signal_sockets.h" | ||||
| #include <array> | ||||
| #include <memory> | ||||
| #include <sysc/kernel/sc_module.h> | ||||
| @@ -58,8 +58,8 @@ class fe310 : public sc_core::sc_module { | ||||
| public: | ||||
|     SC_HAS_PROCESS(fe310);// NOLINT | ||||
|  | ||||
|     sc_core::sc_vector<tlm::tlm_signal_initiator_socket<sc_dt::sc_logic>> pins_o; | ||||
|     sc_core::sc_vector<tlm::tlm_signal_target_socket<sc_dt::sc_logic>> pins_i; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_initiator_socket<sc_dt::sc_logic>> pins_o; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_target_socket<sc_dt::sc_logic>> pins_i; | ||||
|  | ||||
|     sc_core::sc_in<bool> erst_n; | ||||
|  | ||||
| @@ -92,8 +92,8 @@ private: | ||||
|     sc_core::sc_vector<sc_core::sc_signal<bool, sc_core::SC_MANY_WRITERS>> s_global_int, s_local_int; | ||||
|     sc_core::sc_signal<bool, sc_core::SC_MANY_WRITERS> s_core_int; | ||||
|      | ||||
|     sc_core::sc_vector<scc::tlm_signal_bool_opt_in> s_dummy_sck_i; | ||||
|     sc_core::sc_vector<scc::tlm_signal_bool_opt_out> s_dummy_sck_o; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_bool_opt_in> s_dummy_sck_i; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_bool_opt_out> s_dummy_sck_o; | ||||
|  | ||||
| protected: | ||||
|     void gen_reset(); | ||||
|   | ||||
| @@ -34,11 +34,11 @@ | ||||
| #define _GPIO_H_ | ||||
|  | ||||
| #include "cci_configuration" | ||||
| #include "scc/signal_initiator_mixin.h" | ||||
| #include "scc/signal_target_mixin.h" | ||||
| #include "tlm/scc/signal_initiator_mixin.h" | ||||
| #include "tlm/scc/signal_target_mixin.h" | ||||
| #include "scc/tlm_target.h" | ||||
| #include <memory> | ||||
| #include <tlm/tlm_signal.h> | ||||
| #include <tlm/scc/tlm_signal.h> | ||||
|  | ||||
| namespace sysc { | ||||
|  | ||||
| @@ -52,13 +52,13 @@ public: | ||||
|     sc_core::sc_in<bool> rst_i; | ||||
|     // sc_core::sc_inout_rv<32> pins_io; | ||||
|  | ||||
|     sc_core::sc_vector<scc::tlm_signal_logic_out> pins_o; | ||||
|     sc_core::sc_vector<scc::tlm_signal_logic_in> pins_i; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_logic_out> pins_o; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_logic_in> pins_i; | ||||
|  | ||||
|     sc_core::sc_vector<scc::tlm_signal_bool_opt_out> iof0_o; | ||||
|     sc_core::sc_vector<scc::tlm_signal_bool_opt_out> iof1_o; | ||||
|     sc_core::sc_vector<scc::tlm_signal_bool_opt_in> iof0_i; | ||||
|     sc_core::sc_vector<scc::tlm_signal_bool_opt_in> iof1_i; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_bool_opt_out> iof0_o; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_bool_opt_out> iof1_o; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_bool_opt_in> iof0_i; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_bool_opt_in> iof1_i; | ||||
|  | ||||
|     gpio(sc_core::sc_module_name nm); | ||||
|     virtual ~gpio() override; // need to keep it in source file because of fwd declaration of gpio_regs | ||||
| @@ -70,16 +70,16 @@ protected: | ||||
|     void reset_cb(); | ||||
|     void update_pins(uint32_t changed_bits); | ||||
|     void before_end_of_elaboration() override; | ||||
|     void pin_input(unsigned int tag, tlm::tlm_signal_gp<sc_dt::sc_logic> &gp, sc_core::sc_time &delay); | ||||
|     void forward_pin_input(unsigned int tag, tlm::tlm_signal_gp<sc_dt::sc_logic> &gp); | ||||
|     void iof_input(unsigned int tag, unsigned iof_idx, tlm::tlm_signal_gp<> &gp, sc_core::sc_time &delay); | ||||
|     void pin_input(unsigned int tag, tlm::scc::tlm_signal_gp<sc_dt::sc_logic> &gp, sc_core::sc_time &delay); | ||||
|     void forward_pin_input(unsigned int tag, tlm::scc::tlm_signal_gp<sc_dt::sc_logic> &gp); | ||||
|     void iof_input(unsigned int tag, unsigned iof_idx, tlm::scc::tlm_signal_gp<> &gp, sc_core::sc_time &delay); | ||||
|     sc_core::sc_time clk; | ||||
|     std::array<bool, 32> last_iof0, last_iof1; | ||||
|     std::unique_ptr<gpio_regs> regs; | ||||
|     std::shared_ptr<sysc::WsHandler> handler; | ||||
|  | ||||
| private: | ||||
|     tlm::tlm_phase write_output(tlm::tlm_signal_gp<sc_dt::sc_logic> &gp, size_t i, sc_dt::sc_logic val); | ||||
|     tlm::tlm_phase write_output(tlm::scc::tlm_signal_gp<sc_dt::sc_logic> &gp, size_t i, sc_dt::sc_logic val); | ||||
| }; | ||||
|  | ||||
| } /* namespace sysc */ | ||||
|   | ||||
| @@ -34,10 +34,10 @@ | ||||
| #define _PWM_H_ | ||||
|  | ||||
| #include "cci_configuration" | ||||
| #include "scc/signal_initiator_mixin.h" | ||||
| #include "scc/signal_target_mixin.h" | ||||
| #include "tlm/scc/signal_initiator_mixin.h" | ||||
| #include "tlm/scc/signal_target_mixin.h" | ||||
| #include "scc/tlm_target.h" | ||||
| #include <tlm/tlm_signal.h> | ||||
| #include <tlm/scc/tlm_signal.h> | ||||
|  | ||||
| namespace sysc { | ||||
|  | ||||
| @@ -49,7 +49,7 @@ public: | ||||
|     sc_core::sc_in<sc_core::sc_time> clk_i; | ||||
|     sc_core::sc_in<bool> rst_i; | ||||
|  | ||||
|     sc_core::sc_vector<scc::tlm_signal_bool_opt_out> cmpgpio_o; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_bool_opt_out> cmpgpio_o; | ||||
|     sc_core::sc_vector<sc_core::sc_out<bool>> cmpip_o; | ||||
|  | ||||
|     pwm(sc_core::sc_module_name nm); | ||||
|   | ||||
| @@ -34,7 +34,7 @@ | ||||
| #define _SPI_H_ | ||||
|  | ||||
| #include <sysc/utils/sc_vector.h> | ||||
| #include <tlm/tlm_signal.h> | ||||
| #include <tlm/scc/tlm_signal.h> | ||||
|  | ||||
| namespace sysc { | ||||
|  | ||||
| @@ -48,8 +48,8 @@ public: | ||||
|     template <typename TYPE> | ||||
|     static std::unique_ptr<spi> create(sc_core::sc_module_name nm); | ||||
|  | ||||
|     template <typename T> using tlm_in = tlm::tlm_signal_opt_target_socket<T>; | ||||
|     template <typename T> using tlm_out = tlm::tlm_signal_opt_initiator_socket<T>; | ||||
|     template <typename T> using tlm_in = tlm::scc::tlm_signal_opt_target_socket<T>; | ||||
|     template <typename T> using tlm_out = tlm::scc::tlm_signal_opt_initiator_socket<T>; | ||||
|  | ||||
|     tlm::tlm_target_socket<> socket; | ||||
|     sc_core::sc_in<sc_core::sc_time> clk_i; | ||||
|   | ||||
| @@ -34,10 +34,10 @@ | ||||
| #define _UART_H_ | ||||
|  | ||||
| #include "cci_configuration" | ||||
| #include "scc/signal_initiator_mixin.h" | ||||
| #include "scc/signal_target_mixin.h" | ||||
| #include "tlm/scc/signal_initiator_mixin.h" | ||||
| #include "tlm/scc/signal_target_mixin.h" | ||||
| #include "scc/tlm_target.h" | ||||
| #include <tlm/tlm_signal.h> | ||||
| #include <tlm/scc/tlm_signal.h> | ||||
|  | ||||
| namespace sysc { | ||||
| class tlm_signal_uart_extension; | ||||
| @@ -49,8 +49,8 @@ public: | ||||
|     SC_HAS_PROCESS(uart);// NOLINT | ||||
|     sc_core::sc_in<sc_core::sc_time> clk_i; | ||||
|     sc_core::sc_in<bool> rst_i; | ||||
|     scc::tlm_signal_bool_out tx_o; | ||||
|     scc::tlm_signal_bool_in rx_i; | ||||
|     tlm::scc::tlm_signal_bool_out tx_o; | ||||
|     tlm::scc::tlm_signal_bool_in rx_i; | ||||
|  | ||||
|     sc_core::sc_out<bool> irq_o; | ||||
|  | ||||
| @@ -63,7 +63,7 @@ protected: | ||||
|     void clock_cb(); | ||||
|     void reset_cb(); | ||||
|     void transmit_data(); | ||||
|     void receive_data(tlm::tlm_signal_gp<> &gp, sc_core::sc_time &delay); | ||||
|     void receive_data(tlm::scc::tlm_signal_gp<> &gp, sc_core::sc_time &delay); | ||||
|     void update_irq(); | ||||
|     sc_core::sc_time clk{sc_core::SC_ZERO_TIME}, rx_last_start{sc_core::SC_ZERO_TIME}; | ||||
|     std::unique_ptr<uart_regs> regs; | ||||
|   | ||||
| @@ -33,10 +33,10 @@ | ||||
| #ifndef _SYSC_TLM_EXTENSIONS_H_ | ||||
| #define _SYSC_TLM_EXTENSIONS_H_ | ||||
|  | ||||
| #include "tlm/tlm_extensions.h" | ||||
| #include "tlm/scc/tlm_extensions.h" | ||||
|  | ||||
| namespace sysc { | ||||
| struct tlm_signal_uart_extension : public tlm::tlm_unmanaged_extension<tlm_signal_uart_extension> { | ||||
| struct tlm_signal_uart_extension : public tlm::scc::tlm_unmanaged_extension<tlm_signal_uart_extension> { | ||||
|  | ||||
|     struct uart_tx { | ||||
|         unsigned data_bits : 4; | ||||
| @@ -48,7 +48,7 @@ struct tlm_signal_uart_extension : public tlm::tlm_unmanaged_extension<tlm_signa | ||||
|     sc_core::sc_time start_time; | ||||
| }; | ||||
|  | ||||
| struct tlm_signal_spi_extension : public tlm::tlm_unmanaged_extension<tlm_signal_spi_extension> { | ||||
| struct tlm_signal_spi_extension : public tlm::scc::tlm_unmanaged_extension<tlm_signal_spi_extension> { | ||||
|  | ||||
|     struct spi_tx { | ||||
|         unsigned data_bits : 5; | ||||
| @@ -59,7 +59,7 @@ struct tlm_signal_spi_extension : public tlm::tlm_unmanaged_extension<tlm_signal | ||||
|     } tx; | ||||
|     sc_core::sc_time start_time; | ||||
|  | ||||
|     void copy_from(tlm_extension_base const &other) override { | ||||
|     void copy_from(tlm::tlm_extension_base const &other) override { | ||||
|         auto &o = static_cast<const type &>(other); | ||||
|         this->tx = o.tx; | ||||
|         this->start_time = o.start_time; | ||||
|   | ||||
| @@ -35,7 +35,7 @@ | ||||
|  | ||||
| #include <sysc/top/terminal.h> | ||||
| #include <sysc/top/mcp_adc.h> | ||||
| #include "tlm/tlm_signal_sockets.h" | ||||
| #include "tlm/scc/tlm_signal_sockets.h" | ||||
| #include <boost/preprocessor.hpp> | ||||
| #include <systemc> | ||||
| #include <sysc/SiFive/fe310.h> | ||||
| @@ -56,8 +56,8 @@ struct hifive1 : public sc_core::sc_module { | ||||
|     hifive1(sc_core::sc_module_name nm); | ||||
|  | ||||
| protected: | ||||
|     sc_core::sc_vector<tlm::tlm_signal<sc_dt::sc_logic>> s_gpio; | ||||
|     sc_core::sc_vector<scc::tlm_signal_logic_in> h_bridge; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal<sc_dt::sc_logic>> s_gpio; | ||||
|     sc_core::sc_vector<tlm::scc::tlm_signal_logic_in> h_bridge; | ||||
|     fe310 i_fe310; | ||||
|     terminal i_terminal; | ||||
|     mcp_3208 i_adc; | ||||
|   | ||||
| @@ -34,12 +34,12 @@ | ||||
| #define _SYSC_TOP_MCP3008_H_ | ||||
|  | ||||
| #include "cci_configuration" | ||||
| #include "scc/signal_initiator_mixin.h" | ||||
| #include "scc/signal_target_mixin.h" | ||||
| #include "tlm/scc/signal_initiator_mixin.h" | ||||
| #include "tlm/scc/signal_target_mixin.h" | ||||
| #include "sysc/tlm_extensions.h" | ||||
| #include <sysc/kernel/sc_module.h> | ||||
| #include <sysc/utils/sc_vector.h> | ||||
| #include <tlm/tlm_signal.h> | ||||
| #include <tlm/scc/tlm_signal.h> | ||||
|  | ||||
| namespace sysc { | ||||
|  | ||||
| @@ -49,10 +49,10 @@ public: | ||||
|     template <typename TYPE> | ||||
|     static std::unique_ptr<mcp_adc> create(sc_core::sc_module_name nm); | ||||
|  | ||||
|     scc::tlm_signal_logic_in sck_i; | ||||
|     scc::tlm_signal_logic_out miso_o; | ||||
|     scc::tlm_signal_logic_in mosi_i; | ||||
|     scc::tlm_signal_logic_in cs_i; | ||||
|     tlm::scc::tlm_signal_logic_in sck_i; | ||||
|     tlm::scc::tlm_signal_logic_out miso_o; | ||||
|     tlm::scc::tlm_signal_logic_in mosi_i; | ||||
|     tlm::scc::tlm_signal_logic_in cs_i; | ||||
|  | ||||
|     sc_core::sc_in<double> vref_i; | ||||
|     sc_core::sc_vector<sc_core::sc_in<double>> ch_i; | ||||
| @@ -86,7 +86,7 @@ public: | ||||
|     ~mcp_3008() override = default; | ||||
|  | ||||
| private: | ||||
|     tlm::tlm_sync_enum receive(tlm::tlm_signal_gp<sc_dt::sc_logic> &, tlm::tlm_phase &, sc_core::sc_time &); | ||||
|     tlm::tlm_sync_enum receive(tlm::scc::tlm_signal_gp<sc_dt::sc_logic> &, tlm::tlm_phase &, sc_core::sc_time &); | ||||
|     void do_conversion(); | ||||
|     unsigned idx, rx_bits; | ||||
|     std::array<uint8_t, 3> rx_bytes, tx_bytes; | ||||
| @@ -103,7 +103,7 @@ public: | ||||
|     ~mcp_3208() override = default; | ||||
|  | ||||
| private: | ||||
|     tlm::tlm_sync_enum receive(tlm::tlm_signal_gp<sc_dt::sc_logic> &, tlm::tlm_phase &, sc_core::sc_time &); | ||||
|     tlm::tlm_sync_enum receive(tlm::scc::tlm_signal_gp<sc_dt::sc_logic> &, tlm::tlm_phase &, sc_core::sc_time &); | ||||
|     void sample_inputs(); | ||||
|     void do_conversion(); | ||||
|     unsigned idx, rx_bits, byte_offs, bit_offs; | ||||
|   | ||||
| @@ -34,9 +34,9 @@ | ||||
| #define _SYSC_TOP_TERMINAL_H_ | ||||
|  | ||||
| #include "cci_configuration" | ||||
| #include "scc/signal_initiator_mixin.h" | ||||
| #include "scc/signal_target_mixin.h" | ||||
| #include "tlm/tlm_signal.h" | ||||
| #include "tlm/scc/signal_initiator_mixin.h" | ||||
| #include "tlm/scc/signal_target_mixin.h" | ||||
| #include "tlm/scc/tlm_signal.h" | ||||
| #include <memory> | ||||
| #include <sysc/kernel/sc_module.h> | ||||
|  | ||||
| @@ -45,8 +45,8 @@ class WsHandler; | ||||
|  | ||||
| class terminal : public sc_core::sc_module { | ||||
| public: | ||||
|     scc::tlm_signal_logic_out tx_o; | ||||
|     scc::tlm_signal_logic_in rx_i; | ||||
|     tlm::scc::tlm_signal_logic_out tx_o; | ||||
|     tlm::scc::tlm_signal_logic_in rx_i; | ||||
|  | ||||
|     terminal(); | ||||
|  | ||||
| @@ -58,7 +58,7 @@ public: | ||||
|  | ||||
| protected: | ||||
|     void before_end_of_elaboration(); | ||||
|     void receive(tlm::tlm_signal_gp<sc_dt::sc_logic> &gp, sc_core::sc_time &delay); | ||||
|     void receive(tlm::scc::tlm_signal_gp<sc_dt::sc_logic> &gp, sc_core::sc_time &delay); | ||||
|  | ||||
|     std::vector<uint8_t> queue; | ||||
|     std::shared_ptr<sysc::WsHandler> handler; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user