entropy_generator

Generate one entropy lane from a noise source, decorrelator, health tests, and auto-tune.

Combines a TOTAL_LENGTH/TAPPED_LENGTH ring oscillator sampled on sample_clk_i with decorrelation and Repetition/APT/Markov tests.

Controls:

  • auto_tune_enable_i lets health failures retune detune through the tune FSM; detune_ro_i forces detune.
  • bypass_decorrelator_i and entropy_byte_mask_i configure the decorrelator; sample_clk_div_i sets its downsample.
  • test_enable_i and the limit/threshold inputs program the three health tests; window_wrap_pulse_i closes each window.

count_err_o is this lane's health-test counter-disagreement error.

Parameters

Table 1. Parameters
NameTypeDefaultDescription
TOTAL_LENGTHint unsigned17Full ring-oscillator stage count.
TAPPED_LENGTHint unsigned13Stage count of the shorter feedback tap, used while detune is low.
CLKDIV_WIDTHint unsigned24Downsample divider counter width.

Ports

Table 2. Ports
NameDirectionTypeDescription
clk_iinputlogicSystem clock.
rst_niinputlogicActive-low asynchronous reset.
sample_clk_iinputlogicRing-oscillator sample clock.
enable_iinputlogicEnables the noise ring oscillator and the decorrelator.
auto_tune_enable_iinputlogicHigh lets the tune FSM drive the ring detune in place of detune_ro_i.
detune_ro_iinputlogicManual ring detune while auto-tune is off: high selects the full TOTAL_LENGTH feedback path, low the shorter tap.
sample_clk_div_iinputlogic [CLKDIV_WIDTH-1:0]Decorrelator downsample period minus one, in clk_i cycles.
bypass_decorrelator_iinputlogicHigh removes the decorrelator XOR feedback.
entropy_byte_mask_iinputlogic [7:0]AND mask on each decorrelator output byte.
test_enable_iinputlogic [2:0]Health-test enables: bit 0 repetition, bit 1 APT, bit 2 Markov.
repetition_limit_iinputlogic [7:0]Repetition-count failure threshold.
proportion_limit_1bit_iinputlogic [15:0]APT high threshold on the per-bit ones count per window.
proportion_limit_lo_iinputlogic [15:0]APT low threshold on the per-bit ones count per window.
markov_prob_01_threshold_iinputlogic [15:0]Markov high threshold on the per-bit 01/10 pair count per window.
markov_prob_10_threshold_iinputlogic [15:0]Markov low threshold on the per-bit 01/10 pair count per window.
window_wrap_pulse_iinputlogicShared end-of-window strobe that evaluates and restarts the APT and Markov tests.
noise_bit_monitor_ooutputlogicSynchronized noise-source bit, for debug observation.
test_status_ooutputlogic [7:0]Health-test status byte, encoded as entropy_health_test status_o.
entropy_byte_ooutputlogic [7:0]Masked decorrelator output byte.
entropy_byte_valid_ooutputlogicSingle-cycle strobe marking a new entropy_byte_o.
count_err_ooutputlogicRedundant-counter fault in this lane's health tests.