phy: Fix rounding error for NLP timeout

This commit is contained in:
Markus Koch 2022-01-22 20:47:47 +01:00
parent 76eaff20fd
commit 6f8bb7ba54
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ begin
-- -------------------------------------------------------------------------
transmitter : block
constant TX_STB_CNT_MAX : integer := F_CLK / (F_ETH * 2) - 1;
constant TX_STB_CNT_MAX : integer := integer(round(real(F_CLK) / real((F_ETH * 2)))) - 1;
signal tx_stb_cnt : integer range 0 to TX_STB_CNT_MAX;
type tx_state_t is (IDLE, NLP, TX, IPG);