Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Ethernet low-power idle entry timer

Hardware interview practice

Ethernet low-power idle entry timer

MediumLow PowerSystemVerilog

A port may request low-power idle after sixteen consecutive idle cycles and must cancel immediately when traffic returns. Write synthesizable SystemVerilog for the timer and request.

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Starting point

Question code

input logic clk, rst_n;
input logic tx_active, lpi_ack;
output logic lpi_req;
Reviewed example

Work through one case

Input
tx_active remains 0 for sixteen consecutive rising edges after reset and lpi_ack remains 0.
Expected output
lpi_req is 0 through the fifteenth edge and becomes 1 on the sixteenth edge.

The saturating counter records only consecutive idle edges and asserts the sticky request exactly at the threshold.

What to cover

Requirements

  1. Count consecutive rising edges with tx_active=0; any edge with tx_active=1 clears the count and lpi_req.
  2. Assert lpi_req immediately after the sixteenth consecutive idle edge and hold it until a valid acknowledgement or returning traffic.
  3. Honor lpi_ack only when lpi_req was already high and tx_active=0; otherwise ignore it and keep counting. If tx_active and lpi_ack coincide, traffic cancellation has priority.
  4. Synchronous active-low reset clears the counter and request; saturate the counter rather than wrapping.
Continue practicing

Related questions

Low PowerProve retention across a power cycle→Low PowerSequence retention, isolation, power switch, and restore→Low PowerChoose a low-power technique for a short idle interval→
asic.fyi · Learn silicon end to end.info@asic.fyi