Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Display on VGA without SDRAM

Display on VGA without SDRAM

Ratings: (0)|Views: 424|Likes:
Published by muhammad

More info:

Published by: muhammad on Apr 25, 2009
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





Display on VGA without SDRAMThe problem: I want to display dynamic characters on the screen. The normal work isto use a SDRAM to save the contents of the VGA matrix. If I will use 680 * 460 so Ihave to use matrix 680*460 of 3 bytes for the red and green and blue.But I will make it simple and will use 2 colors so I just need 1 bit. So I can design amatrix using VHDL which will be 680*640. Oh, there is another problem. It takes toomuch time to synthesize the code because every bit is connected as a signal.How can I solve this??I had a nice idea. I will show the char in 10*10 bit. So the 680*460 matrix can beonly 86*46. it will take no time in systemization. I considered the 86*46 matrix as a pointer which point at the small matrices.Why did I do that?I wanted to make a complete system which contain (keyboard, VGA, UART, GPIO,LCD and soft-processor). I have already design the rest of the system but I want tomake it completely.Well, I don't like to talk much. Just look at the code. It is for Spartan 3E for simplification.You may notice some weird things. For exampleI wanted to divide an integer by 10 but this is a problem in VHDL. So I did it usingfor loop. By make a counter that count by 10 and notice the equalization.Anyway, this is the code
. It is not the final code but you will see some alphabets insome places in the screen. You just have to get an input from outside to write on thescreen wherever you want
------------------------------------------------------------------------------------ Company:-- Engineer:---- Create Date: 15:40:42 12/08/2008-- Design Name:-- Module Name: Sync_XY_generator - Behavioral-- Project Name:-- Target Devices:-- Tool versions:-- Description:---- Dependencies:---- Revision:-- Revision 0.01 - File Created-- Additional Comments:------------------------------------------------------------------------------------library IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use IEEE.STD_LOGIC_UNSIGNED.ALL;use ieee.numeric_std.all;use ieee.math_real.all;---- Uncomment the following library declaration if instantiating---- any Xilinx primitives in this code.--library UNISIM;--use UNISIM.VComponents.all;entity vga isPort ( CLK50_in : in STD_LOGIC;HS : out STD_LOGIC;VS : out STD_LOGIC;r,g,b : out std_logic);end vga;architecture Behavioral of vga is------- signals declarationssignal clk25: std_logic;signal H_counter_value : integer;--std_logic_vector(9 downto 0);signal V_counter_value : integer;--std_logic_vector(9 downto 0);signal x : integer range 0 to 640; --std_logic_vector(9 downto 0);signal y : integer range 0 to 640; -- std_logic_vector(9 downto 0);signal c:std_logic_vector(7 downto 0);signal xx,yy :integer;shared variable xd,yd:integer;
signal data:std_logic_vector(0 to 9);--constant c_x_l : integer := 320 ;--constant c_x_r: integer := 327;--constant c_y_u : integer := 150 ;--constant c_y_d: integer := 157 ;--signal gdata: std_logic_vector(7 downto 0):="11110000";signal obj_rgb:std_logic_vector(2 downto 0) := "001";--signal obj2_rgb:std_logic_vector(2 downto 0) := "010";--signal ball_rgb:std_logic_vector(2 downto 0) := "011";--signal a_on,b_on,c_on:std_logic;--signal tick:std_logic;--signal counter2:integer:=0;--subtype tmp is integer;type memory_array is array ( 0 to 9 ) of std_logic_vector (0 to 9 ) ;subtype tmp is std_logic_vector( 7 downto 0);type memory is array(integer range 0 to 64,integer range 0 to 48) of tmp;signal mem:memory;constant am : memory_array:= ("0000000000","0111111110", --"0111111110" , --"0110000110", --"0110000110" , --"0111111110", --"0111111110", --"0110000110", --"0110000110", --"0000000000");constant bm : memory_array:= ("0000000000","0111111110", --"0111111110" , --"0110000110", --"0110000110" , --"0111111100", --"0110000110", --"0110000110", --"0111111110",--"0000000000");constant cm: memory_array:= ("0000000000",

Activity (5)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
msuan liked this
rush2sami1462 liked this
wahyan liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->