#ifndef OT_SDC_SDC_HPP_ #define OT_SDC_SDC_HPP_ #include #include namespace ot::sdc { // Function: home std::filesystem::path home(); // SetInputDelay struct SetInputDelay { inline static constexpr auto command = "set_input_delay"; std::string clock; std::optional clock_fall; std::optional level_sensitive; std::optional add_delay; std::optional network_latency_included; std::optional source_latency_included; std::optional min; std::optional max; std::optional rise; std::optional fall; std::optional delay_value; std::optional port_pin_list; SetInputDelay() = default; SetInputDelay(const Json&); }; // ------------------------------------------------------------------------------------------------ // SetInputTransition // Set a fixed transition on input or inout ports struct SetInputTransition { inline static constexpr auto command = "set_input_transition"; std::string clock; std::optional min; std::optional max; std::optional rise; std::optional fall; std::optional clock_fall; std::optional transition; std::optional port_list; SetInputTransition() = default; SetInputTransition(const Json&); }; // ------------------------------------------------------------------------------------------------ // SetOutputDelay struct SetOutputDelay { inline static constexpr auto command = "set_output_delay"; std::string clock; std::optional clock_fall; std::optional level_sensitive; std::optional rise; std::optional fall; std::optional max; std::optional min; std::optional add_delay; std::optional network_latency_included; std::optional source_latency_included; std::optional delay_value; std::optional port_pin_list; SetOutputDelay() = default; SetOutputDelay(const Json&); }; // ------------------------------------------------------------------------------------------------ // SetLoad struct SetLoad { inline static constexpr auto command = "set_load"; std::optional min; std::optional max; std::optional subtract_pin_load; std::optional pin_load; std::optional wire_load; std::optional value; std::optional objects; SetLoad() = default; SetLoad(const Json&); }; // ------------------------------------------------------------------------------------------------ // CreateClock struct CreateClock { inline static constexpr auto command = "create_clock"; std::optional period; std::optional add; std::string name; std::string comment; std::optional> waveform; std::optional port_pin_list; CreateClock() = default; CreateClock(const Json&); }; // ------------------------------------------------------------------------------------------------ // Class: SetClockUncertainty struct SetClockUncertainty { inline static constexpr auto command = "set_clock_uncertainty"; std::optional uncertainty; std::optional object_list; SetClockUncertainty() = default; SetClockUncertainty(const Json&); }; // ------------------------------------------------------------------------------------------------ using Command = std::variant< SetInputDelay, SetInputTransition, SetOutputDelay, SetLoad, CreateClock >; // ------------------------------------------------------------------------------------------------ // Class: SDC struct SDC { std::vector commands; void read(const std::filesystem::path&); }; }; // end of namespace ot::sdc. ------------------------------------------------------------------ #endif