2018-07-12 15:27:36 +02:00
|
|
|
/*
|
|
|
|
* terminal.h
|
|
|
|
*
|
|
|
|
* Created on: 07.07.2018
|
|
|
|
* Author: eyck
|
|
|
|
*/
|
|
|
|
|
2018-07-28 09:45:49 +02:00
|
|
|
#ifndef _SYSC_TOP_TERMINAL_H_
|
|
|
|
#define _SYSC_TOP_TERMINAL_H_
|
2018-07-12 15:27:36 +02:00
|
|
|
|
|
|
|
#include "scc/signal_target_mixin.h"
|
|
|
|
#include "scc/signal_initiator_mixin.h"
|
|
|
|
#include "tlm/tlm_signal.h"
|
|
|
|
#include "cci_configuration"
|
|
|
|
#include <sysc/kernel/sc_module.h>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace sysc {
|
|
|
|
class WsHandler;
|
|
|
|
|
|
|
|
class terminal: public sc_core::sc_module {
|
|
|
|
public:
|
|
|
|
scc::tlm_signal_logic_out tx_o;
|
|
|
|
scc::tlm_signal_logic_in rx_i;
|
|
|
|
|
|
|
|
terminal();
|
|
|
|
|
|
|
|
terminal(const sc_core::sc_module_name& nm);
|
|
|
|
|
|
|
|
virtual ~terminal();
|
|
|
|
|
|
|
|
cci::cci_param<bool> write_to_ws;
|
|
|
|
|
|
|
|
protected:
|
2018-07-23 22:15:38 +02:00
|
|
|
void before_end_of_elaboration();
|
2018-07-12 15:27:36 +02:00
|
|
|
void receive(tlm::tlm_signal_gp<sc_dt::sc_logic>& gp, sc_core::sc_time& delay);
|
2018-07-23 22:15:38 +02:00
|
|
|
|
|
|
|
std::vector<uint8_t> queue;
|
2018-07-12 15:27:36 +02:00
|
|
|
std::shared_ptr<sysc::WsHandler> handler;
|
|
|
|
sc_core::sc_time last_tx_start=sc_core::SC_ZERO_TIME;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2018-07-28 09:45:49 +02:00
|
|
|
#endif /* _SYSC_TOP_TERMINAL_H_ */
|