ltssm/PollingFSM: add with_timers parameters

Being able to disable the timers can be useful for bringup tests
This commit is contained in:
Florent Kermarrec 2019-11-07 13:55:32 +01:00
parent 940fb216f9
commit a024ad2d62

View File

@ -165,7 +165,7 @@ class RXDetectFSM(FSM):
@ResetInserter()
class PollingFSM(Module):
""" Polling Finite State Machine (section 7.5.4)"""
def __init__(self, serdes, lfps_unit, ts_unit, sys_clk_freq):
def __init__(self, serdes, lfps_unit, ts_unit, sys_clk_freq, with_timers=True):
self.idle = Signal()
self.exit_to_compliance = Signal()
self.exit_to_rx_detect = Signal()
@ -197,7 +197,7 @@ class PollingFSM(Module):
# LFPS State (7.5.4.3) ---------------------------------------------------------------------
fsm.act("Polling.LFPS",
_360_ms_timer.wait.eq(1),
_360_ms_timer.wait.eq(with_timers),
lfps_unit.tx_polling.eq(1),
# Go to ExitToCompliance when:
# - 360ms timer is expired.
@ -232,7 +232,7 @@ class PollingFSM(Module):
# Active State (7.5.4.5) -------------------------------------------------------------------
fsm.act("Polling.Active",
_12_ms_timer.wait.eq(1),
_12_ms_timer.wait.eq(with_timers),
ts_unit.rx_enable.eq(1),
ts_unit.tx_enable.eq(1),
ts_unit.tx_ts1.eq(1),