29 class PrototypeTiming;
44 explicit Timing(std::string name,
unsigned seed,
const SimId id = 0)
noexcept;
68 [[nodiscard]] std::string
getName() const noexcept {
return _name; }
76 [[nodiscard]]
SimId getId() const noexcept {
return _id; }
83 [[nodiscard]]
unsigned getSeed() const noexcept {
return _seed; }
90 [[nodiscard]]
bool getSyncOnPulse() const noexcept {
return _sync_on_pulse; }
116 [[nodiscard]]
bool isEnabled() const noexcept {
return _enabled && _model && _model->enabled(); }
149 [[nodiscard]] std::unique_ptr<Timing>
clone()
const;
154 bool _enabled{
false};
155 std::unique_ptr<noise::ClockModelGenerator> _model{
nullptr};
156 std::vector<RealType> _alphas;
157 std::vector<RealType> _weights;
161 bool _sync_on_pulse{
false};
163 const PrototypeTiming* _prototype{
nullptr};
Manages timing properties such as frequency, offsets, and synchronization.
Represents a timing source for simulation.
unsigned getSeed() const noexcept
Gets the initial seed used for the timing source's RNG.
Timing & operator=(Timing &&)=delete
std::string getName() const noexcept
Gets the name of the timing source.
void reset() noexcept
Resets the timing model.
Timing & operator=(const Timing &)=delete
void initializeModel(const PrototypeTiming *timing) noexcept
Initializes the timing model.
RealType getNextSample() const noexcept
Gets the next sample from the timing source.
void skipSamples(std::size_t samples) noexcept
Skips a number of samples in the timing model.
RealType getFreqOffset() const noexcept
Gets the frequency offset of the timing source.
bool getSyncOnPulse() const noexcept
Checks if the timing source synchronizes on pulse.
bool isEnabled() const noexcept
Checks if the timing source is enabled.
RealType getFrequency() const noexcept
Gets the frequency of the timing source.
Timing(const Timing &)=delete
RealType getPhaseOffset() const noexcept
Gets the phase offset of the timing source.
SimId getId() const noexcept
Gets the unique ID of the timing source.
std::unique_ptr< Timing > clone() const
Creates a new Timing instance based on the same prototype.
Global configuration file for the project.
double RealType
Type for real numbers.
Header file for noise generator classes.
uint64_t SimId
64-bit Unique Simulation ID.