mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
With the new PLL implementation, switching to a deeper window size returns the Acorn tape parser to: working.
This commit is contained in:
parent
ba83dfd454
commit
e71d13c090
@ -61,8 +61,10 @@ void DigitalPhaseLockedLoop::post_phase_offset(int phase, int offset) {
|
||||
total_divisor += multiple;
|
||||
total_spacing += offset;
|
||||
}
|
||||
if(total_divisor) {
|
||||
window_length_ = total_spacing / total_divisor;
|
||||
window_length_ = std::max(std::min(window_length_, clocks_per_bit_ + tolerance_), clocks_per_bit_ - tolerance_);
|
||||
}
|
||||
|
||||
int error = phase - (window_length_ >> 1);
|
||||
|
||||
|
@ -160,7 +160,7 @@ template <typename SymbolType> class PLLParser:
|
||||
/// Instantiates a new parser with the supplied @c tape.
|
||||
PLLParser(int clock_rate, int clocks_per_bit, int tolerance) :
|
||||
clock_rate_(clock_rate),
|
||||
pll_(clocks_per_bit, tolerance, 3),
|
||||
pll_(clocks_per_bit, tolerance, 15),
|
||||
input_bit_counter_(0),
|
||||
input_pattern_(0),
|
||||
was_high_(false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user