diff options
| author | Clément Zrounba <clement.zrounba@ec-lyon.fr> | 2023-12-07 10:47:23 +0000 |
|---|---|---|
| committer | Clément Zrounba <clement.zrounba@ec-lyon.fr> | 2023-12-07 10:48:56 +0000 |
| commit | 0e4b33a965e8eabb687ba07580be749e5f0ffe4c (patch) | |
| tree | c5dfd6564a6b8809dd23aba06e5b165af7bbe766 /src/specs.cpp | |
| parent | 4b1c60c90936b52093d287f59eb118f93bc82407 (diff) | |
| download | specs-0e4b33a965e8eabb687ba07580be749e5f0ffe4c.tar.gz specs-0e4b33a965e8eabb687ba07580be749e5f0ffe4c.zip | |
Add power meter element to measure DC optical power
This device replaces photodetector in cases where the DC power should be
measured efficiently, without considering realistic effects (bandwidth,
noise, responsivity...).
* Syntax in netlist: `PWRnnnn <optical net>`
* Parameters: none
Diffstat (limited to 'src/specs.cpp')
| -rw-r--r-- | src/specs.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/specs.cpp b/src/specs.cpp index c58fd10..7e2ccfb 100644 --- a/src/specs.cpp +++ b/src/specs.cpp @@ -12,6 +12,7 @@ #include <cw_source.h> #include <probe.h> #include <detector.h> +#include <power_meter.h> #include <generic_transmission_device.h> using std::string; @@ -303,7 +304,13 @@ void SPECSConfig::applyDefaultTraceFileToAllSignals() { string detname = pdet->name(); cout << detname << endl; pdet->trace(default_trace_file); - //sc_trace(default_trace_file, , (string(pdet->name()) + ".readout").c_str()); + } + + auto all_pwr_meters = sc_get_all_object_by_type<PowerMeter>(); + for (auto &pwr_meter: all_pwr_meters) { + string pwr_meter_name = pwr_meter->name(); + cout << pwr_meter_name << endl; + pwr_meter->trace(default_trace_file); } } |
