Open yongruifang opened 6 months ago
Is this non-deterministic? I.e., is the memory getting a random value every time?
loadMemoryFromFile
results in a bind file getting generated. My guess is that ChiselSim is not properly including this bind file in the compilation so this isn't working.
Is this non-deterministic? I.e., is the memory getting a random value every time?
loadMemoryFromFile
results in a bind file getting generated. My guess is that ChiselSim is not properly including this bind file in the compilation so this isn't working.
No, in my project, the memory always get 0. I have tried many times, and cannot see any other value.
That may be the same behavior. Memories may come up as zero by default. Basically, I'm saying that this may not be getting initialized because the bind is not happening.
I'm porting my tests to ChiselSim from chiseltest and saw a similar behavior. Have you tried loadMemoryFromFileInline
to see if it's the same @yongruifang ?
Version: chisel6.2.0 OS: Ubuntu 22.04.3 LTS on Windows 10 x86_64 Kernel: 5.15.150.1-microsoft-standard-WSL2
Question in chisel6.2.0, my test code indicates that loadMemoryFromFile makes no sense. I'm sure my filepath is correct, it works in chisel5.1.0 .Unfortunately, it doesn't work now.
Here is the structure of my project :
build.sbt
example.hex.txt
IMemory.scala
IMemorySpec.scala
when I run
sbt "testOnly circuit.IMemorySpec
, the output is :Observed value '0' != 3211443.
Mem doesn't initialize by loadMemory method.Other Information I first ask this question in here: stackoverflow