Initializing Mem with a hex file similar to $readmemh

92 views
Skip to first unread message

Raghu Prabhakar

unread,
May 23, 2016, 2:05:54 PM5/23/16
to chisel-users
Hi all,

Is there a way to initialize Mem objects in the design with an init file for C++ simulation? As I understand it, the 'pokeAt' method is used to initialize Mems in Chisel.
I noticed that there is a 'read_hex' method in the mem_t object which reads an init file and loads memories, but it doesn't seem to be tied to anything from Chisel's C++ backend.
Also, there is a mention of a 'Mem4' memory construct in earlier versions of Chisel's documentation that did have this feature: https://inst.eecs.berkeley.edu/~cs250/fa11/handouts/tut10-memgen.pdf.

I can create methods using pokeAt to get the functionality I want, but wanted to ask if there are better ways.
Thanks!


Reply all
Reply to author
Forward
0 new messages