ThaumicMekanism / venus

RISC-V instruction set simulator built for education
https://ThaumicMekanism.github.io/venus/
MIT License
146 stars 21 forks source link

Add memory alignment tests and refactor to store words instead of bytes #13

Open noloerino opened 4 years ago

noloerino commented 4 years ago

(not sure what the procedure for merging in changes is; this affects the backend but I changed one file in the frontend and I haven't tried building on the js branch)

I saw a TODO in the backend repository about storing words instead of bytes of memory, which I went ahead and implemented. I also did some refactoring on memory tests, the Memory module now accepts a parameter that determines whether unaligned accesses are allowed (it defaults to true, since that seemed to be the default behavior previously).

I also made a few small refactors in the files I touched to be slightly more idiomatic.