Forum Discussion
Altera_Forum
Honored Contributor
16 years agoWhy do you need to clear the RAM? It's going to be overwritten anyway so what's the point in clearing it?
I'm not sure I would use your same approach to tackle your problem but if I were, this is what I would do. The process would be the same for a double or triple buffering scheme. 1 - Your writer side writes data into the scanline buffer. When it's finished, it stores the number of pixels written and passes a signal to the reader side indicating that the buffer is full. The writer side hangs until it receives a signal back from the reader side indicating that the writer side can move on to the next buffer. 2 - The reader side waits for the signal from the writer side at which point it sends a signal back to the writer side to let the writer know it can move on to the next buffer. The reader side then reads the filled buffer and uses the stored pixel count from the writer side to know when to stop. When it gets to the end, it waits for the signal from the writer side and the process continues indefinitely.