ipbus / ipbus-firmware

Firmware that implements a reliable high-performance control link for particle physics electronics, based on the IPbus protocol
https://ipbus.web.cern.ch
Other
39 stars 31 forks source link

Frequency counter with separate reference clock #219

Closed tswilliams closed 1 year ago

tswilliams commented 1 year ago

This is a refactorisation of merge request #217 from @jhegeman - the separate reference clock is now supported in a new entity ipbus_freq_ctr_adv, which has a syncreg rather than a plain ctrlreg since typically the reference clock would be unrelated to the IPbus clock.

Original description from !217:

Recent experience shows that the exact frequency of the IPBus clock differs from board to board. This is no surprise, really, because this clock tends to be derived from PCIe, AXI, etc. clocks which are not necessarily very precise. It has a visible effect, though, on the frequencies reported by ipbus_freq_ctr, which uses the IPBus clock as reference.

The current modification adds a separate reference clock input to ipbus_freq_ctr, so that a more precise clock can be used if so desired.

NOTE: This does imply an interface change. There now is a new input port clk_ref to be connected.

tswilliams commented 1 year ago

Run tests, please