generate-prn-noise

CLI reference

glasgow run generate-prn-noise

Generates pseudo-random binary noise at 384 Mcps effective chip rate on a single GPIO pin. Uses a 31-bit maximal-length LFSR (x^31 + x^28 + 1, Galois form) running at 192 MHz with DDR output (2 chips per clock via SB_IO posedge/negedge).

The on-board 33 Ohm series resistor and parasitic capacitance form a low-pass channel; calibrate source flatness by measuring the output directly before inserting the DUT.

For audio-frequency work, the on-board series resistor can be combined with an external 240 nF film capacitor to ground to form a ~20 kHz single-pole low-pass filter. The filtered output closely approximates Additive White Gaussian Noise (AWGN): each filter time constant integrates ~19,200 chips, giving near-Gaussian amplitude distribution via the central limit theorem.

LFSR period: 2^31 - 1 = 2,147,483,647 chips (~5.6 s at 384 Mcps).

PLL: 48 MHz x16 / 4 = 192 MHz (VCO = 768 MHz), DDR -> 384 Mcps.

Example:

glasgow run generate-prn-noise --voltage B=3.3 --out B0 start
usage: glasgow run generate-prn-noise [-h] [-V SPEC] [--out PIN] OPERATION ...
-h, --help

show this help message and exit

-V <spec>, --voltage <spec>

configure I/O port voltage to SPEC (e.g.: ‘3.3’, ‘A=5.0,B=3.3’, ‘A=SA’)

--out <pin>

bind the applet I/O line ‘out’ to PIN (default: ‘A0’, required)

glasgow run generate-prn-noise start

usage: glasgow run generate-prn-noise start [-h]
-h, --help

show this help message and exit

glasgow run generate-prn-noise stop

usage: glasgow run generate-prn-noise stop [-h]
-h, --help

show this help message and exit

API reference

class glasgow.applet.measure.prn_noise.PRNNoiseInterface(*, logger, pipe)

Host-side interface for the PRN noise source.

async start(seed=_DEFAULT_SEED)

Start the LFSR noise output.

Zero seeds are clamped to 1 by the gateware.

async stop()

Stop noise output (hold pin low).