s4_bit <= s34_tile_line_reg(to_integer(unsigned(not s34_pix_x_reg(3 downto 1))));
s4_visible <= not (s34_h_blank_reg or s34_v_blank_reg);
- -- s4_vga_red <= "111" when (s4_visible and s4_bit) = '1' else "000";
- -- s4_vga_green <= "111" when (s4_visible and s4_bit) = '1' else "000";
- -- s4_vga_blue <= "11" when (s4_visible and s4_bit) = '1' else "00";
- s4_vga_red <= s34_fg_color_reg(7 downto 5) when (s4_visible and s4_bit) = '1' else s34_bg_color_reg(7 downto 5);
- s4_vga_green <= s34_fg_color_reg(4 downto 2) when (s4_visible and s4_bit) = '1' else s34_bg_color_reg(4 downto 2);
- s4_vga_blue <= s34_fg_color_reg(1 downto 0) when (s4_visible and s4_bit) = '1' else s34_bg_color_reg(1 downto 0);
+ process (s4_bit, s4_visible, s34_fg_color_reg, s34_bg_color_reg)
+ begin
+ if s4_visible = '0' then
+ s4_vga_red <= (others => '0');
+ s4_vga_green <= (others => '0');
+ s4_vga_blue <= (others => '0');
+ else
+ if s4_bit = '1' then
+ s4_vga_red <= s34_fg_color_reg(7 downto 5);
+ s4_vga_green <= s34_fg_color_reg(4 downto 2);
+ s4_vga_blue <= s34_fg_color_reg(1 downto 0);
+ else
+ s4_vga_red <= s34_bg_color_reg(7 downto 5);
+ s4_vga_green <= s34_bg_color_reg(4 downto 2);
+ s4_vga_blue <= s34_bg_color_reg(1 downto 0);
+ end if;
+ end if;
+ end process;
-- Register 4-output
s4_bit <= s34_tile_line_reg(to_integer(unsigned(not s34_pix_x_reg(3 downto 1))));
s4_visible <= not (s34_h_blank_reg or s34_v_blank_reg);
- -- s4_vga_red <= "111" when (s4_visible and s4_bit) = '1' else "000";
- -- s4_vga_green <= "111" when (s4_visible and s4_bit) = '1' else "000";
- -- s4_vga_blue <= "11" when (s4_visible and s4_bit) = '1' else "00";
- s4_vga_red <= s34_fg_color_reg(7 downto 5) when (s4_visible and s4_bit) = '1' else s34_bg_color_reg(7 downto 5);
- s4_vga_green <= s34_fg_color_reg(4 downto 2) when (s4_visible and s4_bit) = '1' else s34_bg_color_reg(4 downto 2);
- s4_vga_blue <= s34_fg_color_reg(1 downto 0) when (s4_visible and s4_bit) = '1' else s34_bg_color_reg(1 downto 0);
+ process (s4_bit, s4_visible, s34_fg_color_reg, s34_bg_color_reg)
+ begin
+ if s4_visible = '0' then
+ s4_vga_red <= (others => '0');
+ s4_vga_green <= (others => '0');
+ s4_vga_blue <= (others => '0');
+ else
+ if s4_bit = '1' then
+ s4_vga_red <= s34_fg_color_reg(7 downto 5);
+ s4_vga_green <= s34_fg_color_reg(4 downto 2);
+ s4_vga_blue <= s34_fg_color_reg(1 downto 0);
+ else
+ s4_vga_red <= s34_bg_color_reg(7 downto 5);
+ s4_vga_green <= s34_bg_color_reg(4 downto 2);
+ s4_vga_blue <= s34_bg_color_reg(1 downto 0);
+ end if;
+ end if;
+ end process;
-- Register 4-output