From ff9b8bb838ecdfbfc1dc81038fcf3b2a87636982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Zrounba?= <6691770+clement-z@users.noreply.github.com> Date: Sat, 30 Sep 2023 23:06:01 +0200 Subject: Initial release --- src/devices/spx_module.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/devices/spx_module.h (limited to 'src/devices/spx_module.h') 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 +#include + +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 -- cgit v1.2.3