Results 1 to 2 of 2

Thread: HLS Best Practices for Parameter Passing

  1. #1
    Join Date
    Mar 2018
    Rep Power

    Question HLS Best Practices for Parameter Passing

    Hello, I am new to using HLS and I am used to the object oriented programming that can be done in C++.

    What is the closest analog to making class or a struct so that many parameters can be passed into a component without cluttering the component function's definition?

    I have many different components that require similar, but not exactly the same inputs. Would I be losing efficiency if I pass in a single, overarching struct that includes all of these parameters?

    Thanks for the input!
    Last edited by milleral; April 12th, 2018 at 03:52 PM.

  2. #2
    Join Date
    Nov 2017
    Rep Power

    Default Re: HLS Best Practices for Parameter Passing


    You can use structs to group together parameters to pass into a component.
    However, there are sometimes area penalties. if you have a struct containing members of different widths, the smaller members may be padded.

    Note that there is ultimately very little change in the overall design. In fact, if you ground the extra ‘padding’ bits when integrating your component with a full system, Quartus should optimize away the extra bits.

    Let me know if this has helped resolve the issue you are facing or if you need any further assistance.

    Best Regards,
    Anand Raj Shankar
    (This message was posted on behalf of Intel Corporation)
    Last edited by Anand Raj Shankar; May 1st, 2018 at 05:30 PM.

Similar Threads

  1. Passing parameter/generic to the top level in Quartus/tcl?
    By petter in forum Quartus II and EDA Tools Discussion
    Replies: 9
    Last Post: January 25th, 2018, 11:17 PM
  2. Modelsim - trouble passing $ parameter from vsim to vlog
    By jacorn in forum Quartus II and EDA Tools Discussion
    Replies: 2
    Last Post: October 4th, 2011, 04:47 PM
  3. Replies: 3
    Last Post: November 11th, 2008, 09:33 AM
  4. Quartus II good practices questions
    By eviltwinzzz in forum Quartus II and EDA Tools Discussion
    Replies: 3
    Last Post: June 20th, 2008, 07:53 AM
  5. Embedded Linux best practices
    By hippo in forum Linux Forum
    Replies: 0
    Last Post: November 13th, 2006, 04:47 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts