Re: Query about optimization

Discussion in 'VHDL' started by Andy, May 23, 2007.

  1. Andy

    Andy Guest

    On May 23, 4:59 am, "KJ" <> wrote:
    > "Vinay Deshpande" <> wrote in message
    >
    > news:...
    >
    > > On May 23, 4:54 am, "KJ" <> wrote:
    > >> > Second, most synthesizers have only
    > >> > limited optimization across entity boundaries, so a description that
    > >> > spreads a combinatorial function across many entities is less likely
    > >> > to result in a nearly optimal implementation.

    >
    > >> Do you have any code that actually demonstrates this lack of
    > >> optomization?

    >
    > >> KJ

    >
    > > You can try the example which I quoted above. Create two
    > > implementations of N-bit full adder, one with simple statement like C
    > > <= A + B; and other using hierarchical design starting from a simple
    > > full adder. You can see difference in logic elements consumed by both
    > > implementations.

    >
    > That's not what I was asking about. The comment that Andy made that I
    > questioned was directed at logic that spans multiple entities. What he said
    > was that the entity presented some sort of boundary that made it difficult
    > to optomize logic across. I've yet to see any evidence of such a barrier
    > and asked him for an example to back up his claim (and one would also need
    > to know which synthesis tool has this problem since that is the tool that
    > has the problem). What I've seen is that the logic gets flattened into a
    > netlist right at the outset, the entity 'boundaries' at that point no longer
    > exist and they have no such effect as claimed. It could be though that
    > older tools, or crappy tools, for whatever reason, did (or do) have this
    > limitation (maybe they optomized entities but not globally with a flattened
    > netlist). Hence the question.
    >
    > As for your example, there are multiple n-bit adder algorithms and I suspect
    > that C<=A+B is implemented with a different base algorithm than the
    > cascading of smaller adders. Your view is that both produce the sum of two
    > numbers and are functionally identical but optomizers are not so smart as to
    > discern better algorithms from logic but what they are good at is inferring
    > from the top level code what the best algorithm to implement is....and then
    > optomize the logic for that. A crude example would be if you were to code a
    > discrete Fourier transform algorithm that produces frequency responses from
    > a set of input numbers and expect that an optomizer would be able to figure
    > out that an FFT would be better algorithm to use. Both would give you the
    > same overall function but different implementations one of which would be
    > 'better'. Having said that, though I'll admit that I don't know just which
    > base algorithm your tool happened to choose and how (or if) it differed from
    > your hand coded version and whether the observed differences were because of
    > a different algorithm choice at the outset or because of an entity boundary
    > barrier effect. But you can't assume that just because you got different
    > results from different source code that it is an example of an entity
    > boundary barrier limitation.
    >
    > KJ


    Synplify does not collapse to a flat netlist. The netlist is
    hierarchical and closely matches the hierarchical structure of the
    original code. The differences will be where it has recognized
    combinatorial logic that crossed the RTL boundaries, which it
    optimized, necessitating the boundary changes. Synplify certainly does
    recognize combinatorial logic across hierarchy (to some extent) and
    will optimize it (to some extent). I don't know what those limits are,
    but to be on the safe side, I don't push them.

    Andy
    Andy, May 23, 2007
    #1
    1. Advertising

  2. Andy

    KJ Guest

    "Andy" <> wrote in message
    news:...
    > On May 23, 4:59 am, "KJ" <> wrote:
    >> "Vinay Deshpande" <> wrote in message
    >>
    >> news:...
    >>
    >> > On May 23, 4:54 am, "KJ" <> wrote:
    >> >> > Second, most synthesizers have only
    >> >> > limited optimization across entity boundaries, so a description that
    >> >> > spreads a combinatorial function across many entities is less likely
    >> >> > to result in a nearly optimal implementation.

    >>
    >> >> Do you have any code that actually demonstrates this lack of
    >> >> optomization?

    >>

    <snip>
    > Synplify does not collapse to a flat netlist. The netlist is
    > hierarchical and closely matches the hierarchical structure of the
    > original code.

    It develops a list of combinatorial logic functions and registers for the
    design and optomizes those logic functions (as well as other optomizations).
    Their is no 'hierarchy' involved in that optomization process, just a list
    of functions and registers.

    >The differences will be where it has recognized
    > combinatorial logic that crossed the RTL boundaries, which it
    > optimized, necessitating the boundary changes. Synplify certainly does
    > recognize combinatorial logic across hierarchy (to some extent) and
    > will optimize it (to some extent). I don't know what those limits are,
    > but to be on the safe side, I don't push them.
    >

    In other words, perhaps there really are no real limits only imagined ones.

    KJ
    KJ, May 24, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Learner
    Replies:
    1
    Views:
    966
    Marina Levit [MVP]
    Jan 30, 2006
  2. Anonymous
    Replies:
    0
    Views:
    1,427
    Anonymous
    Oct 13, 2005
  3. Vinay Deshpande

    Query about optimization

    Vinay Deshpande, May 22, 2007, in forum: VHDL
    Replies:
    14
    Views:
    1,062
  4. Andy
    Replies:
    0
    Views:
    743
  5. Ravikiran

    Zero Optimization and Sign Optimization???

    Ravikiran, Nov 17, 2008, in forum: C Programming
    Replies:
    22
    Views:
    831
    Thad Smith
    Nov 24, 2008
Loading...

Share This Page