diff --git a/SysCAMSGenerationCode/generated_CPP/distance_sensor.cpp b/SysCAMSGenerationCode/generated_CPP/distance_sensor.cpp deleted file mode 100644 index d29e192d313a6f2da3302a6f48997cda0d94d21c..0000000000000000000000000000000000000000 --- a/SysCAMSGenerationCode/generated_CPP/distance_sensor.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include <systemc-ams> -#include "analog_to_digital.h" - -// Simulation entry point. -int sc_main(int argc, char *argv[]) { - - using namespace sc_core; - using namespace sca_util; - - // Declare signal to interconnect. - - // Instantiate source and sink as well as bind their ports to the signal. - analog_to_digital analog_to_digital_1("analog_to_digital_1"); - analog_to_digital_1.sensorIn( - // Configure signal tracing. - sca_trace_file* tfp = sca_create_tabular_trace_file("distance_sensor_tb"); - - - // Start simulation. - sc_start(100.0, SC_MS); - - // Close trace file and stop simulation to enable clean-up by - // asking SystemC to execute all end_of_simulation() callbacks. - sca_close_tabular_trace_file(tfp); - sc_stop(); - return 0; -} - diff --git a/SysCAMSGenerationCode/generated_CPP/sin_source_sink.cpp b/SysCAMSGenerationCode/generated_CPP/sin_source_sink.cpp deleted file mode 100644 index b23af42ee703a348973b884d3862c20cbdc1bdc5..0000000000000000000000000000000000000000 --- a/SysCAMSGenerationCode/generated_CPP/sin_source_sink.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include <systemc-ams> -#include "sink.h" -#include "sin_source.h" - -// Simulation entry point. -int sc_main(int argc, char *argv[]) { - - using namespace sc_core; - using namespace sca_util; - - // Declare signal to interconnect. - sca_tdf::sca_signal<double> sig_1("sig_1"); - - // Instantiate source and sink as well as bind their ports to the signal. - sink sink_1("sink_1"); - sink_1.in(sig_1); - - sin_source sin_source_2("sin_source_2"); - sin_source_2.out(sig_1); - - // Configure signal tracing. - sca_trace_file* tfp = sca_create_tabular_trace_file("sin_source_sink_tb"); - sca_trace(tfp, sig_1, "sig_1"); - - // Start simulation. - sc_start(100.0, SC_MS); - - // Close trace file and stop simulation to enable clean-up by - // asking SystemC to execute all end_of_simulation() callbacks. - sca_close_tabular_trace_file(tfp); - sc_stop(); - return 0; -} - diff --git a/SysCAMSGenerationCode/generated_H/analog_to_digital.h b/SysCAMSGenerationCode/generated_H/analog_to_digital.h deleted file mode 100644 index 938aefb0e3430e7f21ce5ce1d5936e13f94699da..0000000000000000000000000000000000000000 --- a/SysCAMSGenerationCode/generated_H/analog_to_digital.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef ANALOG_TO_DIGITAL_H -#define ANALOG_TO_DIGITAL_H - -#include <cmath> -#include <iostream> -#include <systemc-ams> - -SCA_TDF_MODULE(analog_to_digital) { - - // TDF port declarations - sca_tdf::sca_in<double> sensorIn; - // Converter port declarations - sca_tdf::sca_de::sca_out<int> soclibOut; - sca_tdf::sca_de::sca_in<int> soclibIn; - - // Constructor - SCA_CTOR(analog_to_digital) - : sensorIn("sensorIn") - , soclibOut("soclibOut") - , soclibIn("soclibIn") - {} - - void set_attributes() { - sensorIn.set_rate(1); - sensorIn.set_delay(0); - soclibOut.set_rate(1); - soclibOut.set_delay(0); - soclibIn.set_rate(1); - soclibIn.set_delay(0); - } - - void processing() { } - -}; - -#endif // ANALOG_TO_DIGITAL_H \ No newline at end of file diff --git a/SysCAMSGenerationCode/generated_H/sin_source.h b/SysCAMSGenerationCode/generated_H/sin_source.h deleted file mode 100644 index 20097c71c27482f1af10ad767b0e82bda9db943c..0000000000000000000000000000000000000000 --- a/SysCAMSGenerationCode/generated_H/sin_source.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef SIN_SOURCE_H -#define SIN_SOURCE_H - -#include <cmath> -#include <iostream> -#include <systemc-ams> - -SCA_TDF_MODULE(sin_source) { - - // TDF port declarations - sca_tdf::sca_out<double> out; - - // Constructor - SCA_CTOR(sin_source) - : out("out") - {} - - void set_attributes() { - set_timestep(0, sc_core::SC_MS); - out.set_timestep(1, sc_core::SC_US); - out.set_rate(0); - out.set_delay(0); - } - - void processing() { double t = out.get_time().to_seconds(); double x = 1.5 * sin(2.0 * M_PI * 50.0 * t); out.write(x); } - -}; - -#endif // SIN_SOURCE_H \ No newline at end of file diff --git a/SysCAMSGenerationCode/generated_H/sink.h b/SysCAMSGenerationCode/generated_H/sink.h deleted file mode 100644 index bcf8081484bce60d8e87d0ca2e367497da7e86f5..0000000000000000000000000000000000000000 --- a/SysCAMSGenerationCode/generated_H/sink.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef SINK_H -#define SINK_H - -#include <cmath> -#include <iostream> -#include <systemc-ams> - -SCA_TDF_MODULE(sink) { - - // TDF port declarations - sca_tdf::sca_in<double> in; - - // Constructor - SCA_CTOR(sink) - : in("in") - {} - - void set_attributes() { - set_timestep(0, sc_core::SC_MS); - in.set_timestep(0, sc_core::SC_US); - in.set_rate(0); - in.set_delay(0); - } - - void processing() { using namespace std; cout << this->name() << " @ " << this->get_time() << ": " << in.read() << endl; } - -}; - -#endif // SINK_H \ No newline at end of file