--Using two ARM processors to write video and play a tone.
Starting one process to write to the video buffer as fast as possible, and keep the audio FIFO filled, failed above about 8000 pixels per loop, where the FIFO could be filled in each loop if there was space. The easy solution is to start two processes, which are migrated by Linux onto the two processors with both running at full speed. (Quartus archive, combined audio/videocode which failed at high write-rates). The audio code required the math library for sine wave synthesis, which requires compile with the
-lm option. The video code is unchanged. And the address header.
Starting two processes to maximize bandwidth, requires communication
between the processes. This example uses the fixed audio synthesis
frequency (48 KHz) to drive a timer/counter which then uses shared memory IPC (interprocess communication) to display the time on the VGA. The both the audio and video code were attached to the same shared memory segment using
shmat. As before, the audio code required the math library for sine wave synthesis, which requires compile with the
-lm option. (Quartus archive, address header).