
This projects works in a 36x48 grid, where each grid has a binary state of either filled or empty. The physics engine iterates through the rows of sand and a compute kernel calculates the next state for each pair of continuous rows.
This project can be tested by attaching the TinyVGA PMOD board to the UO port (and a connected VGA monitor), and the TinyQSPI PMOD board to the UIO port. Then, by driving any of the UI pins high, a single grain of sand will be generated in the top line.
1x TinyVGA 1x TinyQSPI
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Add sand | VGA_R1 | QSPI_FLASH_CSB |
| 1 | Add sand | VGA_G1 | QSPI_SD0 |
| 2 | Add sand | VGA_B1 | QSPI_SD1 |
| 3 | Add sand | VGA_vsync | QSPI_SCK |
| 4 | Add sand | VGA_R0 | QSPI_SD2 |
| 5 | Add sand | VGA_G0 | QSPI_SD3 |
| 6 | Add sand | VGA_B0 | QSPI_RAM_CS1 |
| 7 | Add sand | VGA_hsync | QSPI_RAM_CS2 |