UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor ada_spark
Visitor
9,927 Views
Registered: ‎04-14-2013

Importing the Atlys-VMODCam reference design to Nexys 3

Hello Experts, Gurus and Community Members,

As apparently going through this forum shows that nobody so far has succedded in porting the Atlys VMODCam reference design to Nexys 3, so I would like to request that a general guideline be provided for making such thing less painful for newbies and intermediate users.

In my suggestion, for example:

1. Atlys reference design uses a certain type of DDR2 RAM (it's interface generated by MIG) for buffering the video data from VMODCam, can it be used as it is, but of course changing the pin assignments in UCF file respectively? Or CellRAM/PCM/SPI RAM of Nexys 3 be accessed and interfaced with directly?

2. Atlys reference design uses a central module for total clock managment. How is it working and interacting with individual modules? Can it be ported directly or it also needs to be re-created via Clocking wizard? Any constraints or suggestions to keep in mind while doing this step for Nexys3?

3. Atlys reference design uses a DVI video output format. And since Nexys 3 has no support for it but VGA then what to consider while making the VGA output to be taken from the memory frame buffer (as mentioned in point 1.)? 

4. Any other suggestions and guidlines?

 

Have a great morning.

--greetings from DE

0 Kudos
20 Replies
Scholar austin
Scholar
9,910 Views
Registered: ‎02-27-2008

Re: Importing the Atlys-VMODCam reference design to Nexys 3

a,

 

The Spartan 3 line is quite old now, so when that happens, we do not see anyone starting new board designs with it, so interest drops off.  As this is a Digilent supported product, it is also up to them to decide what they will, and will not support (do).


Sorry if that is a dissapointment.

Austin Lesea
Principal Engineer
Xilinx San Jose
Visitor ada_spark
Visitor
9,906 Views
Registered: ‎04-14-2013

Re: Importing the Atlys-VMODCam reference design to Nexys 3

Austin,

 

thanks for updating but as far as I know Nexys 3 board has a Spartan 6 LX16 and not 3 as apparently it's not that old too. My concern was that it's a genuine problem and a lot of people are having trouble in design import.

 

Have a good day.

--Greetings from DE

 

0 Kudos
Scholar austin
Scholar
9,902 Views
Registered: ‎02-27-2008

Re: Importing the Atlys-VMODCam reference design to Nexys 3

a,

 

OK.  Let us see how many people reply tio this.

 

Is this a problem?  Are lots of people having issues?

 

If you don't speak up, we don't know.  Does this need to be fixed?

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
Visitor asmart
Visitor
9,879 Views
Registered: ‎05-21-2013

Re: Importing the Atlys-VMODCam reference design to Nexys 3

Austin--

 

I am also having a lot of difficulty connecting to the vmodcam from the nexys3 board I purchased from digilent a few months ago. Since then I've been trying to write my own I2C control interface to read R[0x3000] on the camera to confirm it is working. I cannot seem to find suitable vhdl code for the nexys3 anywhere. Using chipscope analyzer and my own control interface, I can see that the camera is not acknowledging my first control bit (the mt9d112 device address 0x78) and is driving acknowledge high. I am wondering if my code is wrong or maybe it's something else. I'll be reviewing my powerup and hard reset sequence tonight. Is there another way to test the vmodcam board?

 

I appreciate the support from the xilinx community.

 

Adrian   

0 Kudos
Visitor ada_spark
Visitor
9,849 Views
Registered: ‎04-14-2013

Re: Importing the Atlys-VMODCam reference design to Nexys 3

Adrian,

 

I guess, it's not much helpful but here are two official responses from Digilent Inc regarding Nexys 3 and VMODCam reference design import:

 

1. "

-       We see no reason that the VmodCam cannot be used with the Nexys3

-       We recommend the VmodCam be used with the Nexys3 for image applications, not video applications. The lack of DDR on the Nexys3 makes video applications implausible. Even image processing will require a complex arbitration/buffering scheme for accessing the CellRAM.

-       We don’t have a demo for VmodCam working with the Nexys3, but we pointed the need for such a demo. When such a demo will exist, we will let you know.

 

"

2. " Since the Nexys3 does not have DDR2, You will need to redesign the entire memory controller circuit, including the clocking scheme. Unfortunately, the CellRam on the Nexys3 is not supported by the MIG, so you will have to build your own controller. On a better note, the CellRAM is much simpler to interface with than DDR2, and your controller will likely only need a single clock signal (this means you can remove all of the complicated signals/clocks generated by the Syscon block for the MIG DDR2 controller). In order to design a CellRAM controller, you will need to refer to the CellRAM data sheet, available from micron here: http://download.micron.com/pdf/datasheets/psram/128mb_burst_cr1_5_p26z.pdf."

 

I'm also working in the same direction but I am using the camera module along with the TWI (I2C) module directly from digilent reference design. May be you can look into that and resolve your issue as the description you provided is not much helpful. Here is a code snippet from Atlys reference design for camera control, for a quick reference:

 

signal CamInitRAM: CamInitRAM_type := (
IRD & x"30000000", -- Chip version. Default 0x1580

IWR & x"32140D85", -- Slew rate control, PCLK 5, D 5
IWR & x"341E8F0B", -- PLL control; Default 0x8F0B
IWR & x"341C0250", -- PLL dividers; M=80,N=2,fMCLK=fCLKIN*M/(N+1)/8=80MHz
IWR & x"341E8F09", -- PLL control; Power-up PLL; wait 1ms after this!
IWR & x"341E8F08", -- PLL control; Turn off bypass

IWR & x"3202000C", -- Take camera out of standby, but Stop MCU to allow configuration
IRD & x"32040000", -- Bit [1] should be checked for init status

IWR & x"338C2795", -- Output format; Context A shadow
IWR & x"33900030",
IWR & x"338C2719", -- Read mode; Context A
IWR & x"3390046C",
IWR & x"338C2703", -- Output width; Context A
IWR & x"33900280", -- 640
IWR & x"338C2705", -- Output height; Context A
IWR & x"339001E0", -- 480
IWR & x"338C2751", -- Crop X0; Context A
IWR & x"33900000", -- 0
IWR & x"338C2755", -- Crop Y0; Context A
IWR & x"33900000", -- 0
IWR & x"338C2753", -- Crop X1; Context A
IWR & x"33900320", -- 800
IWR & x"338C2757", -- Crop Y1; Context A
IWR & x"33900258", -- 600

-- IWR & x"338CA103", -- Refresh Sequencer
-- IWR & x"33900005", -- = 5
-- IWR & x"338CA103", -- Refresh Sequencer Mode
-- IWR & x"33900006", -- = 6

IWR & x"32020008", -- Kick-start MCU
IWR & x"301A02CC" -- reset/output control; parallel enable, drive pins, start streaming
);

 

What memory and/or buffer are you using? CellRAM/PCM?

 

 

Have a nice day

--Greetings from DE

 

P.S: Hopefully, by now, Austin would have searched through this forum for similar issues regarding Nexys 3 and VMODCam! ;-)

0 Kudos
Visitor ada_spark
Visitor
9,765 Views
Registered: ‎04-14-2013

Re: Importing the Atlys-VMODCam reference design to Nexys 3

Though not much successful but here is a sample project which reads from VMODCam module and writes to VGA. It uses the CellRAM with a single port to read and write data from camera.

 

It does not display the data correctly but I'm still working on it.

 

Any help is appreciated.

 

Reviews, improvements, suggestions and naturally fixes are more than welcome.

 

--greetings from DE

P.S: Dev enironment is ISE 14.2.

9,114 Views
Registered: ‎08-01-2012

Re: Importing the Atlys-VMODCam reference design to Nexys 3

create a github
0 Kudos
Visitor draganfrlan
Visitor
8,559 Views
Registered: ‎04-22-2014

Re: Importing the Atlys-VMODCam reference design to Nexys 3

Hello!

 

ada_spark, have you actually managed to connect nexys 3 and VmodCAM or you just assume that the design is somewhat working (although not correctly). I tryed the design you attached, but I can not determine that the camera is working.

 

My problem is that VmodCAM does not respond or, to be more precise, it acknowledges its address (x78) and then stops responding (only no-acknowledge). The power-up and reset sequence are correct, the I2C modul is working, I checked and re-checked everything (net list, frequences, all simulations are OK ...), but it still does not work. Apparently I am not an isolated case:

 

http://people.bu.edu/hupv/projects/2012/12/22/simple-motion-detection-by-background-subtraction.html

 

Have anyone managed to connect this two boards and actually received more than one response from VmodCAM?

 

Have a nice day!

 

Dragan 

0 Kudos
Visitor hardstone
Visitor
8,551 Views
Registered: ‎08-14-2013

Re: Importing the Atlys-VMODCam reference design to Nexys 3

ada_spark  ..........I tried to run your code directly onto the nexys 3 board and connected the vga port with the monitor. Unfortunatly it is not working in my case. The problem is that even if i detach the vmodcam , I am still having a same output on the monitor . If you have found a solution regarding your code please attach it here so that it can help a lot of people . 

0 Kudos
Visitor draganfrlan
Visitor
6,994 Views
Registered: ‎04-22-2014

Re: Importing the Atlys-VMODCam reference design to Nexys 3

That is exactly what I tryed, the resul is the same as you described, meaning the same output with or without VmodCAM.

0 Kudos
Visitor hardstone
Visitor
6,977 Views
Registered: ‎08-14-2013

Re: Importing the Atlys-VMODCam reference design to Nexys 3

As far as I can understand ...........The problem can be in two major codes.................... either it is in vga transmitter or How the data is saved in Cellular ram in the code....................   If anyone has made a progress in solving the issue and has a working code kindly help me ......................

0 Kudos
Visitor hardstone
Visitor
6,972 Views
Registered: ‎08-14-2013

Re: Importing the Atlys-VMODCam reference design to Nexys 3

Is there any changes in the jumpers also ...........because that may also cause the problem 

0 Kudos
Visitor acosti
Visitor
6,602 Views
Registered: ‎11-06-2013

Re: Importing the Atlys-VMODCam reference design to Nexys 3

For me, loading the jumper P4 did the trick. Without it, the VHDC port hasn't enough power to feed the VmodCam, what obiously means that the Aptina MCU isn't receiving any instruccion. Now, I can see the Pixel Clock arriving from the camera.

 

Best Regards,

 

Daniel

0 Kudos
Visitor dburr
Visitor
6,320 Views
Registered: ‎09-05-2014

Re: Importing the Atlys-VMODCam reference design to Nexys 3


@acosti wrote:

For me, loading the jumper P4 did the trick. Without it, the VHDC port hasn't enough power to feed the VmodCam, what obiously means that the Aptina MCU isn't receiving any instruccion. Now, I can see the Pixel Clock arriving from the camera.

 

Best Regards,

 

Daniel


Is this the jumper you are talking about?  (directly above the VHDCI connector, between it and the JTAG connector)

 

 

On my board, there was no jumper installed at that position (was that the case with your board as well?)  So I had to employ my, er, questionable soldering skills and attach one there.  Not sure if I did it properly though, as I am still not able to get a usable image with ada_spark's code.  So I am not sure if my dubious soldering skills or ada_spark's code is at fault, although signs seem to point to the latter; with the jumper loaded, I am seeing a different pattern of colored static than what I saw before installing the jumper.  And, even more telling, when I unplug the camera, the pattern changes, which seems to indicate that something is being received from the camera.  And I can get the pattern of garbage to change radically if I wave objects in front of the cameras and/or make the lights brighter/dimmer/turn them off entirely.

 

(slightly off topic: I notice there's another jumper position sans installed jumper pins on my board, labeled JP7 (HSWAP).  Anyone know what this does/what it's for?  I don't see any documentation on it, although I do see it listed on the schematics.)

 

0 Kudos
Visitor acosti
Visitor
6,199 Views
Registered: ‎11-06-2013

Re: Importing the Atlys-VMODCam reference design to Nexys 3

Yes, that's the jumper. I welded it too, cause I also have a board withot that weld done. I've been researching and now it's pretty obvious you need to have that VU port fed in order to have the VmodCAM working, since that is the main power source, besides some VCC pins.

 

Regarding the ada_spark code, I didn't use it. I took the digilent's reference code and got rid of anithing useless for the Nexys3, and after that:

 

1- Make sure that the pixel clock comming from the camera was working. I did it using blinking leds.

2- My final purpose is not the nexys3 board, so I use the RAM blocks to avoid using the Microcon memory chips. With that little amount of memory you won't see the whole picture, but you can test the VmodCAM is working.

 

regards,

 

 

Daniel

0 Kudos
Visitor hardstone
Visitor
5,945 Views
Registered: ‎08-14-2013

Re: Importing the Atlys-VMODCam reference design to Nexys 3

Hi 

 

This may be obvious but I am finding it difficult to solve. 

 

The data from the camera is 16 bit . But the vga port on the Nexys 3 board is only 8 bit. 

 

This means that we have to compromise half of the resolution of picture quality , 

 

Is there any better way of using vga without compromising the quality of image .

 

 

0 Kudos
Teacher eteam00
Teacher
5,939 Views
Registered: ‎07-21-2009

Re: Importing the Atlys-VMODCam reference design to Nexys 3

The data from the camera is 16 bit . But the vga port on the Nexys 3 board is only 8 bit. 

 

This means that we have to compromise half of the resolution of picture quality , 

 

Is there any better way of using vga without compromising the quality of image .

 

There is a crude 3-channel DAC of sorts built from resistor-summing, on page 2 of the Nexys3 schematics.  If you are truly interested in adding tonal resolution to the VGA output, you can wire up additional FPGA outputs, through appropriately sized resistors, to the R | G | B video nodes at connector J2.

 

You may be happier with a different board for video processing.  I doubt that excellent output video was a product requirement for the Nexys3 design.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos
Visitor hardstone
Visitor
5,932 Views
Registered: ‎08-14-2013

Re: Importing the Atlys-VMODCam reference design to Nexys 3

 Thanks Bob for your quick response..

 

The problem is that even if I connect the resistors on the J2 jumper upto max 5 more but still I wont be using the complete 16 pixels.  


The solution you have provided may increase the resolution upto some level but it wont be optimum resolution.

 

Unfortunatly I dont have the freedom to change the board which is the most easiest way to solve this problem .

 

 

 

Adnan

0 Kudos
Teacher eteam00
Teacher
5,925 Views
Registered: ‎07-21-2009

Re: Importing the Atlys-VMODCam reference design to Nexys 3

The solution you have provided may increase the resolution upto some level but it wont be optimum resolution.

 

Even worse, the signal quality will be far from optimum.  A proper analogue VGA source should have 75-ohm source impedance, and drive into 75-ohm load impedance.  This requires considerably more circuitry and care than is found on the Nexys3 board.

 

If you are strongly interested in high-quality output video (and I would recommend digital video, not analogue video, for such purposes), you will need to start over with a different board.  The Atlys board, for example, might be more appropriate for your needs.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Visitor abcborges
Visitor
1,704 Views
Registered: ‎03-02-2015

Re: Importing the Atlys-VMODCam reference design to Nexys 3

so you did get image from the sensor?

0 Kudos