X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=3b_sim%2Fcmem.hpp;fp=3b_sim%2Fcmem.hpp;h=8e348c7f7f49a203280c249c2665367e853dca89;hb=815c827247bc211e4785016985666fbfd201f423;hp=05739dbcb037b31f2445de3ddca4ac7a756ec7f0;hpb=d1dab9a35d864d5533e2a9e8d49f1ad840773687;p=calu.git diff --git a/3b_sim/cmem.hpp b/3b_sim/cmem.hpp index 05739db..8e348c7 100644 --- a/3b_sim/cmem.hpp +++ b/3b_sim/cmem.hpp @@ -21,8 +21,13 @@ private: const int MAX_MEMORY; std::vector m_memory; public: + /* aligns to BIT_LEN words, aka. does calc direct memorycell from address */ void set(const MEMORY_ADDRESS address, const T data); T get(const MEMORY_ADDRESS address) const; + + /* doesn't align, user has to do */ + void setDirect(const MEMORY_ADDRESS address, const T data); + T getDirect(const MEMORY_ADDRESS address) const; CMem(int size) : MAX_MEMORY(size), m_memory(size) {}; };