FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
6104 Discussions

DE2 PCB 2.x TV Decoder incompatibility

Altera_Forum
Honored Contributor II
1,836 Views

I've developed a frame grabber that runs on a 2006-vintage DE2, using the onboard ADV7181B decoder. I ordered a new DE2 last week (standard, NOT the DE2-70), and the board that came is PCB revision 2.x according to some of the documentation. The SDRAM is different and some passive components have been moved around, but otherwise the boards appear identical. 

 

My problem comes when running my code developed for the old DE2 on the new DE2. The output of the TV Decoder is mangled -- it's recognizable, but there are nasty scan lines and apparent V_ and H_SYNC issues. I know the new board works, as the DE2_TV demonstration works fine on the new board. 

 

The Terasic DE2_TV demonstration (which uses the decoder) received a massive rewrite for the new PCB, even though the pinouts, I2C addresses, physical devices, etc. all appear to be the same. Comparing the QSF files, I2C controllers, ITU656 decoders, etc. between versions show no obvious hints. Has anybody else studied this problem? Is there a simple migration path (mind-boggling term for two devices that share a part number) that doesn't involve completely de-constructing the demonstration code all over again?
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
852 Views

As a followup to anybody reading this in the future, I did receive confirmation from Terasic about the incompatibility. Basically, OSC_27 on the older DE2 is from the decoder and synced with the TV signal, whereas OSC_27 on the newer board is tied directly to the 27MHz oscillator. A new pin is added, TD_CLK, which is synced by the decoder with the 27MHz TV signal. Simply replacing the pin assignments doesn't work -- I would basically need to completely rewrite my decoder interface based on the new version of DE2_TV bundled with the newer board. 

 

It would be nice if the differences in hardware versions were published somewhere other than the bundled .qsf file, but hey, live and learn.
0 Kudos
Altera_Forum
Honored Contributor II
852 Views

One last update: it turns out you are able to get 1.X code working on a 2.X board without major modifications. It requires re-assigning the OSC_27 pin (change D13 to C16) and buckling down the timing constraints in the fitter. The reassigned pin isn't a dedicated clock input on the FPGA, and I saw some video artifacts until I fixed the timing.

0 Kudos
Altera_Forum
Honored Contributor II
852 Views

Hi there, 

 

Could you please give more detail on how you make it to work? I tried what you said but no luck! Also, this could be a dump question :), how do I know about my board's PCB version? Thanks, 

 

Kaveh
0 Kudos
Altera_Forum
Honored Contributor II
852 Views

The easiest way to tell which version is by the components. Look at the capacitors next to the power switch, TC4 and TC5. If they are in a rectangular package, just as is shown on the box, you have PCB 1.X. If they are in a metal canister container, you have 2.X. This is based on the boards I've seen, though it may not be true 100% of the time. 

 

Please note that this worked for my specific case, which was using code based on the old itu_r656_decoder from the DE2_TV demo. Note that this code is no longer available, and on the Terasic site they have a new version using an SDRAM frame buffer designed for both boards (1.x (http://www.terasic.com.tw/attachment/archive/30/de2_tv_new_v1.rar) and 2.x (http://www.terasic.com.tw/attachment/archive/30/de2_tv_new_v2.rar)). If you're doing a new design, use one of these, as they appear more robust. This method is only if you have 1.X-era legacy code that you need to quickly get working on a newer board. 

 

In the Pin Planner, find OSC_27 (pin D13) and change it to pin C16. If this alone doesn't work, you need to open the Assignment Editor and pick the Global Signals category (in the dropdown under Logic Options). Set the following fields: From (blank), To "OSC_27" (use the Node Finder), Assignment Name "Global Signal", Value "Global Clock", Enabled "Yes". 

 

Again, I'd highly recommend using the newer code as a starting point for your decoder, as you can then easily switch between versions (it appears the only differences between versions are DE2_TV.v, DE2_TV.qsf, and of course the programming files). The differences in 27MHz clocks between the boards are explained above. Good luck!
0 Kudos
Altera_Forum
Honored Contributor II
852 Views

Thanks a lot for the info. It seems like I've got the 1.x board then. But unfortunately, I think the board is out, as I can't get the decoder sample to work anymore! The VGA sample works, but no input video. 

 

Thanks again, 

Kaveh
0 Kudos
Altera_Forum
Honored Contributor II
852 Views

I fixed but DE2_TV don't works.why?

0 Kudos
Altera_Forum
Honored Contributor II
852 Views

Thanks for sharing the knowledge. Will definitely try it out.

0 Kudos
Reply