I'm working on modeling a circuit implemented on an FPGA, and the fundamental question I keep running into is this: what is a logic element? I need to be able to model the temporal response of the output when the input changes as accurately as possible. Right now we are using a simple RC circuit driven by a binary voltage source (corresponding to the implemented logic function) with a time constant of ~400 ps, but clearly that's too simplistic and it's not accurate enough.

Looking at e.g. the Altera handbook, LEs are implemented essentially as a look up table with routing components around it. Can someone point me in the direction of (a) a circuit diagram of one of these look up tables or (b) a more appropriate modeling framework? I'm new to this, so please be gentle.

  • 1
    \$\begingroup\$ As part of the "compilation" of an FPGA circuit timing analysis is done. For altera a system called Timequest does it. You should be able to get all the information you require out of that, or whatever your software uses. What is in an LE depends on the make and/or model of your FPGA. Read the datasheets, it should give you a clue. \$\endgroup\$ – Majenko Oct 13 '14 at 15:32
  • \$\begingroup\$ @Majenko Thanks, I'll check out Timequest. I looked at both the Cyclone IV handbook which basically draws LE's as black boxes with 4 inputs and an output, and the datasheet which seemed only to have timing info for external interfaces (unless I'm missing something...) \$\endgroup\$ – Andrew Oct 13 '14 at 15:42
  • \$\begingroup\$ First hit on google for "Cyclone IV logic element": altera.co.uk/literature/hb/cyclone-iv/cyiv-51002.pdf \$\endgroup\$ – Majenko Oct 13 '14 at 15:48
  • \$\begingroup\$ @Majenko oops! I meant the LUTs are drawn as black boxes... I need to know more about the dynamics of the look up table (which may be too much to ask). \$\endgroup\$ – Andrew Oct 13 '14 at 15:56
  • 1
    \$\begingroup\$ A LUT is usually a small bit of RAM. Set the input address and a value is presented on the output. \$\endgroup\$ – Majenko Oct 13 '14 at 15:57

A Logic Element (LE) is made up of a number of gates. Exactly how long it takes to propagate data from the inputs to the outputs depends just on the combination of gates that the signals pass through, and that depends on how the LE is programmed.

The main controlling factor of the LE is the Look-up Table (LUT). This has 4 data inputs and 4 data outputs, and is basically a little block of static RAM (16 nibbles). The RAM is loaded when the device is programmed by the configuration chip. The incoming data signals are the address lines of the SRAM, and the output data signals are the data bus of the SRAM. A change of address (incoming data) yields a pre-set change of data value (outgoing data).

For modelling the timing you would really need to know which gates are in use for which values of the LUT and factor the propagation of those into your calculation. For the LUT itself, it's just SRAM, so you can just model that as a small piece of SRAM.

The actual layout of a LE in different modes of operation can be found in the document Logic Elements and Logic Array Blocks in Cyclone IV Devices.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.