Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises
1175 Discussions

Using DIP switches to change data flow

Altera_Forum
Honored Contributor II
1,095 Views

I'm working on an image processing project and I'm using the Altera UP video demos using SOPC on a DE2-115 to get started. One demo implements the Canny edge detection and does the following operations on a streaming data in: Gaussian Smoothing -> Sobel -> Non-maximum suppression -> Hysteresis, and outputs the result to a VGA device. 

 

I want to know if it is possible to choose which operation to execute while the process is running, i.e. Can I press a dip switch and make 'Smoothing -> Sobel' only to happen or another switch to make 'Sobel -> Non-maximum suppression -> Hysteresis' to happen? Something similar to what is shown on this youtube link: 

http://www.youtube.com/watch?v=tjhsdwpkc0w 

 

All these operations are contained in separate SOPC components with Avalon streaming sources and sinks. I want to be able to control which Avalon source sends its data to the VGA. Any guidance on how to proceed please?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
385 Views

Hi Viv2k, 

 

I'm starting out trying to use the DE2-115 with the D5M camera, LTM LCD and SOPC builder. I have hot snags which i'll explain further below. 

 

1. Do you have a working SOPC design for the camera? 

 

2. Do you have a working SOPC design for display on the screen? 

 

d5m problems 

I have done alot of reading and created my own SOPC design using the UNI program cores, just trying to get camera converted to 640x480 for VGA port display. My design won't display via the VGA, the monitors are saying it is "un-optimised" wrong resolution, must be an error on my end as the char and pixel examples worked. 

 

ltm screen problems 

I can't match the DE2-115 system builders declared LTM variables to those of the VGA core. The two in particular that there are appears to be non of is the "VG_Blank" and the "VGA_Sync". 

 

Any help or code would be immensily appreciated, perhaps when i catch up i'll be able to assist with your issue.
0 Kudos
Altera_Forum
Honored Contributor II
385 Views

 

--- Quote Start ---  

Hi Viv2k, 

 

I'm starting out trying to use the DE2-115 with the D5M camera, LTM LCD and SOPC builder. I have hot snags which i'll explain further below. 

 

1. Do you have a working SOPC design for the camera? 

 

d5m problems 

I have done alot of reading and created my own SOPC design using the UNI program cores, just trying to get camera converted to 640x480 for VGA port display. My design won't display via the VGA, the monitors are saying it is "un-optimised" wrong resolution, must be an error on my end as the char and pixel examples worked. 

 

--- Quote End ---  

 

 

Hi AsValdr, I'm having the same problem too with the camera reading! I tried to adapt an example UP design file targeted at the DE2 (in folder Video_Demos_using_SOPC_Builder/DE2/Extras_D5M_Video_In) to be able to do the same thing with DE2-115 and D5M camera but I was not successful. My camera seems to be sending data because when I cover the lens, the VGA display goes dark and when I remove my hand from the lens, the display goes back to noisy garbage. I think I'm messing up somewhere in the GPIO pin settings.  

 

I think I could be wrong in three places: 

1) The JP5 GPIO setting used by the SOPC Builder UP PIO component. I am not sure what to put in the 'Edge Capture Register' 

 

2) The module altera_up_video_in_dual_clock_fifo has a dcfifo component that is supposed to work on Cyclone II only. I don't know if that is preventing us from getting the right data with our CycloneIV. 

 

3) If I write the following two Output Assignments as in the example design file: 

assign GPIO[19] = 1'b1; 

assign GPIO[17] = KEY[0]; 

It doesn't compile and I get errors such as "GPIO[17] has multiple drivers due to the non-tri-state driver key[0]" and "GPIO[19]"... due to constant driver. Any idea on how to solve these errors? 

 

Send me a private message with your email address and I will send you my project file to see if you can learn things from it and hopefully we track down the mistakes. We need to join forces on this. I'm getting a bit annoyed by this camera and board! I thought the camera would work straight away using that SOPC Builder UP Video Decoder component. Of course the camera comes with an example design file but it is not 'SOPC-compliant' for beginners like me :( I think I made a mistake buying latest DE2-115.. should have stuck to tried and tested DE2.
0 Kudos
Altera_Forum
Honored Contributor II
385 Views

Hi, 

I've replied in this topic as i belive the topic title is more approriate to keep a discussion for others to join. http://www.alteraforum.com/forum/showthread.php?p=117422#post117422
0 Kudos
Reply