The VGA Simulator is a web based tool to easily view a raw VGA signal without having to hook it up to an actual CRT monitor. Easily review and save any frames generated. It uses horizontal sync, vertical sync, and red, green, blue to recreate pixel perfect frames.
The purpose of this tool was to create a faster way to debug FPGA/VHDL projects that utilize VGA. The problem is that synthesizing and generating a bit-file takes too long with Xilinx mainly because it only utilizes a single core. Although we have Simulators such as Isim to debug almost every aspect of a design, it is hard visualize a bunch a 1
or 0
flying past the screen on the rgb lines.
This tool is not VHDL specific, you just need to generate a log file with lines formatted as so: current_sim_time time_units: hs vs red green blue
(ex. 535 ns: 1 1 010 010 01
)
use ieee.std_logic_textio.all;
use std.textio.all;
clk
needs to be synchonized to your pixel clock and be just as fast or oversample your pixel clock. You can write your own logging, it just needs be formatted as so: current_sim_time time_units: hs vs red green blue
(ex. 535 ns: 1 1 010 010 01
). Also see Log File Formatting
below.
process (clk)
file file_pointer: text is out "write.txt";
variable line_el: line;
begin
if rising_edge(clk) then
-- Write the time
write(line_el, now); -- write the line.
write(line_el, ":"); -- write the line.
-- Write the hsync
write(line_el, " ");
write(line_el, hsync); -- write the line.
-- Write the vsync
write(line_el, " ");
write(line_el, vsync); -- write the line.
-- Write the red
write(line_el, " ");
write(line_el, Red); -- write the line.
-- Write the green
write(line_el, " ");
write(line_el, Green); -- write the line.
-- Write the blue
write(line_el, " ");
write(line_el, Blue); -- write the line.
-- write the contents into the file.
writeline(file_pointer, line_el);
end if;
end process;
Isim
or any other simulatorback porch
in the fine tuning section. This will center your image in the canvas so that no clipping occurs. The back porch is the amount of pixel clock cycles after the rising edge of the sync pulses (hsync for back porch x, and vsync for back porch y). See this diagram (source)Download current frame
link just above the monitor..txt
filecurrent_sim_time time_units: hs vs red green blue
(ex. 535 ns: 1 1 010 010 01
)0
(zeroes) to the max color depth