Program Listing for File HSGraphClock.h¶
↰ Return to documentation for file (src/sta/HSGraphClock.h)
#pragma once
#include <string>
#include "HSBaseObj.h"
using std::string;
namespace HSFullTiming {
// The HSGraphClock class represents a clock in the timing graph.
// It inherits from HSBaseObj to include an ID.
class HSGraphClock : public HSBaseObj { // connect to topPort or connect to
// user define clk portRef
public:
// Default constructor.
HSGraphClock();
// Destructor.
~HSGraphClock();
// Gets the period of the clock.
// @return The period of the clock.
float getPeriod() const;
// Gets the name of the clock.
// @return The name of the clock.
string getClkName() const;
// Gets the port name of the clock.
// @return The port name of the clock.
string getClkPortName() const;
// Sets the period of the clock.
// @param period The period to set.
void setPeriod(float period);
// Sets the name of the clock.
// @param clkName The name to set.
void setClkName(const string &clkName);
// Sets the port name of the clock.
// @param portName The port name to set.
void setClkPortName(const string &portName);
private:
// The period of the clock.
float m_period = 0.0;
// The name of the clock.
string m_clkName;
// The port name of the clock.
string m_portName;
};
} // namespace HSFullTiming