Forum Discussion

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

Question regarding CyclonV ALMs

Hi,

I am new to Altera FPGAs, so I did some study on the internal design reading the following document: http://www.altera.com/literature/hb/cyclone-v/cv_52001.pdf

What confuses me a bit, are the ALMs - so it would be really great to get some answers:

  • Is an ALM a physical structure on-chip, whereas "logic elements" (LE) is basically only a logical equivalent (to be able to compare between different families, vendors, ..)?

  • The document states an ALM can have a single function with up to 6 inputs, but up to 8 inputs are connected to boolean logic. Does this mean if I would like to use an ALM for boolean logic only, I can use all 8 inputs?

The reason why I ask such (probably) dumb questions, is that I am evaluating wether an FPGA is the right choice for a given problem (we already have an multicore DSP implementation but would like to improve on throughput and costs).

What we would like to do is:

  • to compare 256x8-bit integer values against a single 8-bit value (so 2k "active" bits)

  • Later perform a 15x15 box aggregation on 8-bit values

But I don't have any clue how far we could get with a mid-end cyclone v (~100k LEs), is there any documentation stating how much typical VHDL-constructs consume resources on those deviced (like 8-bit compare, 8-bit add, ...)

Thank you & regards, Reggi

1 Reply

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

    The ALM is a physical structure on-chip. It can be used in several different modes.

    In 6-LUT mode, it can compute any function of 6 input bits. So why does it have 8 inputs?

    The ALM can also be split into two smaller units. You can get two completely independent 4-input functions from one ALM. (You can also get two 5-input functions, providing that the two 5-input functions share at least two inputs in common.) In this mode, each half-ALM can implement the same functions as a Cyclone IV LE, so (roughly speaking) 1 ALM = 2 LEs.

    When it's used in an adder (yet another mode), each ALM will produce 2 bits of the result. For simple functions - add, compare etc you'll need 1 4-LUT per bit.

    Depending on how you're handling overflow, an 8-bit add may require a 9-bit output, which would be 5 ALMs. A comparison is similar.