I didn't know whether to place this question here or on stackoverflow, but I finally decided to post it here.
I want to build a simple system that would be able to work with basic peripherals (UART, keyboard, VGA monitor). I would like to use MPU instead of MCU as a ´main unit´, so there would be more memory for processing data. This ´main´ chip would use a single SDRAM to store its data.
For the VGA output, I want to use an Atmel AVR chip, that would request data from another memory, which would contain screen data in 8-bit RGBS format. Here is where I get to problems.
I don't need much of VGA memory (less than 512KB), therefore I want to use SRAM memory, which is also simple to access compared to SDRAM. The VGA resolution I chose uses 25 MHz pixel clock, which means that I have only ~40ns time to retrieve a single pixel from SRAM to DAC. That's good as most of the memories that match my search input (>=4Mbit memory, <40ns access time) can do this.
Back to the MPU memory, I would like to ask my first question: when is it necessary to send a refresh command to SDRAM? Do I have to do it, or is it possible to get a memory that would need any external magic to refresh it?
Now I get to the problem how to access that SRAM VGA memory from the main chip, as it is almost always accessed by my VGA controller (not mentioning that I need yet another chip for mapping this memory nicely to MPU´s address space). I thought of reserving some pins of the VGA controller for MPU´s requests for SRAM access, which would mean that some video frames would have to be skipped leaving this SRAM accessible to MPU without interruptions.
I'm stuck here. I could only think of these possible solutions:
- I can use SDRAM on VGA chip instead of SRAM, but I will also need a better controller for the video output. This SDRAM will be compatibile with the one on MPU, and I will need to think about a special tactic for clock stealing, where I could access video memory from the video controller and main processing unit at once.
- I can add another chip that will use time when video memory is not accessed (sync pulses, porches etc.) for copying blocks of data from the main memory to video memory.
- I can use only one SDRAM memory, and request access to it from the MPU everytime VGA needs another pixel. That would slow down the whole system, but it would be simpler.
What do you think of this? What other ways (tricks, designs?) are here to have two units (main and video processing unit), from which one is being managed by another?
Thanks.