Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

Matrix Adder

Hello,

I have one captious question. I need to buil-up matrix adder. Totally 1920x1080=2073600 cells able to do three different operations with 24bit integer value:

1/ A+B=C

2/ A-B=C

3/ IF(A-B) < limit THEN C=1 ELSE C=0

4/ compute sum of all results in all C of all cells to one big 64bit number.

Every operation 1,2,3, must be optionaly selectable.

Is it possible to do it use of Altera ???

Many thanks :)

20 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Looks like a lot of work (and way out of spec for this forum).

    I suggest getting down and writing a good spec, get some other engineers involved.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It is to be replacement of one small part of human vision neural system - part of Cerebellum.

    I have software simulation model working ok, but very slow. So I am looking for high speed solution of it. Because I am not able to spread it to real mode, HW accelerator has to be a little faster. I need to compare and compute difference between two pictures 2000x per second.

    That is all.

    Can you tell me how many reprogrammable cells (adders of A-B or A+B) can I built-up from one Altera chip ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    a - b == a + (-b) == a + (~b + 1) == (a << 1 | 1) + (~b << 1 | 1) >> 1

    So changing from add to subtract just involves flipping a bit.

    You'll need to treat video data as a linear value stream - not a full frame 2d matrix. It is probably possibly to buffer some adjacent lines.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    So, I think, Stratix V5 FPGA maybe will be suitable. I need 2073600 cells. This FPGA has 359200cells so I need 6 pieces of it. I suppose every cell cal be formed to adder or llimiter. according to the notes 1,2,3 above.

    Is it true ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    That is NOT the way you need to look at it.

    Like DSL said, you will NOT be processing the image as a matrix, you will be treating it as a linear stream of data, 1 pixel at a time. So you would only need very few luts and reigsters to do the adition or subtraction. There is no way any of the FPGAs have enough internal memory to store a single HD frame, let alone 1000s. You will be proceing the data as it arrives.

    I suggest you go and learn up about digital logic before you move forward. You are completly misunderstanding the architecture of FPGAs.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I understand. I am seeking for fully parallel system but PLA with 75MHz bus provides serial system, CCD cells would have to be connected to PLA cells directly or whole system will be permanently "serially shaped" and I need only few cells to do such system. OK. Nice. It is fully customer Int.Circ. I can go to grove :(

    thank for help
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Dude, go back to the basics like Tricky said. Altera has some on-line free classes about FPGA architecture and digital systems.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I am not dude :( I am pupil :rolleyes::-P:oops:

    be patient I will prepare WEB page of my problem