Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

VGA Controller State Machine

Status
Not open for further replies.

hanafee99

Newbie level 4
Joined
Jun 14, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,316
I have already research the internet and book. I just can not find any state machine regarding this project. A lot of example that i found just simply explanation on the verilog code. Can some one suggest a basic FSM for this project title.
 

For this project, my supervisor want me to design VGA controller based on state machine. I already have the code and some explanation of it. I already draw a state diagram for it based on the code and she kind of reject it. I have no idea what VGA controller state machine looks like.
 

Share your vga code and state machine here.

If your vga code is working then you can directly draw the state machine from it.
 

work is based on the formation of 2-channel synchronization and channel images that arise from the timing charts monitor control. Write very simple. Without understanding how someone else's code will not help
 

Here are my codes and state machine. I think my state machine is very wrong.
 

Attachments

  • statemachine.jpg
    statemachine.jpg
    18.7 KB · Views: 69
  • vga_controller.txt
    4.1 KB · Views: 60

process (main_Clk )
begin
if (main_Clk'event and main_Clk = '1')
then
if h_cnt = "11000100100" then h_cnt <= "00000000001";
else h_cnt <= h_cnt + 1;
end if;
--***************************************************************************
if h_cnt = "11000100100" then
if v_cnt = "10000101001" then v_cnt <= "00000000000";
else v_cnt <= v_cnt + 1;
end if;
end if;
end if;
end process ;
--**************************************hhhhhhhh ssysysysysysyy
process (main_Clk )
begin
if (main_Clk'event and main_Clk = '1')
then
if h_cnt = "10010011000" then --1176
border_h <= '0';
elsif h_cnt = "11000100100" then --1572
border_h <= '1';
elsif h_cnt = "10011100001" then --1249
h_sy <= '1';
elsif h_cnt = "10101011110" then --1374
h_sy <= '0';
end if;
end if;
end process ;
--******************************************vvvvvvvvvvvvvvv sysysysysysysysysy

process (main_Clk )
begin
if (main_Clk'event and main_Clk = '1')
then
if h_cnt = "11000100100" then
if v_cnt = "01111111111" then --1023
border_v <= '0';
elsif v_cnt = "10000101001" then --1065
border_v <= '1';
elsif v_cnt = "10000000000" then --1024
v_sy <= '1';
elsif v_cnt = "10000000100" then --1028
v_sy <= '0';
end if;
end if;
end if;
end process ;

border <= border_v and border_h;

---------- Post added at 12:17 ---------- Previous post was at 12:15 ----------

main clk = 100 MHz (108 not possible)
mode 1280*1024
 

I'm suppose to target my VGA controller to spartan 3e . It has clock of 50Mhz and the design is for 25Mhz. How do i want to solve this. Can anyone give an idea.
 

You can use frequency divider. Write a free running counter and use the LSB of it. It has half the frequency of the clock.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top