OpticalModulator.h revision 10447
16167SN/A#ifndef __DSENT_MODEL_OPTICALGRAPH_OPTICALMODULATOR_H__ 26167SN/A#define __DSENT_MODEL_OPTICALGRAPH_OPTICALMODULATOR_H__ 36167SN/A 48835SAli.Saidi@ARM.com#include "model/optical_graph/OpticalNode.h" 57935SN/A#include "util/CommonType.h" 67935SN/A 77935SN/Anamespace DSENT 86167SN/A{ 96167SN/A class OpticalTransmitter; 106167SN/A 119469Snilay@cs.wisc.edu class OpticalModulator : public OpticalNode 128835SAli.Saidi@ARM.com { 139183Shestness@cs.wisc.edu public: 148835SAli.Saidi@ARM.com OpticalModulator(const String& instance_name_, OpticalModel* model_, const WavelengthGroup& wavelengths_, bool opt_loss_, OpticalTransmitter* transmitter_); 158835SAli.Saidi@ARM.com ~OpticalModulator(); 168835SAli.Saidi@ARM.com 176928SN/A public: 189469Snilay@cs.wisc.edu // Set losses 198721SN/A void setLosses(double IL_dB_, double ER_dB_); 208721SN/A // Tell the modulator to set a new insertion loss and extinction ratio 218835SAli.Saidi@ARM.com bool setModulatorSpec(double IL_dB_, double ER_dB_); 228835SAli.Saidi@ARM.com // Get modulator insertion loss 237935SN/A double getInsertionLoss() const; 247935SN/A // Get modulator extinction ratio 257935SN/A double getExtinctionRatio() const; 267935SN/A // Ask whether the model is able to optimize for insertion loss 277935SN/A // and extinction ratios 287935SN/A bool canOptimizeLoss() const; 297935SN/A // Ask the modulator for its power at a given utilization 308983Snate@binkert.org double getPower(double util_) const; 316167SN/A 326167SN/A private: 336167SN/A // Disable copy constructor 349469Snilay@cs.wisc.edu OpticalModulator(const OpticalModulator& node_); 359481Snilay@cs.wisc.edu 366167SN/A private: 376928SN/A // Optical sender of the modulator 386167SN/A OpticalTransmitter* m_transmitter_; 396167SN/A // Insertion loss of the modulator 408835SAli.Saidi@ARM.com double m_insertion_loss_; 416167SN/A // Extinction ratio of the modulator 426167SN/A double m_extinction_ratio_; 436167SN/A // Whether the modulator can be optimized 446167SN/A bool m_opt_loss_; 458835SAli.Saidi@ARM.com 469469Snilay@cs.wisc.edu }; 476167SN/A 486167SN/A} // namespace DSENT 496167SN/A 506167SN/A#endif // __DSENT_MODEL_OPTICALGRAPH_OPTICALMODULATOR_H__ 516167SN/A 526167SN/A