
Author: Pedro Rito. This design was generated with AI assistance using Grok Bot.
Tiny Graphic EQ is a 4-band graphic audio equalizer for a Tiny Tapeout SKY130 1×1 tile. It is an I2S master for the Digilent Pmod I2S2 (CS4344 DAC and CS5343 ADC).
The design assumes a 25 MHz clock. From that clock it generates:
Samples are 16-bit, standard I2S (one-SCLK delay) in 32-bit slots. The mono signal is the average of the left and right ADC channels; the same processed sample is sent back on both DAC channels.
The equalizer is a complementary bank of first-order low-pass sections with multiplierless (shift-add) updates and a single shared adder. The internal datapath is 10 bits (the 10 most significant bits of each 16-bit sample; the six LSBs of the DAC word are zero). This is a wider trial versus the 8-bit design on main; envelope metering is kept narrow to help the 1×1 place-and-route. With a 48.828 kHz sample rate the crossover coefficients k = 6, 3, 1 place the splits at about 122 Hz, 1.04 kHz and 5.39 kHz. The four bands are:
ui_in[3:0] are the band enables (DIP switches on the Tiny Tapeout demo board). Any combination may be on at once. With all four enables on, the bands sum back to the (10-bit truncated) input, so the path is a passthrough. With all four off, the output is silent.
The 7-segment display on uo_out shows only the output volume, as a number 1–9. The meter is a 10-bit peak envelope of the processed sample's MSBs (absolute value, with a slow per-sample decay of env>>8, about 5 ms at 48.8 kHz). The number is a log mapping by the highest set bit of that envelope: the MSB → 9, then 8, …, down eight bits to 1. Below that the display is blank. The decimal point is off. uo_out[6:0] are segments a–g and uo_out[7] is the decimal point, matching the Tiny Tapeout 7-segment convention.
info.yaml.ui_in[3:0] on. You should hear a passthrough of the input, and the 7-segment display should show a volume 1–9 that follows the signal level (blank when quiet).A WAV-file RTL simulation (Icarus, over the real I2S pins) is documented in test/wav/README.md.
uio), plus a line-level source and headphones (or a line-out amplifier).| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | BAND0_EN (low) | SEG_A | DAC_MCLK |
| 1 | BAND1_EN (low-mid) | SEG_B | DAC_LRCK |
| 2 | BAND2_EN (high-mid) | SEG_C | DAC_SCLK |
| 3 | BAND3_EN (high) | SEG_D | DAC_SDIN |
| 4 | SEG_E | ADC_MCLK | |
| 5 | SEG_F | ADC_LRCK | |
| 6 | SEG_G | ADC_SCLK | |
| 7 | SEG_DP | ADC_SDOUT |