2018-07-12 15:27:36 +02:00
|
|
|
/*
|
|
|
|
* system.h
|
|
|
|
*
|
|
|
|
* Created on: 11.07.2018
|
|
|
|
* Author: eyck
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SYSC_GENERAL_SYSTEM_H_
|
|
|
|
#define __SYSC_GENERAL_SYSTEM_H_
|
|
|
|
|
|
|
|
#include <systemc>
|
2018-07-28 09:45:49 +02:00
|
|
|
#include "sysc/SiFive/hifive1.h"
|
|
|
|
#include "mcp3008.h"
|
|
|
|
#include "terminal.h"
|
|
|
|
#include "h_bridge.h"
|
|
|
|
#include "dcmotor.h"
|
2018-07-12 15:27:36 +02:00
|
|
|
|
|
|
|
namespace sysc {
|
|
|
|
|
|
|
|
class system: sc_core::sc_module {
|
|
|
|
public:
|
2018-07-13 20:04:07 +02:00
|
|
|
SC_HAS_PROCESS(system);
|
|
|
|
|
2018-07-12 15:27:36 +02:00
|
|
|
system(sc_core::sc_module_name nm);
|
|
|
|
virtual ~system();
|
|
|
|
|
2018-07-28 09:45:49 +02:00
|
|
|
|
2018-07-12 15:27:36 +02:00
|
|
|
private:
|
2018-07-13 20:04:07 +02:00
|
|
|
sc_core::sc_vector<tlm::tlm_signal<sc_dt::sc_logic>> s_gpio;
|
|
|
|
sc_core::sc_signal<bool> s_rst_n;
|
2018-07-28 09:45:49 +02:00
|
|
|
sc_core::sc_signal<double> s_vref, s_va, s_vb, s_vc, s_vasens, s_vbsens, s_vcsens;
|
2018-07-23 22:15:38 +02:00
|
|
|
sc_core::sc_vector<sc_core::sc_signal<double>> s_ana;
|
2018-07-28 09:45:49 +02:00
|
|
|
sysc::hifive1 i_platform;
|
2018-07-12 15:27:36 +02:00
|
|
|
sysc::terminal i_terminal;
|
2018-07-23 22:15:38 +02:00
|
|
|
sysc::mcp3008 i_adc;
|
2018-07-28 09:45:49 +02:00
|
|
|
sysc::h_bridge i_h_bridge;
|
|
|
|
sysc::dc_motor i_motor;
|
2018-07-13 20:04:07 +02:00
|
|
|
void gen_por();
|
2018-07-12 15:27:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif /* __SYSC_GENERAL_SYSTEM_H_ */
|