MatchLib
Classes | Public Member Functions | List of all members
ArbitratedScratchpadDP< kNumBanks, kNumReadPorts, kNumWritePorts, kEntriesPerBank, WordType, isSF, IsSPRAM > Class Template Reference

ArbitratedScratchpad with dual port support. More...

#include <ArbitratedScratchpadDP.h>

Public Member Functions

BankIndex GetBankIndex (Address a)
 
LocalIndex GetLocalIndex (Address a)
 
void clear ()
 
void run (Address read_address[kNumReadPorts], bool read_req_valid[kNumReadPorts], Address write_address[kNumWritePorts], bool write_req_valid[kNumWritePorts], WordType write_data[kNumWritePorts], Ack read_ack[kNumReadPorts], Ack write_ack[kNumWritePorts], bool read_ready[kNumReadPorts], WordType port_read_out[kNumReadPorts], bool port_read_out_valid[kNumReadPorts])
 
void run (Address read_address[kNumReadPorts], bool read_req_valid[kNumReadPorts], Address write_address[kNumWritePorts], bool write_req_valid[kNumWritePorts], WordType write_data[kNumWritePorts], Ack read_ack[kNumReadPorts], Ack write_ack[kNumWritePorts], bool read_ready[kNumReadPorts], WordType port_read_out[kNumReadPorts], bool port_read_out_valid[kNumReadPorts], NVUINTW(kEntriesPerBank) valid_entry[kNumBanks])
 

Detailed Description

template<unsigned int kNumBanks, unsigned int kNumReadPorts, unsigned int kNumWritePorts, unsigned int kEntriesPerBank, typename WordType, bool isSF = true, bool IsSPRAM = false>
class ArbitratedScratchpadDP< kNumBanks, kNumReadPorts, kNumWritePorts, kEntriesPerBank, WordType, isSF, IsSPRAM >

ArbitratedScratchpad with dual port support.

Template Parameters
kNumBanksNumber of Banks
kNumReadPortsNumber of read ports
kNumWritePortsNumber of write ports
kEntriesPerBankNumber of entries per bank
WordTypeWordType of entry in memory
isSFIs Store-Forward enabled for simultaneous read and write to same address
IsSPRAMIs memory mapped to single-port RAM. Either read or write is allowed per cycle
A Simple Example
#include <ArbitratedScratchpadDP.h>
...
ArbitratedScratchpadDP<kNumBanks, kNumReadPorts, kNumWritePorts, kEntriesPerBank, WordType, false, false> scratchpad;
scratchpad.run(read_address, read_address_valid,
write_address, write_address_valid,
write_data, read_ack, write_ack, read_ready,
read_data_out, read_data_out_valid);
...

Definition at line 59 of file ArbitratedScratchpadDP.h.


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