Shop OBEX P1 Docs P2 Docs Learn Events
P123 StereoAnalysis Project — Parallax Forums

P123 StereoAnalysis Project



I want to state clearly that I am a Verilog novice.  I know only enough Verilog to do what I want to do and very little else.  There are varieties of Verilog and various ways to do things.  Ultimately, there is probably a best way to do everything... that is not what you will find here, unless one of our experts cares to illuminate you:)

How to use this project.

That's up to you, but I have a two suggestions.  

IF YOU KNOW NOTHING ABOUT VERILOG... get yourself a Propeller123 board and jump right in.  

Don't try to study verilog... Don't try to read anything on the web... chances are you will be so confused after the first hour, you will give up and go away.  After you get your board... and are fully committed, download the latest version of Quartus.. don't do the tutorials.  Come right back here and I will take care of you.

IF YOU KNOW SOMETHING ABOUT VERILOG, get yourself a Propeller123 board and jump right in.

I have posted a modest amount of code... which I now know was really, really bad and violated all kinds of rules but worked.  Forum members are so polite... they usually indicate their impressions in the kindest way possible.  Don't do that!!! Someone might take your remarks as approval... This is the P2 forum.  If you are an expert, the proper way to address me is:  "you idiot..."  That way we can keep the youngens on track and the moderators worrying:)

I want to teach a little, but I am also trying to learn at the same time.


Overview
This is a long term development project using the Propeller123 board. These boards are in limited supply, but I am determined to make as much as generally useful as possible. So, I will be supporting the main project, with sub-projects, which should appeal to broader interests and which you may find useful.  For example... the previously announced sub-project for camera identification and base functionality, which will be posted in the near future in the P1 forum.  

Most of my development work so far has taken place using a DE2-115 in preparation for the release of the Propeller123 board, which has now taken place.  Ultimately, the kind of stereo-analysis that I will be doing is heavily memory intensive, requiring efficient random access. For right now (for me) that means on-board FPGA memory blocks.  

I am using the P123 as a development platform.  For my purposes, when fully implemented, it will be adequate for testing various algorithms (and developing a few news ones). I'm also hoping to use it to improve my own understanding of human vision, etc. So, this project should be useful and find a home in any respectable neurosciences department.

There are a variety of potential commercial applications for stereo analysis, and there are no perfect systems out there.  I have no interest in these commercial applications, but I hope that some of you have do:)  Everything I post is free for any use without restrictions or attributions. If you want your mother to think you did it, you have my blessings.

In the beginning, I will be using cameras that are cheap, adequately documented, and easy to acquire.  I wouldn't recommend any of them except for limited commercial applications.  All of them are adequate for a wide variety of experimental applications.

As it is, I have already built the required core functionality including FPGA memory blocks and SRAM on the DE2-115.  In fact, the first iteration of the project will use only the M10K memory of the Cyclone V (or the M9K memory of the DE2-115...) This is a bummer for everyone but the owners of a Cyclone V boards or a DE2-115.  There are alternative boards out there, but they are either new or old and I suspect they are in the hands of only a few forum members.  

Fear not... as soon as I finish up this first section, I am going to swap out the memory module for the camera and get it working on the Nano and hopefully on the Max10... more sub-projects.  I have looked at developing a dedicated DDR memory module.  A general purpose module would be overkill and I would never get it done, but a dedicated module, which does what I want it to do for camera acquisition doesn't seem beyond my limited Verilog skills:)

After this first flurry, I will pause and do some sub-projects... in anticipation of add-on boards that I hope will become available for the Propeller123.

The DE2-115 is a great board in general use.  So, initially, I will give suggested pin-outs for that board.

Current State and Pathway

Until recently, my development had been flowing nicely. On the P1V side, I implemented a 4Cog P1V variant, which includes a 96 pin portB, ala Pic33.  On the other side, I have dpr and sram working, and I have acquired images from a couple of different cameras...and then everything went south and my DE2-115 seems to have died.  I'm not sure. Because I picked up a virus along the way and I am not going to waste time now going back and testing the DE2-115.

My 4CogP1V accesses hub memory a few clicks faster and improves Spin performance relative to the 8 Cog standard and has a smaller FPGA footprint. In one respect, I wish I hadn't done it, because now when there are hick-ups, I always have to consider that it is my 4Cog variant causing the problem.  On the other hand, most of the time I think my 4Cog version is just fine and I will be able to use it on other platforms.

At any rate I have decided not simply to recompile and remap my project to the Propeller123, I have decided to rebuild it from scratch building the camera, memory and VGA first and then add in the standard P1V and P2V.

After that I will test dump in my 4Cog version and see if everything is still working... then it will be time for sub-projects 2 and 3:)  Along the way, I will be doing other things, but I won't be documenting that here until later.

OK... let's get started. 

Comments

  • rjo__rjo__ Posts: 2,114
    To the moderator... please sink this thread.  We can resurrect it when Chip releases the sources.
  • As a moderator, I would like to keep it alive, in case others have an interest.
    But if you really want me to sink it, I will.
  • Cluso99Cluso99 Posts: 18,069
    rjo: Why not keep it alive? Use the P1V as the base as I expect it will be some time befor Chip releases full source to of compile/modify youself.
    A better suggestion maybe to move this to the P1/P1V forum.
  • rjo__rjo__ Posts: 2,114
    It was premature... didn't want to get first time viewers all hot and bothered until I sorted it further.
    I think we are back on track... I have all of the documentation that I think I need. Px.exe is working fabulously, and it is entirely possible that within the week I will have a camera working... which is step one of the tutorial:) After that there is some coding which will be new to me and could take any amount of time to complete. It will get done. Promise and it will all work on the P123 fpga board. It will be tight, but it can be made to fit;)

    So...Cluso99 and Publison: you are kind and generous. Readers have been warned. Go ahead and keep it active.

    For anyone thinking about FPGA's but not really knowing how to approach the learning curve.... Stay right here.

    You are going to need a Propeller 1-2-3 board.

    Disregard what you might have heard about price... the P123 is the bargain to end all bargains. Comparing it to some of the less expensive options is sort of like comparing a Volkswagon to a Porshe 911. Or a mack truck to a Corvette.

    I started out on a De2-115 but it is dead and I have no plans to replace it. If you know what you are doing, you can modify what I am going to post to suit your purposes, but I won't be able to help very much.
  • jmgjmg Posts: 15,144
    Cluso99 wrote: »
    A better suggestion maybe to move this to the P1/P1V forum.

    Yup, putting this in the P1V forum is a very good idea.

  • rjo__rjo__ Posts: 2,114
    edited 2015-08-06 14:16
    Don't you guys ever sleep?
    :)

    I almost got this working on a P1... I know it will work with a P1V+mods and most or all of it can be made to fit the P2V without modifications.

    You would think that the P2V work would get done last... but it is all Spin and PASM. I am on a nice slope with Verilog, but there are just oodles of possibilities to consider... low end, high end applications, etc. I can see P2 computed vision being very interesting to our robotics people. I don't see an FPGA solution being nearly as popular. It is interesting to me... a fetish really... and I am sure there will be others to come along that will find it very useful, but for the usual Spinhead... if it isn't possible with a P2, it just won't be very interesting.

  • rjo__rjo__ Posts: 2,114
    As to where a thread like this belongs... That is up to our moderator:)
  • PublisonPublison Posts: 12,366
    edited 2015-08-06 14:44
    rjo__ wrote: »
    As to where a thread like this belongs... That is up to our moderator:)

    There is no P1V forum per say, but I will move it to the P1 forum. Would that be OK?
  • rjo__rjo__ Posts: 2,114
    Fine by me. AND I hope there never is a P1V forum!!!
  • Done!
  • rjo__rjo__ Posts: 2,114
    Thank you.
  • Hi Publison.

    Why NOT instead made one P1V-P2V Forum instead. And nmove all FPGA work on that

    That can give us some structure -- As we like Structured programing (not spaghetti one's)


    Publison wrote: »
    rjo__ wrote: »
    As to where a thread like this belongs... That is up to our moderator:)

    There is no P1V forum per say, but I will move it to the P1 forum. Would that be OK?

  • Sapieha wrote: »
    Hi Publison.

    Why NOT instead made one P1V-P2V Forum instead. And nmove all FPGA work on that

    That can give us some structure -- As we like Structured programing (not spaghetti one's)


    Publison wrote: »
    rjo__ wrote: »
    As to where a thread like this belongs... That is up to our moderator:)

    There is no P1V forum per say, but I will move it to the P1 forum. Would that be OK?

    Hi Sapieha! Good to see you back on the forums!

    That would be up to Parallax to create new forums. I do not have control over that.
Sign In or Register to comment.