Forum Discussion

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

how to implement 1M * 32 bits counters on EP4SGX230?

I want to implement 1M 32bits counters on FPGA, is it possible? and how?

thanks

5 Replies

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

    Why would you need so many counters? I don't think you can find any FPGA with so many registers available.

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

    A 32 bit counter consumes (usually) 32 logic elements. So you would be needing at least 32 million logic elements which you will not find in a single device. Perhaps if you don't need a lot of speed you can store count values in a memory and keep track that way.

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

    I think all of us are pretty curious about why you think you need 1 Million 32-bit counters

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

    I once used some 600 counters(16 bits each) that required 600*16 = 9600 registers. Still too many. Then I managed to replace that with ram based 600 counters by updating a specific location by the new value computed by few shared adders. So you can share 1M counters on fewer adders depending on available speed. But the storage for 1M x 32 bit is too much for an FPGA and I think an external SDRAM will do.

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

    thanks all!

    I just want to implement counters without RAM. now it can't.

    so the RAM scheme is the better .