
This chip multiplies two 2×2 matrices using eight-bit integer arithmetic, with results modulo 256. It is the integer implementation of MMAlpha Design02. There are four processing elements, one per result: C11, C12, C21 and C22. Each PE contains a five-stage multiplier, a combinational adder and an accumulator register. The chip occupies two Tiny Tapeout tiles and is timed for 50 MHz.
The project includes both integer and FP8 implementations. Integer was selected for the shuttle to use two tiles instead of four; the floating-point RTL and tests remain in the repository.
The board sends eight matrix values one byte at a time. The input buffer then feeds four operands per clock to the array for two clocks. Seven clocks after the last write, all four results are stored and can be read one byte at a time.
| Pins | Direction at the chip | Meaning |
|---|---|---|
| UI[7:0] | Input | Integer input byte |
| UO[7:0] | Output | Selected integer result, or zero when VALID is low |
| UIO0 | Input | WRITE: load a byte on a rising edge while READY is high |
| UIO[2:1] | Input | SELECT: 0 = C11, 1 = C12, 2 = C21, 3 = C22 |
| UIO[5:3] | Unused | Inputs ignored; chip output drivers disabled |
| UIO6 | Output | READY: another input byte can be accepted |
| UIO7 | Output | VALID: all four result bytes are available |
The board drives UIO0–2 with mask 0x07; the chip drives UIO6–7 with mask 0xC0. During reset or deselection, the chip releases all UIO pins. The separate clk and rst_n pins provide the clock and active-low reset. Apply reset through at least one rising edge.
Write A11, A21, B11, B12, A12, A22, B21, B22 in that order. Each rising edge with READY and WRITE high accepts one byte. WRITE low pauses a partial frame.
After the eighth write, READY goes low. Writes while busy are ignored. On the seventh rising edge after that write, READY and VALID go high together. Keep WRITE low and select the four results using UIO[2:1]. Selection needs no clock; allow the output to settle before reading. The next accepted write clears VALID. A reset or deselection sampled on a rising edge discards the transaction. Always apply a clocked reset after selecting the project.
Inputs are bytes from 0 through 255. Multiplication and addition keep the low eight bits, giving arithmetic modulo 256. There is no saturation or floating-point decoding. For example, 255 × 255 gives 1 modulo 256, and adding two such products gives 2. Each accumulator starts at zero.
The repository's board/bringup.py runs five integer examples: zero, identity, an asymmetric matrix pair, row swapping and wraparound. The same transactions pass in RTL and gate simulation. The script requires matching shuttle firmware exposing tt_um_mmalpha.
For a first manual test:
0x07. Hold reset low and WRITE low through a rising edge, then release reset. Expect READY high, VALID low and zero data.| Entry | A11 | A21 | B11 | B12 | A12 | A22 | B21 | B22 |
|---|---|---|---|---|---|---|---|---|
| Byte | 01 | 03 | 05 | 06 | 02 | 04 | 07 | 08 |
13, 16, 2B, 32 in hex: the integer results 19, 22, 43 and 50.FF bytes. All four result bytes must be 02.Use the matching SKY130 Tiny Tapeout demo board and a USB connection. Turn off the input DIP switches when driving UI from the onboard microcontroller. Install mpremote on the host and run mpremote run board/bringup.py from the repository root. The script selects the design and single-steps the clock.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Input byte bit 0 | Result byte bit 0 | Write byte |
| 1 | Input byte bit 1 | Result byte bit 1 | Output word select bit 0 |
| 2 | Input byte bit 2 | Result byte bit 2 | Output word select bit 1 |
| 3 | Input byte bit 3 | Result byte bit 3 | |
| 4 | Input byte bit 4 | Result byte bit 4 | |
| 5 | Input byte bit 5 | Result byte bit 5 | |
| 6 | Input byte bit 6 | Result byte bit 6 | Ready to accept bytes |
| 7 | Input byte bit 7 | Result byte bit 7 | Result available |