A master-mode digital-audio serial controller you drop into your SoC
The Zen I2S is a master-mode digital-audio serial controller a client instantiates to move stereo audio between software and an external codec. It generates the bit clock and word-select, serializes software-supplied samples onto the data line, and deserializes the return line into a receive FIFO — in classic I2S, left-justified, or right-justified framing. Product / integrator view; every number is sourced from the product datasheet or marked TBC with an owner.
1. Zen I2S in one paragraph
The Zen I2S is the clock master of the audio link: from the SoC clock and a programmable divider it generates the bit clock (BCLK) and the word-select (LRCLK/WS) that frame left and right channels, so the attached codec simply follows. Software pushes stereo samples through a write register into a TX FIFO; the controller serializes them MSB-first onto the data-out line in the selected framing format. The return line is deserialized into an RX FIFO that software drains through a read register. TX and RX share one bit-placement rule, so a bit sent at a given position returns at the same position — making a software loopback byte-exact independent of the codec.
- Zen I2S controller
- host bus / audio codec
- TX / RX sample FIFOs
2. What it is, at a glance
| Element | Detail | Default | Status |
|---|---|---|---|
| Mode | master only — drives BCLK + word-select | — | exists |
| Framing formats | classic I2S / left-justified / right-justified | — | exists |
| Word length | 16 / 24 / 32-bit, software-selected | — | exists |
| Channels | stereo — L + R, alternating per word-select | stereo | exists |
| TX / RX sample FIFOs | one each; parameterized depth | 8 | exists |
| BCLK generation | SoC clock ÷ programmable divider | — | exists |
| Interrupts | one aggregated line; tx/rx-threshold + under/overrun | — | exists |
| Host attach | native 32-bit peripheral bus, 1-cycle ready handshake | — | exists |
| Byte-exact TX→RX loopback | shared bit-placement rule, codec-independent | — | exists |
| Max sample rate @ node | function of clock, divider, word length | TBC | TBC |
Sources: Zen I2S product datasheet; as-built RTL.
3. How a client uses it
- Instantiate the controller and attach it to your peripheral bus; wire the three serial lines (data out, data in, BCLK/word-select) to the codec and the interrupt line to your controller.
- Configure framing format, word length, and the BCLK divider for your target sample rate through the control registers, then enable TX and/or RX.
- Stream stereo samples: write left-then-right into the TX register to play; read left-then-right from the RX register to capture. A short deterministic priming makes real data byte-exact from the first word.
- Service on interrupt — the aggregated line fires on TX-threshold, RX-threshold, underrun, or overrun; enable only the sources you want and clear the sticky error flags on read.
4. Verification & provenance
- Byte-exact checking: an assertion-based compliance suite verifies BCLK/word-select timing, TX serialize and RX deserialize for every format, and byte-exact TX→RX loopback — all 18 tests passing.
- Coverage: all three framing formats, all three word lengths, FIFO ordering, and the under/overrun flags with interrupt-enable gating. An edge-accurate codec model stands in for a real follower during test.
- Confidence: the suite was independently re-run on a fresh copy during review; two real issues surfaced and were fixed, with RTL correctness confirmed byte-exact. Synthesis is latch-clean.
- Delivery: parameterized RTL, the codec verification model, the 18-test compliance suite, and integration docs. Internal soft-license by default; license-ready for external use.
Sources: Zen I2S product datasheet; as-built RTL.