You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I modified the example GCD program to have the following line:
val mem = Mem(1024, UInt(8.W))
And then modified the test to have the following:
pokeAt(gcd.mem, 10, 10)
And I get the following error:
[error] (run-main-0) treadle.executable.TreadleException: Error: memory mem.forceWrite(10, 10). memory not found
[error] treadle.executable.TreadleException: Error: memory mem.forceWrite(10, 10). memory not found
[error] at treadle.executable.TreadleException$.apply(TreadleException.scala:10)
[error] at treadle.TreadleTester.pokeMemory(TreadleTester.scala:284)
[error] at chisel3.iotesters.TreadleBackend.poke(TreadleBackend.scala:36)
[error] at chisel3.iotesters.PeekPokeTester.pokeAt(PeekPokeTester.scala:190)
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
@immesys I believe your problem is that the memory you added is getting removed by the dead code elimination pass because your memory is not hooked up directly or indirectly to an IO port. I added the same line you did and added a port and wired the memory to it and the pokeAt and peekAt worked.
Hmm that could well be the problem. My module is a processor but I am trying to test it by setting up memory with instructions and writing results back to memory, which gets observed using peekAt. Nothing is exposed in the top level IO so it is probably eliminating the entire processor.
Thanks for pointing that out, it should be easy to fix.
I modified the example GCD program to have the following line:
And then modified the test to have the following:
And I get the following error:
What am I doing wrong?
The text was updated successfully, but these errors were encountered: