Solved
Forum Discussion
BobA
New Contributor
9 months agoI figured it out ... in the IP Catalog expand On Chip Memory, select the type of memory to use, and in the wizard dialogs there's an option to initialize it to a file's contents.
- sstrell9 months ago
Super Contributor
Yes, that's another way to do it with the memory as an IP and a .hex or .mif file. It seemed like you wanted to do it through code inference.
- BobA9 months ago
New Contributor
If there's another way to do this, I love to hear about it.
I didn't really understand your previous comment about using a .dat file. The .mem file I'm using is in the format accepted by $readmemh.
- sstrell9 months ago
Super Contributor
I've always used .dat for this. I've never actually heard of .mem. This article uses .txt actually: https://fpgacoding.com/test-bench-data-files-in-verilog/