projects
/
calu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
spartan3e: bootrom_v1.bit
[calu.git]
/
3b_sim
/
cmem.hpp
diff --git
a/3b_sim/cmem.hpp
b/3b_sim/cmem.hpp
index 05739dbcb037b31f2445de3ddca4ac7a756ec7f0..09f42937dc899b305309ba6148cd197d04739df6 100644
(file)
--- a/
3b_sim/cmem.hpp
+++ b/
3b_sim/cmem.hpp
@@
-21,9
+21,14
@@
private:
const int MAX_MEMORY;
std::vector<T> m_memory;
public:
const int MAX_MEMORY;
std::vector<T> 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;
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
};
#endif