control software for simpleGPU
This repo contains a few things to test the simpleGPU:
- A .dotnet core command line application. The command line application in the
gpuTestdirectory is capable sending commands and data to an arduino over usb/serial. - Some Arduino test firmware. The arduino/microcontroller running this firmware sends data over bit-banged SPI to the simpleGPU FPGA board.
- a .dylib file
libarduinoComsTest1.dylibwhich implements some basic serial port communication on mac inC. - a test .obj file -
/gpuTests/teapot.objwhich contains the vert and triangle information for the famous teapot model. - a
testMVP.txtfile - this is the model view projection matrix which is used to project the verts into pespective camera space. The FPGA expects each number to be represented in Q16.16 format. The matrix components are flattened. - a
testVectors.txtfile which contains all the verts we want to draw. The FPGA expects each number to be represented in Q16.16 format. this is organized as follows:
x
y
z
x
y
z
details:
- Very rough - has a bunch of command line modes which just run different top level functions - can be used to:
testFixedPointgenerate output vertex and matrix data from a given .obj file.testnativeinteropsend commands over serial to a microcontroller running the test firmware.generate an image from an .objtestMatrixMultiplyOrdersanity checks.
- Watches for commands and data on the serial port (UART) of the microcontroller and transmits these over bit-banged SPI. It also sets some mode output pins that the FPGA expects to be set which control different write modes the simpleGPU supports. See the docs in the simpleGPU FPGA repo for more info. There is a teensy version of this firmware that runs much faster (tested on teensy 3.2 mcu) because the CPU is faster, but also because the teensy supports usb full speed over serial.
- commands the firmware supports:
- 1 byte
0-go into vertex data mode- expecting verts which it will transmit only when buffer is filled
- set to 4800 bytes currently - 32 bits per component * 3 per vert = 12bytes per vert = 4800/12 = 400 verts.
- 1 byte
3go into scren blank mode- will send a command to FPGA to blank the entire frame buffer. (clear screen)
- 1 byte
please see serial repo for info.

