ucb-bar / chisel2-deprecated

chisel.eecs.berkeley.edu
388 stars 90 forks source link

Fix memory access masking bug for nonPow2 memories #688

Closed ccelio closed 8 years ago

ccelio commented 8 years ago

I've found that for a NonPow2 sized memory, I was getting garbage values that were causing buffer overruns elsewhere in my Chisel emulator (feeding a mem.read() value into another mem() access).

I'd like a code review to verify my logic on this is correct.

ccelio commented 8 years ago

I'm not familiar with the unit-testing infrastructure - what does it take to add a unit test for non-pow2 memories?

ucbjrl commented 8 years ago

@ccelio we're still using ancient JUnit test style code and the old Tester with chisel2. Take a look at src/test/scala/SeqMemSuite.scala for a simple example.

aswaterman commented 8 years ago

Closed with 1ee157fea9bc5816bce04aadaa554b8970cb8871