Issue List
wrong comment about baud_limit in line9 in baud_gen.v file #10
Open easytogogo opened this issue almost 3 years ago
easytogogo commented almost 3 years ago

In file baud_gen.v line 9, written "baud_limit = (global_clock_freq / gcd(global_clock_freq, 16baud_rate)) - baud_freq"; I think it should be "baud_limit = (global_clock_freq / gcd(global_clock_freq, 16baud_rate))",is it right? if not,can you explain the formula? thank you!

motilito was assigned almost 3 years ago
motilito commented almost 3 years ago

Actually, the formula in the calculation is correct. The subtraction of "baud_freq" is due to the condition in the "counter" variable on line 36 of the same module. The "counter" gets assigned a value greater than "baud_limit" and then decreased by "baud_limit".