Forum Discussion
Altera_Forum
Honored Contributor
14 years agoStarting point for DE1 Board
Hi all,
Recently i have buy the Altera DE1 Board. My objectif is to make a projects with Nios II F and all the things with a commented source for everyone want to start a project with DE1 and C code with the Eclipse IDE. After i want to send it to the wiki and here for exemple. I have succesfully integrated and be able to command the Switch , Key and all Led with Nios II Eclipse. if someone already want the project and source tell me. But now i want to add the VGA and i request some help. so just two question please , i know this forum have several VGA question but i just want to make one starting point project for beginner guys ( like me) who want to start a project. 1) Is it Possible to command the VGA directly with the Nios and Eclipse ( by command the Buffer). 2) I have found the Altera Source Code for the CycloneII_2C35 with the VGA. i have added in my SOPC the vga controller and the vid_pll for the 40Mhz clock and 800*600 resolution. i can sucessfuly compile my project in Quartus II and Eclipse too but when i flash it i have no signal in my VGA monitor even with Run as Hardware. Here is my project and my source code , can you tell where is the error ? http://sega4ever.power-heberg.com/fpga/de1_nios.rar Thanks a lot !15 Replies
- Altera_Forum
Honored Contributor
reserved post for description
- Altera_Forum
Honored Contributor
I must need to buy The Microtronix Lancelot Card for doing VGA with DE1 and Nios II ?
- Altera_Forum
Honored Contributor
In your top level module it doesn't seem that anything is connected to the VGA outputs, therefore there can't be any VGA output.
If you go to system0_inst.v you will see a number of extra ports that you haven't added (B_from_vga_controller etc.) First add these ports to your instantiation in DE1_NIOS.v and connect them to the VGA outputs (VGA_R, VGA_G, VGA_B, etc.). - Altera_Forum
Honored Contributor
Hi,
First thanks for your reply ! according to the info in system_0_inst.v i have write this : http://sega4ever.power-heberg.com/fpga/de1%20init.rar The Quartus II Compilation works but vga seem's not be initialized when i flash the .sof Can you tell me if everything is ok in my files ? Thanks ! - Altera_Forum
Honored Contributor
You're just creating nets that don't connect anywhere. They're not connected to any pins.
You need to connect them to the VGA ports defined in your top level module. That is, instead of R, connect it to VGA_R, instead of sync_n, connect to VGA_SYNC_N, etc. If you look at your top level module, you can find in the port declarations all the ports you didn't connect to ://////////////////////// VGA //////////////////////////// output VGA_HS; // VGA H_SYNC output VGA_VS; // VGA V_SYNC output VGA_R; // VGA Red output VGA_G; // VGA Green output VGA_B; // VGA Blue output VGA_CLK; // VGA Clock output VGA_BLANK; // VGA Blank output VGA_SYNC_N; // VGA Sync output VGA_SYNC_T; // VGA Sync output VGA_M1; // VGA M1 output VGA_M2; // VGA M2 - Altera_Forum
Honored Contributor
Ok i think understand my error i don't have write the new pin in the Pin Planner.
But according to the DE1 docs they don't have this new pin : I only found : VGA_HS, VGA_VS, VGA_R, VGA_G, VGA_B, with are already writed in the PIN PLANNER Look at my picture please : http://sega4ever.power-heberg.com/fpga/vga%20pinout.png and here is the DE1 pinout docs : http://sega4ever.power-heberg.com/fpga/de1_v11a.pdf i have missed something ? - Altera_Forum
Honored Contributor
No actually you don't understand at all.
Here's what I mean. In the .rar file you've supplied, you did this:
what it should be is this:// the VGA Controller .R_from_the_vga_controller(R), .B_from_the_vga_controller(B), .G_from_the_vga_controller(G),
since those are the names of the outputs you have declared. I suggest you try to understand Verilog. What your problem was, is that the outputs of your top level module VGA_R, VGA_B, VGA_G, VGA_HSYNC_N, etc. are assigned physically to VGA, but nothing in your Verilog actually drives these signals, therefore there can't be any signal.// the VGA Controller .R_from_the_vga_controller(VGA_R), .B_from_the_vga_controller(VGA_B), .G_from_the_vga_controller(VGA_G), - Altera_Forum
Honored Contributor
Quartus send me this error during the compilation :
Error (10170): Verilog HDL syntax error at DE1_NIOS.v(345) near text "."; expecting ")" Error (10112): Ignored design unit "DE1_NIOS" at DE1_NIOS.v(43) due to previous errors here is my modification// the VGA Controller .R_from_the_vga_controller(VGA_R), .B_from_the_vga_controller(VGA_B), .G_from_the_vga_controller(VGA_G), .hsync_from_the_vga_controller(VGA_hsync), .vsync_from_the_vga_controller(VGA_vsync), - Altera_Forum
Honored Contributor
1. Those are syntax errors. You might have deleted a ")".
2. Please use the name of the outputs declared in your top module. That means, not "VGA_hsync", but it should be "VGA_HS", because that was how it's declared in the top module. Using "VGA_hsync" just creates a net that doesn't connect anywhere. 3. Remember that in verilog everything is case sensitive. "VGA" is not the same as "vga" or "Vga". I suggest you refer to a Verilog tutorial ASAP. - Altera_Forum
Honored Contributor
Ok i have rewrited the DE1_NIOS.v with your indications.
Thanks for your patience really :oops:. So actually here is the state of my two files : http://sega4ever.power-heberg.com/fpga/de1%20init.rar i think this :
Are part of the Lancelot card so i can't drive it with Nios II eclipse because i don't have the card attached in my FPGA I have commented these lines in my DE1_NIOS.v . Just need to drive the VGA with Nios II Eclipse ;) The Quartus II compilation works but nothing seems to be initialized when i launch the vga demo with eclipse. Can you tell me one more time if my files are correct please ?VGA_M1, // VGA M1 VGA_M2, // VGA M2 VGA_SYNC_N, // VGA SYNC N VGA_SYNC_T, // VGA SYNC T VGA_BLANK, // VGA Blank VGA_CLK,