aboutsummaryrefslogtreecommitdiff
path: root/src/devices/spx_module.h
diff options
context:
space:
mode:
authorClément Zrounba <6691770+clement-z@users.noreply.github.com>2023-09-30 23:06:01 +0200
committerClément Zrounba <6691770+clement-z@users.noreply.github.com>2023-09-30 23:26:46 +0200
commitff9b8bb838ecdfbfc1dc81038fcf3b2a87636982 (patch)
tree21f27be782ce11c6d00b96ce100a2bff88141b2e /src/devices/spx_module.h
downloadspecs-ff9b8bb838ecdfbfc1dc81038fcf3b2a87636982.tar.gz
specs-ff9b8bb838ecdfbfc1dc81038fcf3b2a87636982.zip
Initial release
Diffstat (limited to 'src/devices/spx_module.h')
-rw-r--r--src/devices/spx_module.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/devices/spx_module.h b/src/devices/spx_module.h
new file mode 100644
index 0000000..0a4506f
--- /dev/null
+++ b/src/devices/spx_module.h
@@ -0,0 +1,36 @@
+#pragma once
+
+#include "optical_signal.h"
+#include "specs.h"
+
+#include <systemc.h>
+#include <string>
+
+using std::string;
+using namespace std::string_literals;
+
+class spx_module : public sc_module {
+public:
+ typedef spx_module this_type;
+ typedef spx::oa_value_type sigval_type;
+ typedef spx::oa_signal_type sig_type;
+ typedef spx::oa_if_in_type if_in_type;
+ typedef spx::oa_if_out_type if_out_type;
+ typedef spx::oa_port_in_type port_in_type;
+ typedef spx::oa_port_out_type port_out_type;
+
+ enum ModuleFlags {
+ NON_LINEAR = 0b0001,
+ TIME_VARIANT = 0b0010,
+ FREQUENCY_DEPENDENT = 0b0100,
+ };
+
+ ModuleFlags flags = FREQUENCY_DEPENDENT;
+
+ virtual void init() {}
+ virtual string describe() const { return ""s; }
+
+ spx_module(sc_module_name name)
+ : sc_module(name)
+ {}
+}; \ No newline at end of file