ipbus/ipbus-firmware

Typo-bug in clocks*.vhd

Closed this issue · 2 comments

Hi,

It looks as if the assignments of the clkin1_period generic in severeal of the clocks*.vhd files in ipbus_util are not completely correct.

For example: https://github.com/ipbus/ipbus-firmware/blob/master/components/ipbus_util/firmware/hdl/clocks/clocks_usp_serdes.vhd#L104

The statement currently reads:
clkin1_period => CLK_VCO_FREQ / CLK_FR_FREQ
which is numerically correct, but not because this has anything to with CLK_VCO_FREQ.
The correct statement should read:
clkin1_period => 1000.0 / CLK_FR_FREQ
where the factor 1000.0 converts the period value to nanoseconds.

At first glance this same issue is present in the following files:

  • clocks_7s_extphy.vhd
  • clocks_7s_extphy_se.vhd
  • clocks_7s_serdes.vhd
  • clocks_us_serdes.vhd
  • clocks_usp_serdes.vhd

Cheers,
Jeroen

Hi,

Good point! I've pushed the fix to branch bug/127-clocks-period-typo, will merge that branch in ASAP, and create a new release next week.

Cheers,
Tom

Note: This fix has been included in the v1.6 tag that was created earlier today.