- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page