qinhailiang Posted August 23, 2011 Report Share Posted August 23, 2011 Now, I has defined an array as follow: bit [7:0] valid_data[8064]; How to define an queue and make the array cached into it? Thanks in advance. BR Quote Link to comment Share on other sites More sharing options...
jadec Posted August 23, 2011 Report Share Posted August 23, 2011 Arrays and Queues are similar data structures. You want to put the elements of the array into the queue? bit [7:0] queue[$]; queue = { valid_data }; Quote Link to comment Share on other sites More sharing options...
qinhailiang Posted August 23, 2011 Author Report Share Posted August 23, 2011 Hi, Jadec Thanks for your reply I want to put all of elements of an whole array into an queue every time, can define as above? and can do as follow? queue.push_back(valid_data); if no, could you please to tell me other methods? Thanks in advance BR Quote Link to comment Share on other sites More sharing options...
jadec Posted August 24, 2011 Report Share Posted August 24, 2011 push_back() only takes an item, but you could do: queue = {queue, valid_data}; Quote Link to comment Share on other sites More sharing options...
qinhailiang Posted August 25, 2011 Author Report Share Posted August 25, 2011 Thanks a lot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.