[prim_alert_sender] Simplify sender and clear ping req upon sigint
This simplifies the sender state machine and removes the explicit SigInt
state. It also simplifies the response behavior which so far toggled the
alert lines during a signal integrity error. The new behavior is that
the alert diff pair is just pulled to zero in case of a signal integrity
alert, thereby simplifying the protocol.
Further, for the in-band alert channel reset feature, we intend to leverage
sigint errors on the ping/ack lines to re-initialize the sender FSM and
clear any pending ping requests on the sender side.
This change makes sure that upon deassertion of a sigint condition, we
actually clear the ping request set-reg.
Signed-off-by: Michael Schaffner <msf@google.com>
diff --git a/hw/ip/prim/rtl/prim_alert_sender.sv b/hw/ip/prim/rtl/prim_alert_sender.sv
index f3d7d5b..b33c1a7 100644
--- a/hw/ip/prim/rtl/prim_alert_sender.sv
+++ b/hw/ip/prim/rtl/prim_alert_sender.sv
@@ -131,7 +131,6 @@
AlertHsPhase2,
PingHsPhase1,
PingHsPhase2,
- SigInt,
Pause0,
Pause1
} state_e;
@@ -234,34 +233,22 @@
Pause0: begin
state_d = Pause1;
end
-
// clear and ack alert request if it was set
Pause1: begin
state_d = Idle;
end
-
- // we have a signal integrity issue at one of
- // the incoming diff pairs. this condition is
- // signalled by setting the output diffpair
- // to the same value and continuously toggling
- // them.
- SigInt: begin
- state_d = Idle;
- if (sigint_detected) begin
- state_d = SigInt;
- alert_pd = ~alert_pq;
- alert_nd = ~alert_pq;
- end
- end
// catch parasitic states
default : state_d = Idle;
endcase
- // bail out if a signal integrity issue has been detected
- if (sigint_detected && (state_q != SigInt)) begin
- state_d = SigInt;
+
+ // we have a signal integrity issue at one of the incoming diff pairs. this condition is
+ // signalled by setting the output diffpair to zero. If the sigint has disappeared, we clear
+ // the ping request state of this sender and go back to idle.
+ if (sigint_detected) begin
+ state_d = Idle;
alert_pd = 1'b0;
alert_nd = 1'b0;
- ping_clr = 1'b0;
+ ping_clr = 1'b1;
alert_clr = 1'b0;
end
end