Reorder Buffer that allows out-of-order writes to queue and in-order reads.
More...
#include <ReorderBuf.h>
|
bool | canAcceptRequest () |
|
Id | addRequest () |
|
bool | topResponseReady () |
|
void | addResponse (const Id &id, const Data &data) |
|
Data | popResponse () |
|
void | reset () |
|
bool | isEmpty () |
|
|
typedef FIFO< bool, Depth > | VBits |
|
typedef VBits::FifoIdx | EntryNum |
|
typedef mem_array_sep< EntryNum, InFlight, 1 > | Id2Entry |
|
|
typedef | NVUINTW (InFlight) IdRepository |
|
bool | get_next_avail_id (Id &id, IdRepository &id_repository) |
|
template<typename Data, unsigned int Depth, unsigned int InFlight>
class ReorderBuf< Data, Depth, InFlight >
Reorder Buffer that allows out-of-order writes to queue and in-order reads.
- Template Parameters
-
Data | DataType |
Depth | Depth of queue |
InFlight | Number of inflight entries |
- A Simple Example
#include <ReorderBuf.h>
...
void ReorderBufTop( const OpType& op,
const DataType& in_data,
const Rob::Id& in_id,
Rob::Id& out_id,
DataType& out_data,
bool& out_resp)
{
static Rob rob;
out_id = 0; out_resp = false; out_data =0;
switch (op)
{
case canAccept: out_resp = rob.canAcceptRequest(); break;
case addRequest: out_id = rob.addRequest(); break;
case top: out_resp = rob.topResponseReady(); break;
case addResponse: rob.addResponse(in_id, in_data);break;
case popResponse: out_data = rob.popResponse(); break;
case reset: rob.reset(); break;
case isEmpty: out_resp = rob.isEmpty(); break;
default:
}
}
...
#define NVHLS_ASSERT_MSG(X, MSG)
Definition at line 68 of file ReorderBuf.h.
The documentation for this class was generated from the following file: