Modifying RTL code - How to convert a VHDL Function to a Component -2 questions

Discussion in 'VHDL' started by zeev@cadence.com, Apr 5, 2008.

  1. Guest

    Hello all,
    I need to do a massive surgery on an existing RTL code.
    The objective is to generate a "hard" hierarchical layer around a VHDL
    Function, by "hard" I mean that it'll be kept after synthesis - this
    will help me in tools in the Flow downstream synthesis.

    I thought about converting the function to a component first and then
    connecting it to the processes in which the original function was
    called in. This looks like "easier said than done..."

    As an alternative I would like to be able to isolate a small fraction
    of this specific, called, function, e.g. a multiplication , and have
    solid hierarchical boundary of this operation only.

    I assume a Synthesis that is non aggressive, i.e: does not ungroup in
    any way and does not do any boundary optimization.

    Any idea on how to do this will be truly appreciated.
    thx
    \ZeevY
    , Apr 5, 2008
    #1
    1. Advertising

  2. Re: Modifying RTL code - How to convert a VHDL Function to a Component- 2 questions

    wrote:

    > I need to do a massive surgery on an existing RTL code.
    > The objective is to generate a "hard" hierarchical layer around a VHDL
    > Function,


    Maybe you mean a vhdl design entity.
    A function just returns a value and has no ports.

    > by "hard" I mean that it'll be kept after synthesis


    That sounds like an design entity
    or an instance of a design entity.

    -- Mike Treseler
    Mike Treseler, Apr 5, 2008
    #2
    1. Advertising

  3. KJ Guest

    Re: Modifying RTL code - How to convert a VHDL Function to a Component - 2 questions

    <> wrote in message
    news:...
    > Hello all,
    > I need to do a massive surgery on an existing RTL code.
    > The objective is to generate a "hard" hierarchical layer around a VHDL
    > Function, by "hard" I mean that it'll be kept after synthesis - this
    > will help me in tools in the Flow downstream synthesis.
    >


    Help to do what? What really is the problem, and why would massive surgery
    help? If there are problems with the existing code, they will be found in
    simulation and/or static timing analysis not massive surgery without an
    understanding of why one is doing the surgery. If however you're looking to
    get data on resource usage than this might be useful since you do tend to
    get reports on logic resource usage on a 'per entity' basis.

    > I thought about converting the function to a component first and then
    > connecting it to the processes in which the original function was
    > called in. This looks like "easier said than done..."
    >


    No it should be fairly trivial. The input parameters to the functions are
    inputs to an entity, the single output of the function is an output of the
    entity. Procedures can be converted in the same fashion.

    > As an alternative I would like to be able to isolate a small fraction
    > of this specific, called, function, e.g. a multiplication , and have
    > solid hierarchical boundary of this operation only.
    >


    So convert that small fraction into an entity/architecture and connect it
    up.

    > I assume a Synthesis that is non aggressive, i.e: does not ungroup in
    > any way and does not do any boundary optimization.
    >


    You assume incorrectly.

    > Any idea on how to do this will be truly appreciated.
    > thx


    I'd suggest not doing this since I doubt it will help you get to the root of
    the real problem that you're trying to solve...whatever that problem might
    actually be.

    Kevin Jennings
    KJ, Apr 5, 2008
    #3
  4. radarman Guest

    Re: Modifying RTL code - How to convert a VHDL Function to aComponent - 2 questions

    On Apr 5, 2:56 pm, wrote:
    > Hello all,
    > I need to do a massive surgery on an existing RTL code.
    > The objective is to generate a "hard" hierarchical layer around a VHDL
    > Function, by "hard" I mean that it'll be kept after synthesis - this
    > will help me in tools in the Flow downstream synthesis.
    >
    > I thought about converting the function to a component first and then
    > connecting it to the processes in which the original function was
    > called in. This looks like "easier said than done..."
    >
    > As an alternative I would like to be able to isolate a small fraction
    > of this specific, called, function, e.g. a multiplication , and have
    > solid hierarchical boundary of this operation only.
    >
    > I assume a Synthesis that is non aggressive, i.e: does not ungroup in
    > any way and does not do any boundary optimization.
    >
    > Any idea on how to do this will be truly appreciated.
    > thx
    > \ZeevY


    1) Think carefully before tearing a design apart. Yes, it can
    sometimes help when you need to understand what is going on. However,
    I have learned from personal experience that you often create more
    problems than you solve. I used to believe that when you took over a
    design that the first thing you did was rewrite it. The trouble is,
    you now have essentially a new design with all new bugs.

    2) It should be trivial to write a VHDL component that wrappers a
    function. Just implement the function it the same way you normally
    would, but create an entity/architecture pair that isolates on the I/O
    to the function. In place of the function call, instantiate the
    wrapper, and wire up the I/O.

    I don't see why this is preferable to simply using the function "in-
    place", though. You have merely added another layer of complexity
    without really gaining much. The only time I have considered doing
    something like this was when I wanted to implement a free CRC
    calculator that came in the form of a VHDL function. I created a "bus
    wrapper" that allowed a SoC microcontroller access the function across
    a bus. The wrapper also held address decoding logic and registers, so
    it was a bit more than just a wrapper, but it more or less did what
    you are describing.
    radarman, Apr 9, 2008
    #4
    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. Zyd

    VHDL RTL description

    Zyd, Apr 14, 2004, in forum: VHDL
    Replies:
    1
    Views:
    1,480
    H. Li
    Apr 14, 2004
  2. Anand P Paralkar

    ASIC RTL and FPGA RTL

    Anand P Paralkar, Apr 26, 2004, in forum: VHDL
    Replies:
    1
    Views:
    4,862
    Alexander Gnusin
    Apr 26, 2004
  3. gpi5
    Replies:
    1
    Views:
    1,135
    Mike Treseler
    Nov 9, 2004
  4. sharatd
    Replies:
    0
    Views:
    1,920
    sharatd
    Oct 18, 2006
  5. Mr. Ken
    Replies:
    6
    Views:
    2,384
    Marcus Harnisch
    Jan 5, 2007
Loading...

Share This Page