106-inc/sim2022

Implement linear memory model

Closed this issue · 3 comments

Now memory is implemented using std::unordered map for simplicity. This model cannot accurately represent real virtual memory, which has to be linear and sequential. New implementation of memory should have "array of bytes" semantics
Additionally, memory interface for instructions lband lh etc. should be implemented.

Can you provide any description for this issue? Your aims isn't clearly enough for me.

Can you provide any description for this issue? Your aims isn't clearly enough for me.

Done

I think you should also provide a memory interface to load a range of bytes by start address.
For example:

template <std::forward_iterator It>
void loadRange(Addr start, It begin, It end);

Maybe you can add here requires clause to check underlying type and/or its size