mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 01:31:42 +00:00
Ensures complete DPLL initial state assignment.
This commit is contained in:
parent
2d7a4fe5f0
commit
7f2febeec9
@ -13,13 +13,9 @@
|
||||
using namespace Storage;
|
||||
|
||||
DigitalPhaseLockedLoop::DigitalPhaseLockedLoop(int clocks_per_bit, size_t length_of_history) :
|
||||
clocks_per_bit_(clocks_per_bit),
|
||||
phase_(0),
|
||||
window_length_(clocks_per_bit),
|
||||
offset_history_pointer_(0),
|
||||
offset_history_(length_of_history, 0),
|
||||
offset_(0),
|
||||
delegate_(nullptr) {}
|
||||
window_length_(clocks_per_bit),
|
||||
clocks_per_bit_(clocks_per_bit) {}
|
||||
|
||||
void DigitalPhaseLockedLoop::run_for(const Cycles cycles) {
|
||||
offset_ += cycles.as_int();
|
||||
|
@ -50,20 +50,20 @@ class DigitalPhaseLockedLoop {
|
||||
}
|
||||
|
||||
private:
|
||||
Delegate *delegate_;
|
||||
Delegate *delegate_ = nullptr;
|
||||
|
||||
void post_phase_offset(int phase, int offset);
|
||||
|
||||
std::vector<int> offset_history_;
|
||||
size_t offset_history_pointer_;
|
||||
int offset_;
|
||||
size_t offset_history_pointer_ = 0;
|
||||
int offset_ = 0;
|
||||
|
||||
int phase_;
|
||||
int window_length_;
|
||||
bool window_was_filled_;
|
||||
int phase_ = 0;
|
||||
int window_length_ = 0;
|
||||
bool window_was_filled_ = false;
|
||||
|
||||
int clocks_per_bit_;
|
||||
int tolerance_;
|
||||
int clocks_per_bit_ = 0;
|
||||
int tolerance_ = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user