MatchLib
Classes | Public Member Functions | Static Public Attributes | List of all members
ArbitratedCrossbar< DataType, NumInputs, NumOutputs, LenInputBuffer, LenOutputBuffer > Class Template Reference

Crossbar with conflict arbitration and input queuing. More...

#include <arbitrated_crossbar.h>

Public Member Functions

typedef NVUINTW (log2_inputs) InputIdx
 
typedef NVUINTW (log2_outputs) OutputIdx
 
void reset ()
 
bool isInputEmpty (InputIdx index)
 
bool isOutputEmpty (OutputIdx index)
 
bool isInputFull (InputIdx index)
 
bool isOutputFull (OutputIdx index)
 
void push (DataType data, InputIdx src, OutputIdx dest)
 
DataType peek (OutputIdx index)
 
DataType pop (OutputIdx index)
 
void xbar (DataDest input_data[NumInputs], bool input_valid[NumInputs], bool input_consumed[NumInputs], DataType data_out[NumOutputs], bool valid_out[NumOutputs], bool output_ready[NumOutputs], InputIdx source[NumOutputs])
 
bool isAllInputEmpty ()
 
bool isAllOutputEmpty ()
 
bool isAllInputReady ()
 
void pop_all_lanes (bool valid_out[NumOutputs])
 
void run (DataType data_in[NumInputs], OutputIdx dest_in[NumInputs], bool valid_in[NumInputs], DataType data_out[NumOutputs], bool valid_out[NumOutputs], bool ready[NumInputs], InputIdx source[NumOutputs])
 Top-Level function for Arbitrated Crossbar.
 
void run (DataType data_in[NumInputs], OutputIdx dest_in[NumInputs], bool valid_in[NumInputs], DataType data_out[NumOutputs], bool valid_out[NumOutputs], bool ready[NumInputs])
 Top-Level function for Arbitrated Crossbar that does not return source.
 

Static Public Attributes

static const int log2_inputs = nvhls::index_width<NumInputs>::val
 
static const int log2_outputs = nvhls::index_width<NumOutputs>::val
 

Detailed Description

template<typename DataType, unsigned int NumInputs, unsigned int NumOutputs, unsigned int LenInputBuffer, unsigned int LenOutputBuffer>
class ArbitratedCrossbar< DataType, NumInputs, NumOutputs, LenInputBuffer, LenOutputBuffer >

Crossbar with conflict arbitration and input queuing.

Template Parameters
DataTypeDataType if input and output
NumInputsNumber of Inputs
NumOutputsNumber of Outputs
LenInputBufferLength of Input Buffer
LenOutputBufferLength of Output Buffer
A Simple Example
#include <arbitrated_crossbar.h>
...
ArbitratedCrossbar<DataType, NumInputs, NumOutputs, InputQueueLen, OutputQueueLen> xbar;
xbar.reset(); // optional in this case, suitable if xbar is a class member rather than local variable
DataType data_in[NumInputs]; // Array of inputs containing data
OutputIdx dest_in[NumInputs]; // Array of inputs containing destination information for each input
bool valid_in[NumInputs]; // Array of inputs indicating if the input is valid
DataType data_out[NumOutputs]; // Array of outputs containing data
bool valid_out[NumOutputs]; // Array of outputs indicating if the output is valid
bool ready[NumInputs]; // Array of outputs indicating if an input was ready. This also indicates of the input was successfully received by arbitrated Xbar
InputIdx source[NumOutputs]; // Source id of input forwarded to each output
...
xbar.run(bank_req, bank_sel, bank_req_valid, bank_req_winner,
bank_req_winner_valid, input_ready, source);
...

Definition at line 66 of file arbitrated_crossbar.h.


The documentation for this class was generated from the following file: