DPI string parameter and readmemh
Hi,I am using this construct:
export "DPI-C" task do_readmemh_file; task do_readmemh_file; input string file; $readmemh(file, mem); endtask
VL_READMEM_N which does not exist. Do I miss anything? I found an ugly workaround with an integer array and memcpy, but I am wondering if I am missing something.
#1 Updated by Wilson Snyder about 1 year ago
First time this has probably come up. Can you try making a patch to fix this? Add a "extern void VL_READMEM_N()" function inside verilated_heavy.h with arguments similar to the declarations in verilated.h, then in verilated.cpp make a READMEM_N function. The existing VL_READMEM_W function up front converts to a ofilenamez; this instead should convert to a string and call READMEM_N. If you look at the existing VL_FLOPEN_N* functions you'll get the idea. Thanks.
Also available in: Atom