Jump to content

How to implement an ordered queue?


katang

Recommended Posts

My task is to implement what in C++ would be an ordered queue. I.e. my consumer wants to "see" a FIFO, and several consumers put data independently (i.e in parallel) and the channel inserts the received data at the right position. My idea is to start with sc_fifo, and sc_semaphore to write contents. Then I need method for inserting the new content at the right position, with the goal to synthesize the design.  Is there a better idea to start with? What is the "best" approach to implement insertion, in terms of resource usage and speed?

Link to comment
Share on other sites

If your goal is to synthesize the design, then your first step should be to check what is synthesisable - are you using a particular high level synthesis tool? Have you checked this it will support sc_fifo and sc_semaphore?

If your tool supported std::map, couldn't you use use that?

regards

Alan

Link to comment
Share on other sites

Yes, I want to synthesize the design, and that is why I am looking for ideas for components which enable this.

To your second question: are there chances that standard components like sc_fifo and sc_semaphore are not supported? Till now this did not cross my mind.

 

Link to comment
Share on other sites

15 hours ago, katang said:

Yes, I want to synthesize the design, and that is why I am looking for ideas for components which enable this.

To your second question: are there chances that standard components like sc_fifo and sc_semaphore are not supported? Till now this did not cross my mind.

 

The only supported standard channel for synthesis in modern HLS tools is sc_signal. It is pretty low-level.  Unfortunately, other high-level communication components are vendor-specific.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...