I am using cadence's pli for dynamically allocated memories.
for system tasks:
damem_inith - there is one argument which needs file name in the following format:
I would like to replace it by dynamic file name i.e <seed>.dat. So for each random test it will look for filename as <seed> .dat
Is it possible with this system tasks?
Anyone who can help me out?
Try $value$plusargs(user_string, variable).
This system function searches the list of plusargs on the command line for a specified string. The string is specified as the first argument to the system function. If the string is found, the remainder of the string (that is, the part of the string after the portion that matches the user_string) is converted into the specified format, and the resulting value is stored in the specified variable. For example:
reg [8*32:1] testname
if ($value$plusargs("TESTNAME=%s", testname))
$display("Running test %0s.", testname);
If you invoke the simulator with the following command line, the variable testname gets the value good_test.
% ncsim +TESTNAME=good_test [other_options] snapshot_name
See 'cdnshelp' or Section 17.10.2 of the IEEE 1364-2001 standard for details on $value$plusargs.
I am looking for following PLI function:
$damem_inith("eep_mem", "101.dat", 0, MEMSIZE-1);
In the above function, 101.dat file fixed here but I need this to be dynamic means instead of 101, can we use the passing seed value here?
That function is available at <install_dir>/tools/inca/examples/pli/damem.