Forum Discussion

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

How LEs are aligned

Hello

I have three questions considering about how LEs are aligned and placed.

(1)

I want to know how LEs are aligned "physically."

Because by the default of Quartus II LEs are sometimes placed far from the I/O elements which are intented to be used, I think the alignment you can see on Chip Planner is not real and real LE alignments should be something different.

(2)

As mentioned above, the default placement of LEs by Quartus II seems weird to me.

So I want to know the principal of the LE placement by Quartus II. There must be some logics about the placement (for there is no "randoms" in computer world).

(3)

I want to know where "unassigned" I/O elements are connected to.

In most ICs, I/O ports have fixed voltage (GND or Vcc) to avoid the through-current to the CMOS.

So what I am thinking is that the unassigned I/O elements must be connected to GND or Vcc.

Any replies are appreciated.

Thanks

10 Replies

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

    (1) & (2) - Quartus places the LEs using your timing constraints. If you have none, it may randomly place your first LE far from the pin. There are a few things you can do to prevent this. If you setup your timing analysis scripts properly and enable fast input registers (or fast output registers) your design should make a little more sense in the chip planner.

    (3) In Quartus: Menus:Assignments->Device... Select device and pin options. There is a selection called "Unused Pins". This is where you set these. (Be very careful if you select "As output driving ground". If your pinout is not setup correctly, your FPGA may get fairly hot.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Dear kosh271

    Thanks for your rapid reply!!

    --- Quote Start ---

    (1) & (2) - Quartus places the LEs using your timing constraints. If you have none, it may randomly place your first LE far from the pin. There are a few things you can do to prevent this. If you setup your timing analysis scripts properly and enable fast input registers (or fast output registers) your design should make a little more sense in the chip planner.

    --- Quote End ---

    So Quartus II does not consider anything with respect to place&route unless no constraints are set??

    I still feel weird about the randomness... There must be some programs for making the randomness and thus the default placement might have some meanings.

    Anyway, back to my first question (1), I want to know how LEs are aligned "physically."

    Does the Chip Planner reflect the real alignment of LE??

    --- Quote Start ---

    (3) In Quartus: Menus:Assignments->Device... Select device and pin options. There is a selection called "Unused Pins". This is where you set these. (Be very careful if you select "As output driving ground". If your pinout is not setup correctly, your FPGA may get fairly hot.

    --- Quote End ---

    I appreciate your kind reply. You solved my question (3).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Quartus uses a pseudo-random generator to place your elements and stops when your timing constraints are met. So yes if you don't set any timing constraints you will end up with something that looks random.

    You have to understand that the place and route algorithm needs to be able to cope with a lot of different situations. On a very simple system it may look obvious where to put the LEs for the best performance, but as the system gets more and more complex, just "putting all the LEs near each other" is no longer a viable option. You need to identify the highest priority signals and ensure that the LEs on those paths are close together and reserve some space for them, while the LEs processing slow or less important signals can be spread around where we have some space. That's why it is very important to define your important signals with timing constraints.

    AFAIK the positions shown by the chip planner aren't far from the real locations on the chip.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Dear Daixiwen

    --- Quote Start ---

    Quartus uses a pseudo-random generator to place your elements and stops when your timing constraints are met. So yes if you don't set any timing constraints you will end up with something that looks random.

    You have to understand that the place and route algorithm needs to be able to cope with a lot of different situations. On a very simple system it may look obvious where to put the LEs for the best performance, but as the system gets more and more complex, just "putting all the LEs near each other" is no longer a viable option. You need to identify the highest priority signals and ensure that the LEs on those paths are close together and reserve some space for them, while the LEs processing slow or less important signals can be spread around where we have some space. That's why it is very important to define your important signals with timing constraints.

    AFAIK the positions shown by the chip planner aren't far from the real locations on the chip.

    --- Quote End ---

    Thanks for your reply.

    I now got what Quartus do but have a new question: can't you understand what really Quartus do (or the algorithm of place & route)??

    I mean I have to know and explain the reason for the placing of LEs when showing my FPGA to customers and/or my boss.

    The answer "Quartus does it" must be avoided... lol
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The question you should rather ask yourself is whether or not the LE placement is relevant information for your boss or customer. It doesn't show anything about your design or the performance. I think it would be a lot more relevant to show them the timing report instead.

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

    Dear Daixiwen

    Thank you for your reply.

    --- Quote Start ---

    The question you should rather ask yourself is whether or not the LE placement is relevant information for your boss or customer. It doesn't show anything about your design or the performance. I think it would be a lot more relevant to show them the timing report instead.

    --- Quote End ---

    That seems true, Daixiwen and I agree with it.

    But let me ask one more question. In your reply, you said

    --- Quote Start ---

    It doesn't show anything about your design or the performance.

    --- Quote End ---

    Doesn't your design or performance depends on the LE placement?

    I'm a little bit confused... sorry
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Let me rephrase that: it doesn't let you easily find anything about your design or the performance.

    From the LE placement you would need for each register to find out what it is doing, what part of your code it is accomplishing, what other registers or modules it is connected to, what are the time delays to those modules, and whether those delays are compatible with your requirements or not. It would take ages, and Timequest already does that automatically for you, so why bother?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Dear Daixiwen

    So what Quartus does is really complicated and it is really hard to understand the reasons for the placement of LEs.

    I will explain it to my boss... who is really anxious about the principle(s) of the placement because he thinks he needs theoretical reasons for the placement.

    Anyway, thanks a lot.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    There isn't a single solution. Of course having the LE right next to the I/O pin is the best solution and it looks better, but as far as Quartus is concerned, having it at the other side of the FPGA is also an acceptable solution if the delay between the LE and the I/O pin is under the limit that you set in your timing requirements.

    You might be interested in this very good document (http://www.alterawiki.com/wiki/the_quartus_ii_fitter_and_seed_sweeps) from Rysc that explains a bit how the fitter algorithm works and why it looks like it is random.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Dear Daixiwen,

    Sorry for late reply. I've been working on different project and now I'm back to FPGA.

    --- Quote Start ---

    There isn't a single solution. Of course having the LE right next to the I/O pin is the best solution and it looks better, but as far as Quartus is concerned, having it at the other side of the FPGA is also an acceptable solution if the delay between the LE and the I/O pin is under the limit that you set in your timing requirements.

    You might be interested in this very good document (http://www.alterawiki.com/wiki/the_quartus_ii_fitter_and_seed_sweeps) from Rysc that explains a bit how the fitter algorithm works and why it looks like it is random.

    --- Quote End ---

    Thanks to the website you taught me, I got the idea of pseudo-random placement.

    Plus, more and more I read manuals uploaded by Altera I've come to know how the FPGAs work.

    Not much, but a little bit though.

    Anyway, thanks for your help.