axi_hang_detector
Detect stalled AXI traffic and raise a level interrupt when a hang persists.
Monitors an AXI bus via an internally instantiated prim_axi_snoop. Counts cycles with outstanding transactions and no completion; when the counter reaches the SW-programmable threshold, asserts irq_o. The threshold is loaded whenever the detector is disabled, the bus is idle or a transaction completes, so a new value takes effect at the next stall window, and a threshold of zero disables detection. irq_o is a direct combinational level with no status latch, gated by enable_i and irq_en_i. irq_test_i forces irq_o high for firmware bring-up without a real bus stall, while enable_i and irq_en_i are set. Configuration inputs are in the clk_i domain; in smc_base they come from the smc_base_config register block.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
OUTSTANDING_TX | int unsigned | 6 | Max outstanding tracked by the snoop. |
Ports
| Name | Direction | Type | Description |
|---|---|---|---|
clk_i | input | logic | System clock. |
rst_ni | input | logic | Async reset, active-low. |
snoop_aw_valid_i | input | logic | Snooped AW valid (same as prim_axi_snoop). |
snoop_aw_ready_i | input | logic | Snooped AW ready. |
snoop_w_valid_i | input | logic | Snooped W valid. |
snoop_b_valid_i | input | logic | Snooped B valid. |
snoop_b_ready_i | input | logic | Snooped B ready. |
snoop_ar_valid_i | input | logic | Snooped AR valid. |
snoop_ar_ready_i | input | logic | Snooped AR ready. |
snoop_r_valid_i | input | logic | Snooped R valid. |
snoop_r_ready_i | input | logic | Snooped R ready. |
snoop_r_last_i | input | logic | Snooped R last. |
enable_i | input | logic | CTRL.enable; detector enable. Low reloads the counter and holds irq_o low. |
irq_en_i | input | logic | CTRL.irq_en; interrupt enable. |
irq_test_i | input | logic | CTRL.irq_test; forces irq_o while enable_i and irq_en_i are set. |
threshold_i | input | logic [19:0] | TIMEOUT_THRESHOLD.value; stalled clk_i cycles before irq_o asserts; zero disables detection. |
bus_active_o | output | logic | Pass-through bus_active from the snoop. |
irq_o | output | logic | Hang interrupt as a direct combinational level. Asserts when enable_i and irq_en_i are set and either the stall counter reaches threshold_i or irq_test_i is set. |