Scratchpad Memories with arbitration and queuing.
More...
#include <ArbitratedScratchpad.h>
|
typedef cli_req_t< DataType, addr_width, NumInputs > | req_t |
|
typedef cli_rsp_t< DataType, NumInputs > | rsp_t |
|
|
typedef | NVUINTW (log2_nbanks) bank_sel_t |
|
typedef | NVUINTW (bank_addr_width) bank_addr_t |
|
typedef | NVUINTW (log2_inputs) input_sel_t |
|
void | compute_bank_request (req_t &curr_cli_req, bank_req_t bank_req[NumInputs], bank_sel_t bank_sel[NumInputs], bool bank_req_valid[NumInputs]) |
|
void | banks_load_store (bank_req_t bank_req[NumBanks], bool bank_req_valid[NumBanks], bank_rsp_t bank_rsp[NumBanks]) |
|
void | reset () |
|
void | load_store (bank_req_t bank_req[NumInputs], bank_sel_t bank_sel[NumInputs], bool bank_req_valid[NumInputs], rsp_t &load_rsp, bool input_ready[NumInputs]) |
|
|
static const int | kDebugLevel = 2 |
|
static const int | addr_width = nvhls::nbits<CapacityInBytes - 1>::val |
|
static const int | log2_nbanks = (NumBanks == 1) ? 1 : nvhls::nbits<NumBanks - 1>::val |
|
static const int | log2_inputs = (NumInputs == 1) ? 1 : nvhls::nbits<NumInputs - 1>::val |
|
static const bool | is_nbanks_power_of_2 = (NumBanks & (NumBanks - 1)) == 0 |
|
static const int | bank_addr_width = (is_nbanks_power_of_2 && (NumBanks > 1)) ? (addr_width - log2_nbanks) : (addr_width - log2_nbanks + 1) |
|
template<typename DataType, unsigned int CapacityInBytes, unsigned int NumInputs, unsigned int NumBanks, unsigned int InputQueueLen>
class ArbitratedScratchpad< DataType, CapacityInBytes, NumInputs, NumBanks, InputQueueLen >
Scratchpad Memories with arbitration and queuing.
- Template Parameters
-
DataType | DataType if input and output |
CapacityInBytes | Capacity of scratchpad |
NumInputs | Number of Inputs |
NumBanks | Number of Banks |
LenInputBuffer | Length of Input Buffer |
LenOutputBuffer | Length of Output Buffer |
- A Simple Example
#include <ArbitratedScratchpad.h>
...
ArbitratedScratchpad<DataType, ScratchpadCapacity, NumInputs, NumBanks, InputQueueLength> dut;
dut.reset();
...
dut.load_store(curr_cli_req, curr_cli_rsp, ready);
...
Definition at line 58 of file ArbitratedScratchpad.h.
The documentation for this class was generated from the following file: