Project

General

Profile

« Previous | Next » 

Revision 332

Added by markw over 10 years ago

Resync output to input hsync

View differences:

common/components/scandoubler.vhdl
signal vga_odd_reg : std_logic;
signal vga_odd_next : std_logic;
signal reset_output_address : std_logic;
begin
-- register
......
linea_write_enable <= '0';
lineb_write_enable <= '0';
reset_output_address <= '0';
if (colour_enable = '1') then
input_address_next <= std_logic_vector(unsigned(input_address_reg)+1);
......
end if;
if (hsync_in = '1' and hsync_in_reg = '0') then
input_address_next <= (others=>'0');
buffer_select_next <= not(buffer_select_reg);
input_address_next <= (others=>'0');
buffer_select_next <= not(buffer_select_reg);
reset_output_address <= '1';
end if;
end process;
-- output
process(vga_hsync_reg,vga_hsync_end,output_address_reg,doubled_enable,vga_odd_reg)
process(vga_hsync_reg,vga_hsync_end,output_address_reg,doubled_enable,vga_odd_reg,reset_output_address)
begin
output_address_next <= output_address_reg;
vga_hsync_start<='0';
......
vga_hsync_next <= '0';
vga_odd_next <= not(vga_odd_reg);
end if;
if (reset_output_address = '1') then
output_address_next <= (others=>'0');
end if;
end process;
linea_address <= input_address_reg when buffer_select_reg='1' else output_address_reg;

Also available in: Unified diff