cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
dummy_memory.hpp
Go to the documentation of this file.
1 
17 
43 
56 #ifndef _DUMMY_MEMORY_H_
57 #define _DUMMY_MEMORY_H_
58 
59 #include "../../../../NTS/nts.hpp"
60 #include "../../../../MEM/mem.hpp"
61 //#include "../../../../NTS/toe/src/toe.hpp"
62 // #include "../../../../NTS/toe/src/state_table/state_table.hpp"
63 // #include "../../../NTS/nts_utils.hpp"
64 // #include "../../../NTS/SimNtsUtils.hpp"
65 
66 #include <map>
67 
68 
73 class DummyMemory {
74 
75  private: // [FIXME - Use appropriate types]
76  ap_uint<16> readAddr; // Read Address within a read buffer (16 LSbits --> 64k bytes)
77  ap_uint<16> readId; // Address of the read buffer in DDR (16 MSbits --> 64k buffer).
78  int readLen;
79  ap_uint<16> writeAddr; // Write Address within a write buffer (16 LSbits --> 64k bytes)
80  ap_uint<16> writeId; // Address of the write buffer in DDR (16 MSbits --> 64k buffer).
81 
82  std::map<ap_uint<16>, ap_uint<8>*> storage;
83  std::map<ap_uint<16>, ap_uint<8>*>::iterator readStorageIt;
84  std::map<ap_uint<16>, ap_uint<8>*>::iterator writeStorageIt;
85 
86  std::map<ap_uint<16>, ap_uint<8>*>::iterator createBuffer(ap_uint<16> id);
87  void shuffleWord(ap_uint<64> &);
88  bool *getBitMask (ap_uint< 4> keep);
89 
90  public:
91  void setReadCmd (DmCmd cmd);
92  void setWriteCmd(DmCmd cmd);
93  void readChunk (AxisApp &chunk);
94  void writeChunk (AxisApp &chunk);
95 
96 };
97 
98 #endif
99 
void setReadCmd(DmCmd cmd)
void setWriteCmd(DmCmd cmd)
void readChunk(AxisApp &chunk)
void writeChunk(AxisApp &chunk)