X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=3b_sim%2Fcmem.hpp;h=09f42937dc899b305309ba6148cd197d04739df6;hb=e3e51aa23d772b1dd08da16f330a9f8616924226;hp=05739dbcb037b31f2445de3ddca4ac7a756ec7f0;hpb=dc0be5333c70296e3271b432305c7901fc6c14bb;p=calu.git diff --git a/3b_sim/cmem.hpp b/3b_sim/cmem.hpp index 05739db..09f4293 100644 --- a/3b_sim/cmem.hpp +++ b/3b_sim/cmem.hpp @@ -21,9 +21,14 @@ 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; - CMem(int size) : MAX_MEMORY(size), m_memory(size) {}; + + /* 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,(T)NULL) {}; }; #endif