
Mocarabe is a coarse-grained reconfigurable array: a 2x2 torus of processing elements (adders, multipliers and IO PEs) joined by a time-multiplexed network with 2 channels per link. Every 8-bit value moves through scheduled switches and waits in a 16-deep FIFO at its consumer. A kernel's dataflow graph is placed and scheduled offline by the Mocarabe toolchain into a modulo schedule of II cycles (up to II_MAX = 6), which is loaded at run time as a serial bitstream. The chip starts a new iteration of the kernel every II cycles.
The bundled demo is int_level1_linear at II = 4: 4 inputs and
1 output share the input and output pins, each in its own slot.
rst_n low and cfg_en (uio[0]) low for at least one clock.cfg_en and present one word of test/bitstream.hex on ui_in per clock
(93 words, 8 bits each), then drop cfg_en.rst_n low with ui_in at 0 for 48 clocks, then release it.
The first rising edge with rst_n high is run cycle 0.ui_in at run cycle cycle + k*4:
x1 at cycle 2, x2 at cycle 3, c1 at cycle 12, c2 at cycle 21.uo_out at run cycle cycle + k*4, with
out_valid (uio[1]) high: ret at cycle 55.test/test.py does exactly this for 16 iterations of random inputs and checks
every output against the dataflow graph in test/mocarabe_program.json.
None: the RP2040 on the demo board can drive the bitstream and inputs.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | cfg_data[0] / in[0] | out[0] | cfg_en |
| 1 | cfg_data[1] / in[1] | out[1] | out_valid |
| 2 | cfg_data[2] / in[2] | out[2] | |
| 3 | cfg_data[3] / in[3] | out[3] | |
| 4 | cfg_data[4] / in[4] | out[4] | |
| 5 | cfg_data[5] / in[5] | out[5] | |
| 6 | cfg_data[6] / in[6] | out[6] | |
| 7 | cfg_data[7] / in[7] | out[7] |