hamster Posted January 12, 2013 Report Share Posted January 12, 2013 I've just got a new project up on my WIki that might be of interest to Papilio Pro users. It is a VGA controller that * Accepts bursts of pixel data (so can be used with a Memory controller) * Transparently switches video clocks and timing for four video modes - 640x480, 800x600, 1024x768, 1280x720. To enable the mode switching all you have to do append a '1' to the first pixel of the frame when you write it to the fifo - it handles the rest. You can find it at http://hamsterworks.co.nz/mediawiki/index.php/Async_VGA I've also got an example of how to program a DCM_CLKGEN at http://hamsterworks.co.nz/mediawiki/index.php/FreqSwitch Link to comment Share on other sites More sharing options...
alvieboy Posted January 14, 2013 Report Share Posted January 14, 2013 Good one Question: you say "it accepts bursts of pixel data". You mean that it does not drive the memory itself, but rather waits for data to come ? Alvie Link to comment Share on other sites More sharing options...
hamster Posted January 14, 2013 Author Report Share Posted January 14, 2013 Hi Alvie, Yes, you guessed it. It decouples the display from the memory subsystem. So the design driving has logic that works something like: if pixels_left_to_read = 0 then if the display fifo is low then Issue a request for another x pixels from pixel_address; pixels_left_to_read <= x; if pixel_address = 1024 * 768 - x then pixel_address <= 0; is_first_pixel <= '1'; else pixel_address <= pixel_address + x;; end if; end if;else if data has been received from memory then write memory data to the display fifo, with is_first_pixel appended to the MSB pixels_left_to_read <= pixels_left_to_read-1; is_first_pixel <= '0'; end if;end if; All you have to do to change the video mode is replace "1024 * 768 - x" with "640 * 480 - x" (or 800x600, or 1280x720), and it takes care of switching the pixel clock from 65MHz down to 25Mhz Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.